Skip to content

Latest commit

 

History

History
89 lines (57 loc) · 2.34 KB

README.md

File metadata and controls

89 lines (57 loc) · 2.34 KB

Traveling Ruby OS X build system

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 osx
ARCHITECTURES=arm64 rake

To build binary packages for x86_64, run:

cd osx
ARCHITECTURES=x86_64 rake

You can view all tasks by running rake -T.

System requirements

  • x86_64 or arm64
  • MacOS minimum deployment target 12.2

Install Xcode Command Line Tools

  • Copy and paste the following text into your terminal (and press "return"):
xcode-select --install
  • Follow the prompts.

Cross-Compiling

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.

Clearing certain paths

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