How do you compile Gem on OSX?
Up to Table of ContentsThis FAQ applies to: 0.92.3, 0.92.0, 0.92svn, 0.92.2, 0.92.4
available build environemnts
you should be able to build Gem either using autoconf
or XCode
autoconf
coming from a linux background (and often running builds on remote machines), i personally prefer the "autoconf" build-system
this is also used for the Pd-extended autobuilds
setup for Gem-0.92.0
- PowerBook G4 running OSX 10.5.8
- FTGL/freetype2 have been compiled statically into a universal binary beforehand (by somebody; the URL is dead by now; i happen to have a local copy on my machine)
- all the rest seems to come with OSX
- i used autoconf (rather than XCode) with the following configure-line::
PKG_FTGL_CFLAGS="-I/Users/zmoelnig/Development/pd-gem/GemLibs/FTGL/freetype\ include/ -I/Users/zmoelnig/Development/pd-gem/GemLibs/FTGL/include/" PKG_FTGL_LIBS="/Users/zmoelnig/Development/pd-gem/GemLibs/FTGL/mac/build/Universal/libftgl.a" ./configure --with-pd=/Users/zmoelnig/Development/pure-data/pd --with-extension=d_fat --enable-fat-binary
notes on OSX-10.6 (aka "Snow Leopard")
- since i only have a PowerBook, i cannot upgrade to 10.6 (which has dropped support for PowerPC)
- users report that compilation works fine when forcing the build to be i386 only (OSX10.6 has no legacy support for ppc; Gem has no support for x86_64 on OSX yet).
for this to work you have to specify
--enable-fat-binary=i386
Xcode
in build/osx-xcode
you can find a xcode-project for Gem
font-support
you need FTGL (which in turn needs freetype)
for downloadable Gem-binaries it is better to have FTGL (and freetype) linked statically!
freetype
- get freetype-2.4.4 from e.g. sourceforge and unpack it
./configure --disable-shared --enable-biarch-config CFLAGS="-arch ppc -arch i386"
make && sudo make install
FTGL
- get FTGL from sourceforge (i did a checkout of the SVN trunk; today this was revision 1266)
./configure --without-x --disable-shared --disable-dependency-tracking CFLAGS="-arch i386 -arch ppc" CXXFLAGS="-arch i386 -arch ppc" LDFLAGS="-arch i386 -arch ppc"
make && sudo make install
building Gem
these are the additional flags (rather environment variables) passed to Gem
./configure --disable-dependency-tracking --enable-fat-binary=ppc,i386 PKG_FTGL_CFLAGS="-I/usr/local/include/FTGL $(freetype-config --cflags)" PKG_FTGL_LIBS="-L/usr/local/lib/ -lftgl -lfreetype"