BUILDING MOZILLA FIREFOX

Install build prerequisites

Before building Firefox, we will need the build tools listed below and a few gigabytes of free disk space. Builds will be slow unless we have at least 2GB of RAM.

Linux

Run the following commands in a shell to install the needed tools:

Ubuntu users:

sudo apt-get build-dep firefox
sudo apt-get install mercurial libasound2-dev libcurl4-openssl-dev libnotify-dev libxt-dev libiw-dev mesa-common-dev autoconf2.13 yasm uuid

Debian users: Same as Ubuntu, but replace the first command with sudo apt-get build-dep iceweasel

Fedorausers:

sudo yum groupinstall 'Development Tools' 'Development Libraries' 'GNOME Software Development'
sudo yum install mercurial autoconf213 glibc-static libstdc++-static yasm wireless-tools-devel mesa-libGL-devel alsa-lib-devel libXt-devel

Getting the source

Getting the latest source code from Mozilla’s Mercurial code repository. It may take a while, it’s a lot of code!

hg clone http://hg.mozilla.org/mozilla-central

Build configuration (optional)

By default, the build system creates a release build of Firefox roughly equivalent to the official Firefox release builds. If that’s not exactly what you want, there are many build configuration options to choose from, although it’s strongly recommended that you only use options that you fully understand. The normal way to specify build options is to place them in a file called ‘.mozconfig’ at the root of your mozilla source tree. For example, to create a debug build instead of a release build, that file would contain:

ac_add_options --enable-debug

For more on configuration options, see the page Configuring build options.

Building

make -f client.mk

How to update and build again

For pulling the latest changes and update the code in your mozilla-central working directory, run the command:

hg pull -u

Then just re-run the “make -f client.mk” command above. make will only recompile files that changed, but it’s still a long haul.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s