Linux Prerequisites

  • Revision slug: Developer_Guide/Build_Instructions/Linux_Prerequisites
  • Revision title: Linux Prerequisites
  • Revision id: 320925
  • Created:
  • Creator: WakeP
  • Is current revision? No
  • Comment Congregate autoconf2.13 info.

Revision Content

 NOTE: Substantive changes to this page (non-editorial) must be approved by Benjamin Smedberg <benjamin@smedbergs.us> or one of the Build-Config peers. Thank you for your cooperation.

{{ :en/Build_Documentation/TOC() }}

Hardware

  • 512MB RAM with lots of available swap space. For static and XULRunner builds, 1GB RAM minimum. Additional RAM will significantly decrease build time.
  • For debug builds: at least 2 GB free disk space (2.5 GB recommended)
  • For optimized builds: at least 600 MB free disk space (1 GB recommended)

 

Build Tools and Dependencies

All Distros

Try to run the following to install all system prerequisites:

wget 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.

Ubuntu

You can download and install all the prerequisites with the following command:

sudo apt-get install 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

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.

If you are using a chroot as your build environment, then you may need to install some additional dependencies with the following command:

sudo apt-get install zip unzip

These instructions will install the default compiler for your current Ubuntu release. If you would prefer to use GCC 4.5, then this is available in Ubuntu 11.04 and newer. If you are using Ubuntu 11.10 or newer, you will need to install it manually with:

sudo apt-get install g++-4.5

If you do this, remember that you need to set CC and CXX in your environment to point to the correct compiler.

Debian

You can download and install all the prerequisites with this command (as root):

aptitude install 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

If you are running a chroot environment, or a minimalist installation, you may also need to install some basic packages:

aptitude install zip unzip gcc g++ make patch 

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 yasm mercurial

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

If you use openSUSE 11.1 or older, you still need to install autoconf 2.13 from source, see the section "All other systems" below for instructions. Starting with openSUSE 11.2, autoconf213 is part of the standard repositories.

On openSUSE 11.2 and older you also need to download, build and install YASM, since the zypper YASM package is too old to build the VP8 assembly code. Uninstall any version you had installed with zypper first.

zypper remove yasm # make sure you don't have the system package installed

wget http://www.tortall.net/projects/yasm/releases/yasm-1.0.1.tar.gz
tar -xzf yasm-1.0.1.tar.gz
cd yasm-1.0.1/
./configure && make && sudo make install

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

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.

 

Arch Linux

Install the following packages. Note that Python3 is the default python in Arch Linux. Make sure ~/bin is at the start of your $PATH and then do:

mkdir ~/bin && ln -s `which python2` ~/bin/python
pacman -Syu 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

All other systems

On other systems, you can install the tools individually:

  • A recent POSIX Shell
  • A C++ compiler. GCC 3.4 or higher is recommended, or your platform's native C/C++ compiler.
  • 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.
  • CVS 1.11 or higher
  • 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)
  • fontconfig
  • pkg-config 0.9.0 (or higher)
  • dbus-1-glib-devel (Developer package for D-Bus/GLib bindings)
  • libasound2-dev (needed for Ogg support)
  • libnotify-dev
  • Yasm version 1.1.0 or newer.
  • 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 .mozconfig file:

mk_add_options AUTOCONF=autoconf2.13

Additional Information

{{ languages( { "es": "es/Requerimientos_para_la_compilaci\u00f3n_en_Linux", "fr": "fr/Pr\u00e9alables_\u00e0_la_compilation_sous_Linux", "it": "it/Linux_Build_Prerequisites", "ja": "ja/Linux_Build_Prerequisites", "ko": "ko/Linux_Build_Prerequisites", "zh-cn": "cn/Linux_Build_Prerequisites" } ) }}

Revision Source

<p>&nbsp;<span class="comment">NOTE: Substantive changes to this page (non-editorial) must be approved by Benjamin Smedberg &lt;<a class="link-mailto" href="mailto:benjamin@smedbergs.us" rel="freelink">benjamin@smedbergs.us</a>&gt; or one of the Build-Config peers. Thank you for your cooperation.</span></p>
<p>{{ :en/Build_Documentation/TOC() }}</p>
<h3 id="Hardware" name="Hardware">Hardware</h3>
<ul>
  <li>512MB RAM with lots of available swap space. For static and XULRunner builds, 1GB RAM minimum. Additional RAM will significantly decrease build time.</li>
  <li>For debug builds: at least 2 GB free disk space (2.5 GB recommended)</li>
  <li>For optimized builds: at least 600 MB free disk space (1 GB recommended)</li>
