Skip to content

Instantly share code, notes, and snippets.

@wfarr
Last active December 18, 2015 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wfarr/5784770 to your computer and use it in GitHub Desktop.
Save wfarr/5784770 to your computer and use it in GitHub Desktop.
For all your unstable needs.

Making sure homebrew can find general system headers

Confirmed helpful.

sudo ln -s $(xcrun --show-sdk-path)/usr/include /usr/include

Missing mach_debug_types headers in Command Line Tools

Known problem already reported upstream to Apple.

In the mean time, install full Xcode or you can just rip these headers out of the Xcode5.app. To do so, download Xcode5, mount the DMG, and then run:

sudo cp -a /Volumes/Xcode/Xcode5-DP.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/mach_debug $(xcrun --show-sdk-path)/usr/include/

Making sure ruby, etc can find headers for building gems with native extensions

Confirmed helpful.

sudo ln -s $(xcrun --show-sdk-path)/System/Library/Frameworks/Ruby.framework/Versions/2.0/Headers/ruby.h /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h
sudo ln -s $(xcrun --show-sdk-path)/System/Library/Frameworks/Ruby.framework/Versions/2.0/Headers/ruby /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby

Maybe helpful, but may be worked around by other hacks.

sudo ln -s $(xcrun --show-sdk-path)/usr/include/libxml2 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/libxml2
sudo ln -s $(xcrun --show-sdk-path)/usr/include/libxml2/libxml /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/libxml

Compiling Ruby 1.8.7

The apple-gcc42 some of you might be used to doesn't seem to do the trick. Use brew/versions/gcc49 instead.

Lipo not working

sudo cp -a /Volumes/Xcode/Xcode5-DP.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo /Library/Developer/CommandLineTools/usr/bin/

No header CoreFoundation/CFBase.h

sudo ln -s $(xcrun --show-sdk-path)/System/Library/Frameworks/CoreFoundation.framework/Versions/Current/Headers /usr/include/CoreFoundation

Missing header X11/Xlib.h

Install latest XQuartz and set CFLAGS="-I/opt/X11/include ${CFLAGS}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment