Tuesday, June 14, 2011

HOWTO: Compile RLV 2.7.1 on Mac

As promised in an earlier post, here are my notes on how I compile the new RLV 2.7.x code base. Some of this is specifically for Marine's code, but most of it should translate over to a default Second Life Viewer 2 source base from v.2.6 and later -- at least, if it is the newer 'autobuild' and not indra/develop.py.

Update (11/29/11): Obsolete - see this link.

Things you'll need:
Root access or sudo
Mac OS 10.5 or later -- I worked on a freshly installed 10.6
Internet connectivity

Install xcode
I installed Xcode 3.2.6 and iOS SDK 4.3 (without 10.4 libs)

Install Mac Ports
Follow the instructions are their page.

After Mac Ports is installed, run the following commands to get the rest of the tools you'll need. Open a terminal prompt and type:
  • sudo port install mercurial
  • sudo port install cmake

Install LL's version of autobuild
Again, in a terminal window type:
  • mkdir ~/tmp
  • cd ~/tmp
  • hg clone http://hg.secondlife.com/autobuild
  • cd autobuild
  • sudo ./setup.py install

Sometimes autobuild doesn't install the first time, so check to be sure you have it in /usr/local/bin with this command:
  • which autobuild
If it isn't there, run sudo ./setup.py install again and do the which command again.

Get the Restrained Love Viewer Source
We need to both get the code, then possibly downgrade to 2.7.1.
  • hg clone http://bitbucket.org/marinekelley/rlv rlv-2.7.1
  • hg revert --verbose --all --rev=16161

FMOD is a pain since they don't distribute 3.75 anymore. Also, now LL wants it in a tar.bz2 file. Moreover, you have to get a md5 value for it and put it in the autobuild.xml file. Lucky for you, I put it up here for you to download it and already update autobuild.xml with my patches. =^.^=

Place it into your top level /tmp directory.
  • cp fmodapi375mac.tar.bz2 /tmp/

Apply my patches for Mac & Linux
Unfortunately, Marine's dev env and mine differ somewhat and when she added my changes into her environment, it broke her build. So, I have to keep my patches separate. Just apply my patch to your copy of the rlv source and you'll be fine. My patch for RLV 2.7.1 is here.
  • bunzip2 kittin-rlv-2.7.1.patch.bz2
  • cd rlv-2.7.1
  • patch --strip=1 -i ../kittin-rlv-2.7.1.patch

Start the build
I made this script rebuild.sh because I get tired of re-entering all the commands. This script is good for both Linux and Mac.
  • cp rebuild.sh rlv-2.7.1/
  • cd rlv-2.7.1
  • bash rebuild.sh

I think everything is correct here. I may have to come back and make corrections or clarify something, so please comment if you find a mistake or have a suggestion. Happy Building!


  1. Hi Kittin, hope your novel is coming along. I have made it to the patch process but the patch comes back with errors. Not sure where it went wrong, other than the revert gave a point not found error.

  2. Ugh, anonymous, here I am logged in, smiles. thanks, Mei

  3. Ooo...are you following http://kittin-ninetails.blogspot.com/2011/11/compiling-marine-kelleys-restrained.html ? Don't apply the patches if you're trying to build the latest viewer. Pull the source from my fork and follow everything else here, but don't apply the patches. They're already in the fork.

    I see Marine just released a newer version today, about three hours ago. You might want to wait until I update, too. I should get to it tomorrow or Tuesday.