Nearly 4GB of RAM is used by the compilation process. If you only have 2GB, with 2GB swap, for example, the compile process may only complete in a minimal desktop-environment such as Fluxbox.
You can attempt running our system bootstrapping script to install all system dependencies:
wget https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py && python bootstrap.py
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 this works, great! If not, see the appropriate section below. If you encounter an error, consider filing a bug saying that the bootstrapper didn't work. Please include output and relevant operating system details.
If you have already checked out the source code via Mercurial or Git you can also use mach with the bootstrap command:
Common Bootstrapper Failures
wget: command not found
If you see the above, you don't have wget installed. Try curl:
curl https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py > bootstrap.py && python bootstrap.py
If you don't have curl, download the file in your browser and run it by hand:
The above bootstrap script supports popular Linux distributions. If it doesn't work for you, see Linux build prerequisites for more.
The above bootstrap script should work on OS X 10.6 and newer. (As of at least 10.8, wget isn't included in a stock OS install but curl is.) If it doesn't, see Mac OS X build prerequisites.
OS X 10.9 "Mavericks" bootstrap: "Xcode not installed" failure
At least in the developer preview of OS X 10.9, there will be issues trying to run the bootstrap command because it won't detect that Xcode is installed (if you are using Xcode5-DPx). To fix this do the following:
- Go into /Applications/ and rename "Xcode5-DPx" to "Xcode".
- Now you must update the Xcode path directory. Do this by heading into Terminal and then typing in:
sudo xcode-select -switch /Applications/Xcode.app/
Then enter your password if it prompts.
Alternatively, you can make a symbolic link in /Applications named Xcode.app:
ln -s /Applications/Xcode5-DP?.app /Applications/Xcode.app
That's it! You should now be able to run the bootstrap command.
Other OS X 10.9 errors
Now you are ready to get the Firefox source and build; continue on from Simple Firefox build (Get_the_source).