XCode headers not installed since OSX 10.14

Hello,

Apple is not installing the headers by default with XCode since Mojave.

This causes ruby binary gems and some of the binary nodejs modules to fail installation.

The fix is simple so I don’t mind it, however, I think including this installation in the base OSX VM images would save a lot of time for people running into this issue.

This single command should install the missing library headers:

sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

PS I ran into this issue when executing brew bottle on osx11 env - the command failed while trying to compile some necessary gems (it auto installs its own deps on first run apparently).

3 Likes

Thanks @positron-ray!

I needed this to be able to use GCC on the new image xcode11 to access the C functions for OSX.

This command adds about 70 seconds to the build job. (example)