Note

The mechanism used to build Firefox for Android also has its own page.

The mechanism used to build Firefox for iOS also has its own github.

This page is about building Firefox Desktop

The Mozilla build system, like the rest of the Mozilla codebase, is cross-platform. It uses traditional Unix-style autoconf and make tools to build the various applications (even on non-unix operating systems).

Because the Mozilla codebase builds many different applications and has many options, it is complex to use and learn. Please read these instructions carefully before attempting a build.

These build pages are for the projects which use the autoconf-based build system: Firefox, Thunderbird, Mozilla Suite / SeaMonkey, XULRunner, Sunbird, and standalone Composer.

For build information on other Mozilla projects, visit their project or build page: Camino, NSPR, Spidermonkey, NSS, and Directory SDK for C.

If you are having build problems, please post questions to the newsgroup mozilla.dev.builds (access via Google Groups). Make your post as precise as possible, including details about your operating system, your mozconfig/configure flags, and the precise error you are experiencing.

You may also want to check the TreeHerder to make sure the product you are working with is currently compiling in your environment.

For the impatient

The quickest way to build Mozilla is to use the instructions at the simple build pages:

For more detail, see below.

Getting started

Build prerequisites

Before you try to build, make sure you have the correct tools, and have configured these tools correctly.

Get the source

Download Mozilla Source Code
Source code for releases is available for download. Use this if you're a Linux distribution.
Mozilla Source Code via Mercurial
Get the latest source code using Mercurial. Use this if you're casually interested in Firefox development or you want to work on Firefox.
Mozilla Source Code via Git
Get the latest source code using Git. (The steps may seem a little weird. You'll have to install a Git extension, git-cinnabar, so that git knows how to clone and pull commits from our Mercurial repository.)
Comm-central Source Code via Mercurial
Those doing active development on Thunderbird/SeaMonkey/Firefox can check out the latest source using Mercurial. This method includes all the code for the applications mentioned, so you can work on Firefox development, and still build Thunderbird or SeaMonkey as well.

Configuring build options

Running configure and make with the default options will not give you a good working build. You should use a .mozconfig file to obtain a reasonable release build. Please read Configuring Build Options carefully before building.

Build and install

After setting up your environment, downloading the source, and configuring the build, refer to the following per-app instructions on how to build:

Random FAQs and Developer Documentation

Hacking the Build System