macOS Build and Development
This page covers local development and demonstration use on macOS. Ubuntu 24.04 remains the primary platform for OpenISAC USRP experiments. macOS is suitable for CPU builds, documentation, offline analysis, and sensing frontends, but it does not support CUDA and cannot replace real-time hardware validation on Linux.
Before you begin:
- Real-time tuning helpers such as
isolate_cpus.bashare Linux-only. - Keep only one UHD package source; do not mix Homebrew and MacPorts UHD installations in the same shell environment.
- Validate UHD, USRP, real-time scheduling, USB, and network-throughput behavior on the Linux hardware host.
1. Install Prerequisites
Section titled “1. Install Prerequisites”Install Xcode Command Line Tools:
xcode-select --installInstall the Homebrew dependencies:
brew install cmake pkgconf uhd boost fftw yaml-cpp libomp ffmpegConfirm that the shell uses Homebrew UHD:
which uhd_find_devicesuhd_config_info --versionNormally, uhd_find_devices resolves under /opt/homebrew/bin, and uhd_config_info --version reports UHD 4.9.0.1. If MacPorts UHD is also installed, remove it or ensure Homebrew appears first in PATH.
2. Install AFF3CT
Section titled “2. Install AFF3CT”OpenISAC requires AFF3CT. Because no Homebrew formula is currently available, install it from source into a user-local prefix:
brew install nlohmann-jsongit clone https://github.com/aff3ct/aff3ct.gitcd aff3ctgit submodule update --init --recursiveexport AFF3CT_PREFIX="$HOME/.local/openisac-aff3ct"mkdir -p buildcd buildcmake .. \ -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX="$AFF3CT_PREFIX" \ -DAFF3CT_COMPILE_EXE=OFF \ -DAFF3CT_COMPILE_SHARED_LIB=ON \ -DSPU_STACKTRACE=OFF \ -DSPU_STACKTRACE_SEGFAULT=OFF \ -DCMAKE_CXX_FLAGS="-funroll-loops -march=native -faligned-new"cmake --build . -j4cmake --install .3. Build OpenISAC
Section titled “3. Build OpenISAC”Clone the repository and explicitly select AppleClang and the AFF3CT installation:
cd ~git clone https://github.com/zhouzhiwen2000/OpenISAC.git OpenISACcd OpenISACcmake -S . -B build \ -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \ -DAFF3CT_ROOT="$AFF3CT_PREFIX"cmake --build build -j4Successful builds produce the CPU binaries:
build/BSbuild/UE
4. Prepare Runtime Configuration
Section titled “4. Prepare Runtime Configuration”BS and UE load YAML from the current working directory. For B210 templates:
cd buildcp ../config/BS_B210.yaml BS.yamlcp ../config/UE_B210.yaml UE.yamlUse the corresponding X310 templates when running an X310.
5. Run the CPU Backend
Section titled “5. Run the CPU Backend”Run the required programs from build/:
./BS./UEOpenISAC skips mlockall() on macOS; this is expected. For a startup check without hardware, the program should report a clear YAML, socket, or device-initialization error rather than crash.
6. Run the Python Sensing Frontend
Section titled “6. Run the Python Sensing Frontend”Use the provided conda environment:
conda env create -f environment.openisac-plot.ymlconda activate openisac-plotpython scripts/plot_sensing_fast.pyOn Apple Silicon, the environment installs mlx conditionally for Darwin + arm64. The fast sensing frontend probes MLX/Metal and automatically falls back to CPU when it is unavailable.