Saturday, September 8, 2012

I recently spent the day (yes, the entire day) compiling libjingle on OS X. I'm still running OS X 10.6.8, so that may have been part of the problem, but there are clearly some deeper issues. I thought I'd document the changes I had to make to the compilations instructions in case anyone else (like me in the future) has to go through this nightmare.

First off, the package includes compilation instructions in the README file. This file has some organizational issues (For example, the dependencies expat and srtp are not listed under the "prerequisites" section, but rather the "libjingle" section) and does not account for some bugs I found, but otherwise includes some pretty good detail. Unfortunately, all the "examples" they give are for windows, so I imagine that's where all the development and testing is done. Still, you need to read it. This post is just an outline and only goes into detail where the README doesn't explain things.

Also, there's no longer an active mailing list to go to ask questions, which is sad because that would be a good place to bring these issues up (there are already bugs posted for most of the fixes). It also makes me think maybe libjingle is dead or on critical life-support. (the mailing list linked from the developer's page is currently non-existant, and the link from their blog to the "google talk help center" goes to archive.org!) If you need help, your best bet is probably stackoverflow.com, which is a great place to go for help, but it's no substitute for a mailing list.

Compiling libjingle

Download and extract libjingle from the google code page. I used 0.6.14 for this.

Be sure to extract it somewhere without any weird characters in the path (including spaces) or the build will barf.

Create a makefile (below) at the top level of libjingle. This will be especially useful in case you need to run the build over and over again as you tweak things.

Install the prerequisites (see the README for more details)

Python should already be installed

To install scons, I recommend homebrew: $ brew install scons

download swtoolkit and extract it as talk/third_party/swtoolkit

download gtest. extract it as talk/third_party/gtest

download expat 2.0.1. extract as talk/third_party/expat-2.0.1

download srtp and extract as talk/third_party/srtp

Apply the following fixes:

Fix talk/third_party/swtoolkit/site_scons/site_init.py as described here and here.