</ul>
<p>&nbsp;</p>
<h3 id="Build_Tools" name="Build_Tools">Build Tools and Dependencies</h3>
<h4 id="All_Distros">All Distros</h4>
<p>Try to run the following to install all system prerequisites:</p>
<pre>
<span class="difflineplus">wget https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py &amp;&amp; python bootstrap.py</span></pre>
<p>If this doesn't work, continue on to one of the sections below.</p>
<h4 id="Ubuntu">Ubuntu</h4>
<p>You can download and install all the prerequisites with the following command:</p>
<pre>
sudo apt-get install 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
</pre>
<p><code>libcurl4-openssl-dev</code> is only required to build the crash reporter. If you are using the <code>--disable-crashreporter</code> config option, then you don't need to install this.</p>
<p>If you are using a chroot as your build environment, then you may need to install some additional dependencies with the following command:</p>
<pre>
<code>sudo apt-get install zip unzip</code>
</pre>
<p>These instructions will install the default compiler for your current Ubuntu release. If you would prefer to use GCC 4.5, then this is available in Ubuntu 11.04 and newer. If you are using Ubuntu 11.10 or newer, you will need to install it manually with:</p>
<pre>
<code>sudo apt-get install g++-4.5</code>
</pre>
<p>If you do this, remember that you need to set <code>CC</code> and <code>CXX</code> in your environment to point to the correct compiler.</p>
<h4 id="Debian">Debian</h4>
<p>You can download and install all the prerequisites with this command (as root):</p>
<pre>
aptitude install mercurial libasound2-dev libcurl4-openssl-dev libnotify-dev libxt-dev libiw-dev <code>libidl-dev </code>mesa-common-dev autoconf2.13 yasm libgtk2.0-dev libdbus-1-dev libdbus-glib-1-dev</pre>
<p>If you are running a chroot environment, or a minimalist installation, you may also need to install some basic packages:</p>
<pre>
aptitude install zip unzip gcc g++ make patch 
</pre>
<p>On Debian squeeze, you need to install yasm-1.x from <a class="external" href="http://backports-master.debian.org/Instructions/" title="http://backports-master.debian.org/Instructions/">squeeze-backports</a>. You can also get mercurial if you need compatibility with an exisiting mercurial 2.x repository.</p>
<pre>
echo "deb http://backports.debian.org/debian-backports squeeze-backports main" &gt;&gt; /etc/apt/sources.list
aptitude update
<code>aptitude -t squeeze-backports install yasm</code> mercurial
</pre>
<h4 id="openSUSE.2FSUSE_Linux_Enterprise">openSUSE/SUSE Linux Enterprise</h4>
<p>Execute the following command (as root):</p>
<pre>
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</pre>
<p>If you use openSUSE 11.1 or older, you still need to install autoconf 2.13 from source, see the section "All other systems" below for instructions. Starting with openSUSE&nbsp;11.2, <code>autoconf213</code> is part of the standard repositories.</p>
<p>On openSUSE 11.2 and older you also need to download, build and install YASM, since the zypper YASM package is too old to build the VP8 assembly code. Uninstall any version you had installed with zypper first.</p>
<pre>
zypper remove yasm # make sure you don't have the system package installed

