macOS
Prerequisites
Xcode Command Line Tools
xcode-select --installThis provides the compiler (clang++, C++20 from Xcode ≥ 14), make,
and other POSIX tools.
Homebrew
Install Homebrew if not already present:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Dependencies via Homebrew
brew install cmake bison flex pkg-config \
readline gsl fftw hdf5 boost libyaml \
libcerf gnuplotNote:
bisonandflexare keg-only — Homebrew installs them but does not add them toPATH, to avoid overriding the versions shipped with macOS. TheCMakePresets.jsonhandles this automatically.
Build MLZ dependencies
kww and lmfit are not in Homebrew and must be built from source.
Download the latest release archives:
Build each in order:
tar xzvf <source>.tgz
cd <source-directory>
mkdir build && cd build
cmake .. -DCMAKE_PREFIX_PATH=$(brew --prefix)
make
ctest
sudo make installBuild Frida
Clone or download the Frida source from https://jugit.fz-juelich.de/mlz/frida.
The source tree includes a CMakePresets.json for macOS. Set the
Homebrew prefix, then use the preset:
export HOMEBREW_PREFIX=$(brew --prefix)
cmake --preset macos-homebrew -B build
cd build
make -j$(sysctl -n hw.logicalcpu)Anaconda users: deactivate the conda environment before running cmake (
conda deactivate), otherwise Anaconda’s older Boost may be picked up instead of Homebrew’s.
Run the test suite:
ctest -j$(sysctl -n hw.logicalcpu)Only proceed if all tests pass. If any fail, run ctest -V for verbose
output and report to the maintainer.
Install:
sudo make install
mkdir ~/gnew # directory for PostScript graphics outputTroubleshooting
cmake cannot find a library
Check that the library is installed and that pkg-config can find it:
PKG_CONFIG_PATH=$(brew --prefix)/lib/pkgconfig \
pkg-config --modversion yaml-0.1 # example for libyamlIf a library is keg-only, pass its prefix explicitly:
cmake .. \
-DCMAKE_PREFIX_PATH="$(brew --prefix);$(brew --prefix readline)"Library not found at runtime
macOS uses DYLD_LIBRARY_PATH rather than LD_LIBRARY_PATH:
export DYLD_LIBRARY_PATH=$(brew --prefix)/lib:$DYLD_LIBRARY_PATHOr update the dynamic linker cache after installing to /usr/local:
sudo update_dyld_shared_cache # macOS 12 and earliergnuplot: libcerf.2 not found
If Frida starts but plot windows fail with
Library not loaded: libcerf.2.dylib, gnuplot was compiled against an
older libcerf than what is installed. Fix by reinstalling gnuplot:
brew reinstall gnuplotIf that fails due to a Qt conflict on your system, create a compatibility symlink as a workaround:
sudo ln -s "$(brew --prefix libcerf)/lib/libcerf.3.dylib" \
"$(brew --prefix libcerf)/lib/libcerf.2.dylib"gnuplot: no display
If gnuplot complains about no display terminal, ensure it was built with an interactive terminal. Check with:
gnuplot -e "set terminal" 2>&1 | grep -i qtIf qt is missing, reinstall: brew reinstall gnuplot.