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, run:
cd osx
rake
You can view all tasks by running rake -T
.
You are required to install the macOS 10.14 SDK so that we can build binaries that run on older macOS versions.
-
Download the SDK at phracker/MacOSX-SDKs.
-
Extract with:
sudo tar -xf MacOSX10.14.sdk.tar.xz -C "$(xcode-select -p)/Platforms/MacOSX.platform/Developer/SDKs"
-
Modify the XCode MacOSX.Platform/Info.plist file.
-
Make the file and its containing directory writable by non-root:
sudo chown "$(id -u)" "$(xcode-select -p)/Platforms/MacOSX.platform/Info.plist" sudo chown "$(id -u)" "$(xcode-select -p)/Platforms/MacOSX.platform"
-
Open the file in Xcode:
open "$(xcode-select -p)/Platforms/MacOSX.platform/Info.plist"
-
Set
MinimumSDKVersion
to 10.14 or lower. -
Restore original permissions:
sudo chown root "$(xcode-select -p)/Platforms/MacOSX.platform/Info.plist" sudo chown root "$(xcode-select -p)/Platforms/MacOSX.platform"
-
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