This is a guide to building Mozilla on Unix including,

For documentation on developing features or fixing bugs, look at the Mozilla Technical Documents or Mozilla Library. For general Unix issues, look at the Mozilla Unix.

Other Unix Build pages


See the Unix build requirements.

Get the Code

There are two ways to get the code:


Drops are generally produced at least once per week (usually daily), and are known to compile and even run on a few platforms.


Provides the most current code, but is slower than ftp. (First check that Tinderbox is green to be sure it will compile.)

setenv CVSROOT
cvs login
(password: anonymous) (You only need to login once)
cvs co mozilla/
cd mozilla
gmake -f checkout

The makefile pulls the right source for building mozilla, which includes some tagged branches (e.g., NSPR).

Do not try to manually check out the mozilla/ CVS tree on the HEAD branch. It will not work.

Build the Lizard

Manually drive the build

  1. cd mozilla
  2. ./configure [options]
    For configure options, run ./configure --help, or use the Unix Build Configurator.If you don't know what a configure option does, don't use it. The default is to create a un-optimized build with debugging information. If you want an optimized build, use the configure options --disable-debug --enable-optimize.
  3. gmake

Once you have configured, you only have to run configure if you add or remove files (cvs update can do this. Beware!). The list of makefiles is in mozilla/

For build system hackers: If you change, cd to mozilla, and run autoconf-2.13. This generates a new configure script. (When you checkin, cvs will run autoconf and check in a new configure script for you).

Automated build (

  1. Save the script from Unix Build Configurator as ~/.mozconfig.
  2. cvs co -f mozilla/
  3. cd mozilla
  4. gmake -f

If you want to build without pulling the tree (as in, you already have the source lying around), gmake -f build

If you just want to pull the tree, gmake -f checkout

If you want to build Firefox, use the example mozconfig file in the mozilla/browser/config source directory.

After the build


Parallel builds: just adding -j4 to gmake doesn't work, you need to do this:

setenv MAKE gmake -j4

Original Document Information