From FIFE development wiki
(Redirected from Building:Mac:Scons)
Jump to: navigation, search

Apple-strawberry-32x32.png Platform-dependent information: Mac.

The following passage contains information that is specific to PPC and Intel-x86-based Macintosh systems.

This guide explains how to compile FIFE on your PPC and Intel x86 Macintosh system with SCons. For Snow Leopard(10.6) see this post for details!

Xcode - Development Tools
MacPorts - For installing SCons and 3rd party libraries
3rd party libraries (via MacPorts)
SDL | SDL_image | SDL_ttf | Boost | Boost.Jam | libvorbis | libogg | Guichan | SWIG

Getting started

In order to build FIFE you will have to install everything required to actually build the project.

Xcode from Apple Developer Connection
Downloads -> Developer Tools -> latest Xcode for you version of macOS (eg.10.x) (free account)
Download and install MacPorts for your version of macOS
Command.pngsudo port install scons libsdl libsdl_ttf libsdl_image boost boost-jam libogg libvorbis swig swig-python
guichan X11
from Mac OS install disc launch the Optional Installs installer package and check the box to install X11 (or X11SDK from Xcode\Packages\Packages\x11SDK.pkg)
Command.pngsudo port install libguichan
Command.pngsudo port install subversion
Command.pngsvn co
if you need to change any of the include or library paths edit File.png build/
Command.pngscons in Folder.png trunk (build the engine: File.png engine/python/fife/
UnitTest++ (optional)
Command.pngsudo port install unittest-cpp

NOTE:If you already have SCons - you might have to run the (internal) update function on it, otherewise your packages will be out of date. It did not appear to be automatic.

NOTE: You don't need to use MacPorts if you are comfortable with compiling the required libraries from source on your own. For compatibility with older versions of Mac OSX you will have to switch the version of gcc to 3.3 and install all the required libraries from source. Please see the NOTE at the bottom of this page for more info. As of writing this document MacPorts v1.5.0 is the newest and it can be downloaded from here. Installing it is as simple as double clicking on it and going through the install steps.

NOTE:Due to the ever-changing C++ ABI, the resulting binaries will only run on OS X versions compatible with the version of gcc you used during the build. For instance, if you build using gcc 4.0, then the resulting binaries will not run on OS X < 10.3.9. Depending on the version of MacPorts you used the binary you create will only be compatible with the version of Mac OS you are using. For better compatibility you will have to install all the required libraries from source and use gcc_select to change to gcc 3.3. Also remember, that the compiled binaries are specific to the architecture they were compiled on. I am working on build instructions for a Universal Binary which will run on both Intel and PPC Macs on OS X >= 10.2. For more information on ABI incompatibilities across OS X versions and Universal Binaries, please see the Apple Developer Connection site.


  • If you are getting a "wrong version" error from python (I got one importing fife or _fife) then you probably have python24 (or another olderversion) installed somewhere and the library is getting linked or otherwise incorporated. I removed python24 (I had both Fink and MacPorts versions!) and it worked fine. This error occurred at run time, after successful compile, but you have to rebuild with Command.pngscons -c and then Command.png scons.