If you prefer annotated videos to wiki pages, there is couple of videos available for Linux users.
- 2G RAM with lots of available swap space. Additional RAM will significantly decrease build time.
- For debug builds: at least 8 GB free disk space
- For optimized builds: at least 1 GB free disk space (6 GB recommended)
Build Tools and Dependencies
All Distros - One Line Bootstrap Command
Try to run the following to install all system prerequisites:
wget -O bootstrap.py https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py && python bootstrap.py
If you are behind proxy use the following method:
Set up your environment variables to appropriate proxy server address like this:
Now, run the wget command to install the system prerequisites:
wget -O --proxy-user=username --proxy-password=password bootstrap.py https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py && python bootstrap.py
If this doesn't work, continue on to one of the sections below.
You can download and install all the prerequisites with the following command:
sudo apt-get install zip unzip mercurial g++ make autoconf2.13 yasm libgtk2.0-dev libglib2.0-dev libdbus-1-dev libdbus-glib-1-dev libasound2-dev libcurl4-openssl-dev libiw-dev libxt-dev mesa-common-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libpulse-dev m4 flex ccache libgconf2-dev
libcurl4-openssl-dev is only required to build the crash reporter. If you are using the
--disable-crashreporter config option, then you don't need to install this.
These instructions will install the default compiler for your current Ubuntu release. Please note that as of Firefox 38, GCC 4.6 and earlier are no longer supported, and will not work; the Firefox codebase now relies on features of C++11 that are only supported in GCC 4.7 or later. (Firefox 37 requires GCC 4.6 or later).
You can download and install all the prerequisites with this command (as root):
sudo aptitude install zip mercurial libasound2-dev libcurl4-openssl-dev libnotify-dev libxt-dev libiw-dev libidl-dev mesa-common-dev autoconf2.13 yasm libgtk2.0-dev libdbus-1-dev libdbus-glib-1-dev python-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libpulse-dev
If you are running a chroot environment, or a minimalist installation, you may also need to install some basic packages:
aptitude install unzip gcc g++ make patch
Debian Squeeze additions
On Debian Squeeze, you need to install yasm-1.x from squeeze-backports. You can also get mercurial if you need compatibility with an exisiting mercurial 2.x repository.
echo "deb http://backports.debian.org/debian-backports squeeze-backports main" >> /etc/apt/sources.list aptitude update
aptitude -t squeeze-backports install yasmmercurial
Debian Squeeze has only Python 2.6, and Mozilla build system asks for Python 2.7. Although Python 2.7 is in Debian Wheezy and mixing Debian packages from different releases can be done with apt pinning, it's not recommended because it can make your system unstable, and you will have a lot of dependencies problems.
The easiest solution is to use pythonbrew.
# Make sure you have libbz2-dev installed before, it's needed to have bz2 module in Python. aptitude install libbz2-dev # Install pythonbrew like described in the documentation curl -kL http://xrl.us/pythonbrewinstall | bash # Install Python 2.7 and make it the default pythonbrew install 2.7.3 pythonbrew switch 2.7.3 # Check version python --version
openSUSE/SUSE Linux Enterprise
Execute the following command (as root):
zypper install \ make cvs mercurial zip gcc-c++ gtk2-devel xorg-x11-libXt-devel libidl-devel \ freetype2-devel fontconfig-devel pkg-config dbus-1-glib-devel mesa-devel \ libcurl-devel libnotify-devel alsa-devel autoconf213 libiw-devel yasm \ gstreamer010-devel gstreamer010-plugins-base-devel pulseaudio-devel libXcomposite-devel
RedHat Enterprise Linux (RHEL)/CentOS/Fedora
Execute the following command:
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 gstreamer-devel gstreamer-plugins-base-devel pulseaudio-libs-devel
gtk2-devel dbus-glib-develGconf2-devel # 'Development tools' is defunct in Fedora 19 use the following sudo yum groupinstall
'C Development Tools and Libraries'sudo yum group mark install "X Software Development"
RHEL/CentOS do not include Mercurial in their repositories. You can install a RPM package directly from RPMForge (http://packages.sw.be/mercurial/) using the following commands (replace VERSION with the right string for your version/architecture):
wget http://packages.sw.be/mercurial/mercurial-VERSION.rpm rpm -Uhv mercurial-VERSION.rpm
If you have already added the RPMForge repositories to your system, a simple
yum install mercurial should work as well.
Install the following packages:
pacman -Syu --needed base-devel zip unzip freetype2 fontconfig pkg-config \ gtk2 dbus-glib iw libidl2 python2 mercurial alsa-lib curl libnotify libxt \ mesa autoconf2.13 yasm wireless_tools gstreamer0.10 \ gstreamer0.10-base-plugins libpulse
base-devel conflicts with
fontconfig conflict with the corresponding Infinality packages. Hence, if you already have those installed you can (probably) leave out those packages.
Note that Python3 is the default
python in Arch Linux, but Mozilla requires Python2, which is installed above. There are a few ways to work around this. One is to add
The default autoconf version in Arch is currently 2.69, but Mozilla requires 2.13, which is installed above (Note the executable is named differently than the package). Add this line to your
All other Unix-based systems
On other systems, you can install the tools individually:
mkdir ~/bin ln -sf `which python2` ~/bin/python
- A recent POSIX Shell
- A C++ compiler. GCC 4.7 or higher is required. Again, please note that as of Firefox 38, GCC 4.6 and earlier are no longer supported, and will not work; your platform's native compiler may work, provided it supports those features of C++11 that the Firefox codebase relies on, which are listed here. (Firefox 37 requires GCC 4.6 or higher).
- Perl 5.6 or higher. Older perl versions may work if you upgrade File::Spec to version 0.8
- GNU make 3.80 or higher. Other varieties of "make" will not work.
- the GTK2 widget toolkit, version 2.10 or higher
- libXt-devel for X11/Intrinsic.h, X11/Shell.h
- libIDL 0.6.3 or higher Source snapshots are available from Mozilla via ftp. If using the RPMs, you'll need both the regular rpm and the -devel rpm. If you already have ORBit installed, then you do not need to install libIDL as ORBit bundles libIDL. You may need to install the ORBit-devel package if you use packages.
- zip 2.3 (or higher)
- freetype 2.1.0 (or higher)
- libgstreamer 0.10 (or higher) and its base plugins
- pkg-config 0.9.0 (or higher)
- dbus-1-glib-devel (Developer package for D-Bus/GLib bindings)
- libasound2-dev (needed for audio playback support)
- pulseaudio-libs-devel (preferred for audio over ALSA)
- Yasm version 1.1.0 or newer.
- Python 2.7.3 or later. Python 3 will not work.
- autoconf-2.13 (requires GNU m4) - Autoconf 2.5x will not work. See bug 104642 for details.
To install autoconf-2.13 from source:
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz tar -xvzf autoconf-2.13.tar.gz cd autoconf-2.13/ ./configure --program-suffix=2.13 make sudo make install
You may need to
export AUTOCONF=autoconf2.13 in your environment (e.g. put it in .profile in your home directory) or add this line to your
- For errors pertaining to alsa/ogg support: http://developer.mozilla.org/en-US/docs/alsa