Simple Firefox build

  • Revision slug: Simple_Firefox_build
  • Revision title: Simple Firefox build
  • Revision id: 17972
  • Created:
  • Creator: Jorend
  • Is current revision? No
  • Comment 20 words added

Revision Content

You can build a bleeding-edge, development version of Firefox using the commands below. For complete information, see the build documentation.

Installing build tools

If your system is not listed below, see the build prerequisites page.

Ubuntu Linux:

sudo apt-get build-dep firefox
sudo apt-get install mercurial libasound2-dev libcurl4-openssl-dev

Fedora Linux:

sudo yum groupinstall 'Development Tools' 'Development Libraries' 'GNOME Software Development'
sudo yum install mercurial autoconf213

Mac:

  • Install Xcode Tools. Insert "Mac OS X Install Disc 2", then open XcodeTools.mpkg. (For some Mac OS X versions, you will find it in a directory called "Optional Installs".)
  • Install MacPorts.
  • Run these commands to install the other build tools:
    sudo port sync
    sudo port install mercurial libidl autoconf213
    

Problems? See Mac OS X build prerequisites.

Windows:

  • Install Visual Studio.  The express version will work.
  • Install the Microsoft Windows SDK Update for Windows Vista (even if you don't use Vista).
  • Install MozillaBuild, a package of additional build tools. (If you get a message saying this application did not install properly then you should see a windows dialog giving you the option to re-install with the 'correct settings'. After that all should be well.)
  • Open a shell window by running: c:\mozilla-build\start-msvc8.bat

Problems? See Windows build prerequisites.

Building Firefox

Building Firefox requires at least 1 GB of disk space, 500 MB of RAM, and lots of available swap space.

# Get the source
hg clone -r default http://hg.mozilla.org/mozilla-central/
cd mozilla-central

# Configure
autoconf-2.13
mkdir objdir-ff-release
cd objdir-ff-release
../configure --enable-application=firefox

# Build
make -j4
  • For a debug build, pass --enable-debug and --disable-optimize to configure.  This requires more disk space, about 2.5 GB.
  • To build Thunderbird or SeaMonkey, you'll need more source code.
  • On Mac, also pass --with-macos-sdk=/Developer/SDKs/MacOSX10.5.sdk to configure.

How to build again later

In your mozilla-central directory, run these commands:

# Get the latest source
hg pull -r default
hg update

Then just re-run the Configure and Build commands above.  make will only recompile files that changed.

You must use the same configure options each time you rebuild.  To avoid this error-prone step, use a mozconfig file.

 

Revision Source

<p>You can build a bleeding-edge, development version of Firefox using the commands below. For complete information, see the <a class="internal" href="/en/Build_Documentation" title="En/Build Documentation">build documentation</a>.</p>
<h2>Installing build tools</h2>
<p>If your system is not listed below, see the <a class="internal" href="/en/Build_Documentation#Build_prerequisites" title="En/Build Documentation#Build prerequisites">build prerequisites page</a>.</p>
<p>Ubuntu Linux:</p>
<pre>sudo apt-get build-dep firefox
sudo apt-get install mercurial libasound2-dev libcurl4-openssl-dev
</pre>
<p>Fedora Linux:</p>
<pre>sudo yum groupinstall 'Development Tools' 'Development Libraries' 'GNOME Software Development'
sudo yum install mercurial autoconf213
</pre>
<p>Mac:</p>
<ul> <li>Install Xcode Tools. Insert "Mac OS X Install Disc 2", then open <code>XcodeTools.mpkg</code>. (For some Mac OS X versions, you will find it in a directory called "Optional Installs".)</li> <li>Install <a class="external" href="http://www.macports.org/install.php">MacPorts</a>.</li> <li>Run these commands to install the other build tools: <pre class="eval">sudo port sync
sudo port install mercurial libidl autoconf213
</pre> </li>
</ul>
<p>Problems? See <a class="internal" href="/en/Mac_OS_X_Build_Prerequisites">Mac OS X build prerequisites</a>.</p>
<p>Windows:</p>
<ul> <li>Install <a class="external" href="http://msdn2.microsoft.com/en-us/vstudio/aa700736.aspx" title="http://msdn2.microsoft.com/en-us/vstudio/aa700736.aspx">Visual Studio</a>.  The express version will work.</li> <li>Install the <a class="external" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=4377f86d-c913-4b5c-b87e-ef72e5b4e065&amp;DisplayLang=en">Microsoft Windows SDK Update for Windows Vista</a> (even if you don't use Vista).</li> <li>Install <a class="external" href="http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.3.exe">MozillaBuild</a>, a package of additional build tools. (If you get a message saying this application did not install properly then you should see a windows dialog giving you the option to re-install with the 'correct settings'. After that all should be well.)</li> <li>Open a shell window by running: <code>c:\mozilla-build\start-msvc8.bat</code></li>
</ul>
<p>Problems? See <a class="internal" href="/en/Windows_Build_Prerequisites">Windows build prerequisites</a>.</p><h2>Building Firefox</h2>
<p>Building Firefox requires at least 1 GB of disk space, 500 MB of RAM, and lots of available swap space.</p>
<pre># Get the source
hg clone -r default http://hg.mozilla.org/mozilla-central/
cd mozilla-central

# Configure
autoconf-2.13
mkdir objdir-ff-release
cd objdir-ff-release
../configure --enable-application=firefox

# Build
make -j4
</pre>
<ul> <li>For a debug build, pass <code>--enable-debug</code> and <code>--disable-optimize</code> to <code>configure</code>.  This requires more disk space, about 2.5 GB.</li> <li>To build Thunderbird or SeaMonkey, you'll need <a class="internal" href="/en/Comm-central_source_code_(Mercurial)" title="En/Comm-central source code (Mercurial)">more source code</a>.</li> <li>On Mac, also pass <code>--with-macos-sdk=/Developer/SDKs/MacOSX10.5.sdk</code> to <code>configure</code>.</li>
</ul><h2>How to build again later</h2>
<p>In your mozilla-central directory, run these commands:</p>
<pre># Get the latest source
hg pull -r default
hg update
</pre>
<p>Then just re-run the Configure and Build commands above.  <code>make</code> will only recompile files that changed.</p>
<p>You must use the same <code>configure</code> options each time you rebuild.  To avoid this error-prone step, use a <a class="internal" href="/en/Configuring_Build_Options" title="En/Configuring Build Options"><code>mozconfig</code> file</a>.</p>
<p> </p>
Revert to this revision