Compiling Firestorm on Mac OS X

These are my notes on how to compile Firestorm on OS X.  At this time, I'm running Mountain Lion (10.8.5).

Last Updated March 15, 2014


Install Xcode 4.6.3

 Install required development tools

  • Install Mac Ports.
  • Next, using Mac Ports, install Mercurial, CMake and bison.  Open a terminal window and type:  sudo port install mercurial cmake bison
Python 2.7 is also required, but will be installed as a dependency to Mercurial, so you don't need to worry about adding it to the list above.

  • Install Autobuild.  Autobuild is a Linden Lab resource that does all the hard work.  In a Terminal window type:
  mkdir ~/tmp
  cd ~/tmp
  hg clone
  cd autobuild
  sudo ./ install

Get the Firestorm Source

Plan your directory structure ahead of time. If you are going to be producing changes or patches you will be cloning a copy of an unaltered source code tree for every change or patch you make, so you might want to have all this work stored in its own directory.  If you are a casual compiler and won't be producing any changes, you can use one directory.  For this document, I will assume $HOME/firestorm.

In a terminal window, type:  mkdir ~/firestorm
  cd ~/firestorm
  hg clone

This can take a bit, it's a rather large download.

TIP: If you get "terminated unexpectedly" errors on the clone, you can pull chunks at a time by specifying a revision.  When I run into this, I try to get 10,000 revisions at a time.  You may need to experiment to figure out what works best for you.  But here's an example:
  hg clone -r 10000

  cd phoenix-firestorm-lgpl
  hg pull -r 20000

  hg pull

  hg update

Prepare third party libraries

Most third party libraries needed to build the viewer will be automatically downloaded for you and installed into the build directory within your source tree during compilation. Some need to be manually prepared and are not normally required when using an open source configuration (ReleaseFS_open).


FMOD is "optional" if you don't want sound.  If you don't need FMOD, you can skip this section.  Lance Corrimal (Dolphin Viewer) provided me with a copy of FMOD Ex so I could build Marine's Restrained Love Viewer.  I think it's a PITA that Linux can use OpenAL and Mac has to use FMOD.  Oh well.  You can get my copy of FMOD Ex here.

Place the file out somewhere you won't accidentally erase it.  Such as /opt/firestorm or something similar.

Now update the code block in autobuild.xml to point to your copy of FMOD.

It should look like this.  I've bolded the pieces that need to be changed:


Configuring the Viewer

Configuration Switches

There are a number of switches you can use to modify the configuration process.  The name of each switch is followed by its type and then by the value you want to set.

  • FMODEX (bool) controls if the FMOD Ex package is incorporated into the viewer. You must have performed the FMOD Ex installation steps.
  • LL_TESTS (bool) controls if the tests are compiled and run. There are quite a lot of them so excluding them is recommended unless you have some reason to need one or more of them.
TIP: OFF and NO are the same as FALSE; anything else is considered to be TRUE

  autobuild configure -c ReleaseFS_open -- -DLL_TESTS:BOOL=FALSE -DFMODEX:BOOL=TRUE

Compiling the Viewer

  autobuild build -c ReleaseFS_open --no-configure

Now, sit back, read War and Peace, calculate PI to 50 places, tour the country, whatever you desire. Compiling will take quite a bit of time.  (20 minutes on my MacBook Pro Retina)


Some bits of this guide are from the Firestorm guide for compiling for Windows.
Thanks to Tonya Souther and Jaerik for pointing me in the right direction.
Special thanks to "Drop Dead" Cinder Roxley.

No comments:

Post a Comment