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.
- 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.
- Fix talk/libjingle.scons as described here.
- Make the following two changes to talk/main.scons:
- comment out the line that has '-fno-rtti' in it (if you are running a newer version of OS X, and up-to-date dev tools, you may not need to do this.)
- Apply the fix described here. A logical place to add the mac_env.Replace(...) is after mac_env.Append( … ).
- Holy crap! You did it! It should now build with $ make
- If you get stuck, you may get a hint from $ make verbose
- To compile 64-bit binaries, you need to do a few more things:
- Comment out "session/phone/carbonvideorenderer.cc" from libjingle.scons, and 'Carbon' from main.scons.
- Change '-arch', 'i386', to '-arch', 'x86_64', in two places in main.scons
- Though the build will terminate with errors, you should at least have the .a files you need.
======= Makefile ========
SCONS_DIR ?= /usr/local/Cellar/scons/2.2.0/libexec/scons-local/
cd talk/third_party/expat-2.0.1 && ./configure
cd talk/third_party/srtp && ./configure
build: talk/third_party/expat-2.0.1/Makefile talk/third_party/srtp/Makefile
cd talk && third_party/swtoolkit/hammer.sh
verbose: talk/third_party/expat-2.0.1/Makefile talk/third_party/srtp/Makefile
cd talk && third_party/swtoolkit/hammer.sh --verbose
cd talk && third_party/swtoolkit/hammer.sh --clean
UPDATE: notes on 64-bit build.