This article needs a technical review. How you can help.
System Requirements
- 2G RAM with an additional 2GB of available swap space is the bare minimum, and more RAM is always better - having 8GB or more will dramatically improve build time.
- 20 GB free disk space.
- A 64-bit x86 CPU and a 64-bit OS. As of early 2015 it is no longer possible to do a full build of Firefox from source on most 32-bit systems; a 64-bit OS is required. "Artifact builds" may be possible, but are not a supported configuration. On Linux you can determine this by typing "uname -a" in a terminal.
- GCC 4.8 or later is required as of Firefox 48. The Firefox codebase relies on some C++ features that are not supported in GCC 4.8 or earlier - you can learn more about the features we use and their compiler support here
- autoconf 2.13. Most Linux distros now install a later version of autoconf, which the build system cannot use, reporting the error "*** Couldn't find autoconf 2.13. Stop." However a separate autoconf213 package is usually available. To install autoconf 2.13 in Debian based distros copy this line and past it into a terminal window:
-
sudo apt-get install autoconf2.13
- If you are on Fedora machine then simply install the following prerequisites from the terminal window:
-
sudo dnf install @development-tools @c-development autoconf213 gtk2-devel gtk3-devel libXt-devel GConf2-devel dbus-glib-devel yasm-devel alsa-lib-devel pulseaudio-libs-devel
- Note: Building Firefox in Linux on top of a non-native file system - for example, on a mounted NTFS partition - is explicitly not supported. While a build environment like this may succeed it may also fail while claiming to have succeeded, which can be quite difficult to diagnose and fix.
One-Line Bootstrapping
Our system bootstrapping script can automatically install the required dependencies. You can download and run it by copying this line and pasting it into a terminal window:
wget -q https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py -O bootstrap.py && python bootstrap.py
Note: piping bootstrap.py to stdin of a python process will cause interactive prompts in the bootstrap script to fail, causing the bootstrap process to fail. You must run Python against a local file.
If the above command fails, the reason is often because some Linux distributions ship with an outdated list of root certificates. In this case, you should upgrade your Linux distribution or use your browser to download the file. That ensures that you will get it from the right source.
If you get an error from this process, consider filing a bug saying that the bootstrapper didn't work and contact Mike Hoye directly for help. Please include the error message and some details about your operating system.
If you have already checked out the source code via Mercurial or Git you can also use mach with the bootstrap command:
./mach bootstrap
Common Bootstrapper Failures
wget: command not found
You may not have wget (or curl) installed. In that case, download bootstrap.py using your browser and then run with this command:
python bootstrap.py
In some cases people who've customized their command prompt to include emoji or other non-text symbols have found that bootstrap.py fails with a UnicodeDecodeError. We have a bug filed for that but in the meantime if you run into this problem you'll need to change your prompt back to something boring.
More Info
The above bootstrap script supports popular Linux distributions. If it doesn't work for you, see Linux build prerequisites for more. Again, if you run into other problems or our documentation isn't clear, please contact Mike Hoye directly.