Torsten Curdt’s weblog

Building Thunderbird on OSX

Instead of just waiting for the mozilla folks to apply the addressbook patch I thought I just give it a go myself. Unfortunately I could not apply them to the latest trunk source. But at least I was able to build the lastest trunk version. Here is how…
First make sure you have all required tools installed. That means Xcode (1.5, 2.x but not 2.0, I’ve use Xcode 2.2) As you can see from the build requirements you can now also build with gcc4 (I’ve used 4.0.1 build 5247). Not sure whether you really need the 10.4 SDK – but I’ve had mine installed already. Then some other tools and libraries from fink (or darwin ports)

$ sudo apt-get update
$ sudo apt-get install orbit
$ sudo apt-get install orbit-dev
$ sudo apt-get install glib
$ sudo apt-get install zip unzip
$ sudo apt-get install pkgconfig

And you are set. Make sure /sw/bin/init.sh is getting “sourced” in your .bashrc (no idea why – just found it in some instructions) and then you can create your mozconfig e.g. via cgi script. Mine looked like this:

# Options for client.mk.
mk_add_options MOZ_CO_PROJECT=mail

# Options for 'configure' (same as command-line options).
ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.4u.sdk
ac_add_options --enable-application=mail
ac_add_options --disable-accessibility
ac_add_options --enable-plaintext-editor-only

save it into the mozilla folder as ‘.mozconfig’. You can find documentation on the build options on the mozilla developer site. Then you need to check out their makefile. It can then be used to checkout and build the application. (On some sites they suggest you to download a source snapshot instead of checking it out via the makefile …but at least for me that totally screwed up my build. CVS worked just fine)

$ export CVSROOT=:pserver:[email protected]:/cvsroot
$ cvs co mozilla/client.mk
$ cd mozilla
$ make -f client.mk checkout
$ make -f client.mk build

After quite a lengthy checkout and even more lengthy build I found the ‘Thunderbird.app’ in the dist directory. Starting it up showed 1.6a1 as version number. Sweeet! :) I’ve contacted the author of the patch and hope to get some insights to get it applied.

  • Heya there,
    Sorry couldn't work out if you got the patch applied correctly, or if you just got thunderbird to build. If you could clarify that would be neat.

  • Some additional notes ...

    /Developer/SDKs/ is from MacOSX10.4.pkg in Mac OS X Install DVD/XCode Tools/Packages
    To build on Tiger without getting XCode updates you can do: sudo gcc_select 3.3

    The path to my SDK was subtlely different: ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.4.0.sdk

    My compiled app ended up in obj-powerpc-apple-darwin8.5.0/dist/.
  • Well, wasn't in my '.bashrc' before but fink was working just fine.
  • "Make sure /sw/bin/init.sh is getting sourced in your .bashrc (no idea why - just found it in some instructions)" - this needs to happen in order for fink-installed software to be visible to the system (/sw/bin/init.sh adds /sw/bin to your path). Without it, commands like apt-get will fail with "command not found" errors.
blog comments powered by Disqus