Linux Prerequisites

  • Revision slug: Developer_Guide/Build_Instructions/Linux_Prerequisites
  • Revision title: Linux Prerequisites
  • Revision id: 11609
  • Created:
  • Creator: cpearce
  • Is current revision? No
  • Comment 1 words added, 1 words removed

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

Debian/Ubuntu

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

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

libcurl is required to build the crash reporter. If apt-get fails to install libcurl4-openssl-dev, try libcurl-dev, libcurl4-gnutls-dev, or libcurl3-gnutls-dev. Alternatively you can disable the crash reporter (using the config option --disable-crashreporter).

If you are using Debian, you probably want to install Mercurial from the Debian Backports repository as there are known problems with older Mercurial versions (e.g. the one that ships with Debian lenny).

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 \
  libcurl-devel libnotify-devel alsa-devel autoconf213 libiw-devel

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.

You also need to download, build and install YASM, since the zypper YASM package is too old to build the VP8 assembly code:

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 (as root):

yum install \
  cvs zip gcc-c++ glib2-devel gtk2-devel fontconfig-devel libnotify-devel \
  libIDL-devel alsa-lib-devel libXt-devel freetype-devel pkgconfig \
  dbus-glib-devel curl-devel autoconf213 xorg-x11-proto-devel libX11-devel \
  libXau-devel libXext-devel wireless-tools-devel glibc-static yasm

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.

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 0.7.1 or later.
  • autoconf-2.13 (requires GNU m4) - Autoconf 2.5x will not work. See {{ Bug("104642") }} for details. 

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

  • The default /bin/sh that comes with some older unices (notably OSF/1) is known to be deficient. In that case, you should use 'gmake SHELL=ksh'.
  • The latest trunk code may cause an error referring to '___tls_get_addr' if gcc is not the latest (past 4.1.2) or if jemalloc isn't disabled (use mozconfig option "--disable-jemalloc").
  • For errors pertaining to alsa/ogg support: http://developer.mozilla.org/en/docs/alsa

{{ 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><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 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> </p>
<h3 name="Build_Tools">Build Tools and Dependencies</h3>
<h4>Debian/Ubuntu</h4>
<p>You can download and install all the prerequisites with two command (as root):</p>
<pre>apt-get build-dep firefox
apt-get install mercurial libasound2-dev libcurl4-openssl-dev libnotify-dev libxt-dev libiw-dev mesa-common-dev autoconf2.13 yasm
</pre>
<p>libcurl is required to build the crash reporter. If <code>apt-get</code> fails to install <code>libcurl4-openssl-dev</code>, try <code>libcurl-dev</code>, <code>libcurl4-gnutls-dev</code>, or <code>libcurl3-gnutls-dev</code>. Alternatively you can disable the crash reporter (using the config option <code>--disable-crashreporter</code>).</p>
<p>If you are using Debian, you probably want to install Mercurial from the<a class="external" href="http://www.backports.org/" title="http://www.backports.org/"> Debian Backports</a> repository as there are known problems with older Mercurial versions (e.g. the one that ships with Debian lenny).</p>
<h4>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 \
  libcurl-devel libnotify-devel alsa-devel autoconf213 libiw-devel</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 11.2, <code>autoconf213</code> is part of the standard repositories.</p>
<p>You also need to download, build and install YASM, since the zypper YASM package is too old to build the VP8 assembly code:</p>
<pre>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; sudo make install
</pre>
<h4>RedHat Enterprise Linux (RHEL)/CentOS/Fedora</h4>
<p>Execute the following command (as root):</p>
<pre>yum install \
  cvs zip gcc-c++ glib2-devel gtk2-devel fontconfig-devel libnotify-devel \
  libIDL-devel alsa-lib-devel libXt-devel freetype-devel pkgconfig \
  dbus-glib-devel curl-devel autoconf213 xorg-x11-proto-devel libX11-devel \
  libXau-devel libXext-devel wireless-tools-devel glibc-static yasm
</pre>
<p>RHEL/CentOS do not include Mercurial in their repositories. You can install a RPM package directly from 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>
<h4>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 0.7.1 or later.</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. </li>
</ul>
<p>To install from source: </p>
<pre>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>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>mk_add_options AUTOCONF=autoconf2.13</pre>
<h3 name="Additional_Information">Additional Information</h3>
<ul> <li>The default /bin/sh that comes with some older unices (notably OSF/1) is known to be deficient. In that case, you should use 'gmake SHELL=ksh'.</li> <li>The latest trunk code may cause an error referring to '___tls_get_addr' if gcc is not the latest (past 4.1.2) or if jemalloc isn't disabled (use mozconfig option "--disable-jemalloc").</li> <li>For errors pertaining to alsa/ogg support: <a class="external" href="http://developer.mozilla.org/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