wget http://www.tortall.net/projects/yasm/releases/yasm-1.0.1.tar.gz
tar -xzf yasm-1.0.1.tar.gz
cd yasm-1.0.1/
./configure &amp;&amp; make &amp;&amp;&nbsp;sudo make install
</pre>
<h4 id="RedHat_Enterprise_Linux_(RHEL).2FCentOS.2FFedora">RedHat Enterprise Linux (RHEL)/CentOS/Fedora</h4>
<p>Execute the following command:</p>
<pre>
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
</pre>
<p>RHEL/CentOS do not include Mercurial in their repositories. You can install a RPM&nbsp;package directly from&nbsp;RPMForge (<a class="external" href="http://packages.sw.be/mercurial/" title="http://packages.sw.be/mercurial/">http://packages.sw.be/mercurial/</a>) using the following commands (replace VERSION with the right string for your version/architecture):</p>
<pre>
wget http://packages.sw.be/mercurial/mercurial-VERSION.rpm
rpm -Uhv mercurial-VERSION.rpm</pre>
<p>If you have already <a class="external" href="http://rpmrepo.org/RPMforge/Using" title="http://rpmrepo.org/RPMforge/Using">added the RPMForge repositories to your system</a>, a simple <code>yum install mercurial</code> should work as well.</p>
<p>&nbsp;</p>
<h4 id="Arch_Linux">Arch Linux</h4>
<p>Install the following packages. Note that Python3 is the default python in Arch Linux. Make sure ~/bin is at the start of your $PATH and then do:</p>
<pre>
mkdir ~/bin &amp;&amp; ln -s `which python2` ~/bin/python
</pre>
<pre>
pacman -Syu 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
</pre>
<h4 id="All_other_systems">All other systems</h4>
<p>On other systems, you can install the tools individually:</p>
<ul>
  <li>A recent POSIX Shell</li>
  <li>A C++ compiler. <a class="external" href="http://gcc.gnu.org/">GCC 3.4</a> or higher is recommended, or your platform's native C/C++ compiler.</li>
  <li><a class="external" href="http://www.perl.com/pub/language/info/software.html">Perl</a> 5.6 or higher. Older perl versions may work if you upgrade <a class="external" href="http://search.cpan.org/~kwilliams/File-Spec/">File::Spec</a> to version 0.8</li>
  <li><a class="external" href="http://www.gnu.org/software/make/">GNU make</a> 3.80 or higher. <em>Other varieties of "make" will not work.</em></li>
  <li><a class="external" href="http://www.mozilla.org/cvs.html">CVS</a> 1.11 or higher</li>
  <li>the <a class="external" href="http://www.gtk.org/">GTK2</a> widget toolkit, version 2.10 or higher</li>
  <li>libXt-devel for X11/Intrinsic.h, X11/Shell.h</li>
  <li>libIDL 0.6.3 or higher Source snapshots are available from Mozilla via <a class="link-ftp" href="ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/SRPMS/">ftp</a>. If using the RPMs, you'll need both the regular rpm and the -devel rpm. If you already have <a class="external" href="http://www.labs.redhat.com/orbit/">ORBit</a> 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.</li>
  <li><a class="external" href="http://www.info-zip.org/">zip</a> 2.3 (or higher)</li>
  <li><a class="external" href="http://freetype.org/">freetype</a> 2.1.0 (or higher)</li>
  <li><a class="external" href="http://fontconfig.org/">fontconfig</a></li>
  <li><a class="external" href="http://pkgconfig.freedesktop.org/wiki/">pkg-config</a> 0.9.0 (or higher)</li>
  <li>dbus-1-glib-devel (Developer package for D-Bus/GLib bindings)</li>
  <li>libasound2-dev (needed for Ogg support)</li>
  <li>libnotify-dev</li>
  <li><a class="external" href="http://www.tortall.net/projects/yasm/" title="http://www.tortall.net/projects/yasm/">Yasm</a> version 1.1.0 or newer.</li>
  <li>autoconf-2.13 (requires <a class="external" href="http://www.seindal.dk/rene/gnu/">GNU m4</a>) - Autoconf 2.5x will <strong>not</strong> work. See {{ Bug(104642) }} for details.&nbsp;</li>
</ul>
<p style="margin-left: 40px;">To install autoconf-2.13 from source:&nbsp;</p>
<pre style="margin-left: 40px;">
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</pre>
<p style="margin-left: 40px;">You may need to <code>export AUTOCONF=autoconf2.13</code> in your environment (e.g. put it in .profile in your home directory) or add this line to your<code> .mozconfig</code> file:</p>
<pre style="margin-left: 40px;">
mk_add_options AUTOCONF=autoconf2.13</pre>
<h3 id="Additional_Information" name="Additional_Information">Additional Information</h3>
<ul>
  <li>For errors pertaining to alsa/ogg support: <a class="external" href="/en/docs/alsa" title="http://developer.mozilla.org/en/docs/alsa">http://developer.mozilla.org/en/docs/alsa</a></li>
</ul>
<p>{{ languages( { "es": "es/Requerimientos_para_la_compilaci\u00f3n_en_Linux", "fr": "fr/Pr\u00e9alables_\u00e0_la_compilation_sous_Linux", "it": "it/Linux_Build_Prerequisites", "ja": "ja/Linux_Build_Prerequisites", "ko": "ko/Linux_Build_Prerequisites", "zh-cn": "cn/Linux_Build_Prerequisites" } ) }}</p>
Revert to this revision