CompileFirefoxNewVersion

Differences between revisions 4 and 21 (spanning 17 versions)
Revision 4 as of 2006-02-04 10:36:53
Size: 2273
Editor: 58
Comment:
Revision 21 as of 2008-08-06 16:35:53
Size: 3291
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
 1. Install necessary development packages:
  
{{{
This is a guide for compiling firefox 1.5.* on Ubuntu Breezy 5.10.

1. Install necessary development packages:{{{
Line 6: Line 7:
 1. Download and extract firefox source tar ball:
  
{{{
  $ wget ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5/firefox-1.5-source.tar.bz2
  $ tar jxvf firefox-1.5-source.tar.bz2
 1. Download and extract firefox source tar ball:{{{
  $ wget \
ht
tp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5.0.1/source/firefox-1.5.0.1-source.tar.bz2
  $ tar jxvf firefox-1.5.0.1-source.tar.bz2
Line 13: Line 14:
 1. Put the following .mozconfig file in the firefox source directory:
  
{{{
 1. Create the .mozconfig file in the firefox source directory:{{{
Line 16: Line 16:
. $topsrcdir/browser/config/mozconfig . \$topsrcdir/browser/config/mozconfig
Line 58: Line 58:
  '''Note:''' You may need to adapt the --enable-optimize gcc parameters to your own platform. Pay special attention to the "march" and "mtune" parameters. If they are speicified for the wrong architecture, you may not be able to compile Firefox. To see what architectures are available with gcc, type: {{{
man gcc
}}}
  and then navigate to the section titled "Intel 386 and AMD x86-64 Options." In this section is a list of supported architectures for the "march" and "mtune" options. Choose the option closest to your CPU.
Line 59: Line 63:
  '''Note:''' You may need to adapt the --enable-optimize gcc parameters for your own platform.

 1. Build firefox:
  {{{
 1. Build firefox:{{{
Line 68: Line 69:

== Third Party builds ==
If for some reason you do not want to go through the process of compiling Firefox but would like to enjoy the benefit of a gcc4 compiled build, you can visit the Mozillazine forum [[http://forums.mozillazine.org/viewforum.php?f=42|Third Party/Unofficial Builds]] section to look for pre-compiled builds made by third parties.

For example, in Ubuntu forum there is discussion on AthlonXP optimized gcc4 build such as [[http://www.ubuntuforums.org/showthread.php?t=142798|Swiftfox]].

This is a guide for compiling firefox 1.5.* on Ubuntu Breezy 5.10.

  1. Install necessary development packages:

      $ sudo apt-get install build-essential libgtk2.0-dev libidl-dev libxt-dev libgnomevfs2-dev
  2. Download and extract firefox source tar ball:

      $ wget \
    http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5.0.1/source/firefox-1.5.0.1-source.tar.bz2
      $ tar jxvf firefox-1.5.0.1-source.tar.bz2
      $ cd mozilla
  3. Create the .mozconfig file in the firefox source directory:

      $ cat > .mozconfig <<EOF
    . \$topsrcdir/browser/config/mozconfig
    
    export MOZILLA_OFFICIAL=1
    export BUILD_OFFICIAL=1
    mk_add_options MOZILLA_OFFICIAL=1
    mk_add_options BUILD_OFFICIAL=1
    ac_add_options --enable-official-branding
    
    mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-bin
    
    ac_add_options --enable-default-toolkit=gtk2
    ac_add_options --enable-pango
    ac_add_options --with-user-appdir=.mozilla
    ac_add_options --with-system-png=/usr
    ac_add_options --with-system-jpeg=/usr
    ac_add_options --enable-postscript
    ac_add_options --disable-installer
    ac_add_options --disable-xprint
    ac_add_options --enable-crypto
    ac_add_options --enable-strip-libs
    ac_add_options --enable-canvas
    ac_add_options --enable-svg
    ac_add_options --enable-svg-renderer=cairo
    ac_add_options --enable-system-cairo
    ac_add_options --enable-mathml
    ac_add_options --disable-tests
    ac_add_options --disable-gtktest
    ac_add_options --disable-debug
    ac_add_options --enable-xft
    ac_add_options --enable-optimize="-O3 -march=pentium-m -mtune=pentium-m -pipe -ftracer -fomit-frame-pointer"
    ac_add_options --with-system-zlib=/usr
    ac_add_options --without-system-nspr
    ac_add_options --enable-xinerama
    ac_add_options --enable-extensions=default
    ac_add_options --disable-pedantic
    ac_add_options --disable-long-long-warning
    ac_add_options --enable-single-profile
    ac_add_options --disable-profilesharing
    ac_add_options --enable-gnomevfs
    ac_add_options --disable-updater
    EOF
    • Note: You may need to adapt the --enable-optimize gcc parameters to your own platform. Pay special attention to the "march" and "mtune" parameters. If they are speicified for the wrong architecture, you may not be able to compile Firefox. To see what architectures are available with gcc, type:

      man gcc
      and then navigate to the section titled "Intel 386 and AMD x86-64 Options." In this section is a list of supported architectures for the "march" and "mtune" options. Choose the option closest to your CPU.
  4. Build firefox:

      $ make -f client.mk build
      $ make -C firefox-bin/browser/installer/
  5. Follow the instructions in FirefoxNewVersion to install your newly built firefox-1.5.*.tar.gz, which can be found in mozilla/firefox-bin/dist/.

Third Party builds

If for some reason you do not want to go through the process of compiling Firefox but would like to enjoy the benefit of a gcc4 compiled build, you can visit the Mozillazine forum Third Party/Unofficial Builds section to look for pre-compiled builds made by third parties.

For example, in Ubuntu forum there is discussion on AthlonXP optimized gcc4 build such as Swiftfox.

CompileFirefoxNewVersion (last edited 2008-08-06 16:35:53 by localhost)