Creating the Gecko SDK for Mac OS X


Gecko SDK is a package that provides header files, libraries and tools needed to build Mozilla XPCOM components.

This document explains how to build the Gecko SDK on the Mac OS X platform.

The problem provides the SDK for the Windows and Linux platforms. I needed one for the Mac OS X. I looked around and as far as I could see, there wasn't one to be found.

The alternative was to download the whole Mozilla source tree and build it. This is not a very practical approach. Mozilla is a large project with hundreds of components and the build process can take hours. Gecko SDK is a small part of Mozilla and building the whole thing just for a few libraries is a huge waste of time and space.

The solution

The idea is to download the complete Mozilla source code tree, but to build only the needed parts.

Here are the steps I took to build the Gecko SDK on Mac OS X:

  1. Download and install Apple Developer Tools.
  2. Download and install the GTK+OSX package.
  3. Download and install the libidl 0.6.8 library.
    Alternatively, you can download the library source code, build it and install it on your system.
  4. Get the Mozilla source code tarball and unpack it.
  5. Issue a ./configure --enable-standalone-modules=xpcom from the root Mozilla source directory.
  6. Issue a make command to build only the XPCOM part.

The build takes only a few minutes and voila, you have an SDK package located in the dist/sdk directory of the Mozilla tree.

Get Firefox