The build system requires the Developer Commandline Tools to be installed, as well as a number of other things.
See the "System requirements" section.
To build binary packages for arm64, run:
cd macos
ARCHITECTURES=arm64 rake
To build binary packages for x86_64, run:
cd macos
ARCHITECTURES=x86_64 rake
You can view all tasks by running rake -T.
x86_64orarm64- MacOS minimum deployment target
12.2
- Copy and paste the following text into your terminal (and press "return"):
xcode-select --install
- Follow the prompts.
In order to cross-compile for x86_64 from arm64 hosts, you must install Rosetta.
sudo softwareupdate --install-rosetta --agree-to-license
Note: You don't need to run in a Rosetta enabled shell or prefix your command with -arch x86_64, setting the ARCHITECTURES value to x86_64 is sufficient.
To prevent pollution of the build environment, you must ensure that the following files/directory do not exist while building:
- ~/.bundle/config
- /usr/local/include
- /usr/local/lib
You can temporary rename these paths before building...
rake stash_conflicting_paths...then restoring them after building:
rake unstash_conflicting_paths