So, you’re really eager to try out the firefox 3.5 that is in beta stage right now eh?
The thought of exploring the web in the new feature-packed, open source
browser makes your brain neurons light up? Then, this guide is for
I’m going to show you how to compile firefox 3.5b4 from scratch…yup
that’s right, from scratch; Because nothing beats the feeling of
running a program that you compiled yourself, spending a whole week to
make it to compile by editing conf files and configure
scripts….whoops, that may be too much I don’t wanna scare you away
Don’t worry, this won’t be hard, it’s easy and all you need is 5 mins
(If we take out the download time and compile time of the source
that is :P).
Alright, lets start…woooo!
First of all, I recommend you create a new profile to test out the new firefox (without messing your current one).
Close all the firefox windows (save this text somplace first!) and open up a terminal and type:
NOTE: All the command I mention here begin with a ‘$’ symbol, you don’t
need to type the ‘$’, it’s just for telling that it’s a
command…so…don’t type it!
$ firefox -ProfileManager
And create a new profile (I made one named ‘Developer’).
Then you need to install the firefox build dependencies…
On Debian or Ubuntu systems you can do: $ sudo apt-get build-dep firefox-3.0n>
And install these as well: $ sudo apt-get install libcairo2 libcairo2-dev libasound2-dev libcurl4-openssl-dev libnotify-dev
On others…well, check your package manager…
Now, you need to do is download the source…
I recommend you download the source via FTP rather than CVS. Go here:
(Download the tar.bz2 file)
Extract the source to someplace convenient (I always use a source/ directory in my home folder to extract sources…)
Use this command: $ tar -zxf
You need to patch the source file ’cause it has a bug when you compile with the ‘–enable-system-cairo’ (See below).
Get the patch from here: https://bugzilla.mozilla.org/show_bug.cgi?id=466250
Save the patch file in your ‘mozilla-1.9.1′ directory (which would be created after you extract the source archive).
Execute the following command to patch the source:
$* patch -p1 < *
Alright, now we have the build dependencies and the source ready…
cd into the directory named ‘mozilla-1.9.1′
Now, use your fav text editor to make a .mozconfig file in the ‘mozilla-1.9.1′ directory.
I use ‘nano’ for simple editing…so I typed this:
$ nano .mozconfig
NOTE: You can use any filename, it’s not important…like ‘.mozblahblah’ or just ‘blahblah’ (without the ‘.’).
Put in the following inside the mozconfig file:
ac_add_options –enable-optimize –disable-debug
ac_add_options –enable-default-toolkit=cairo-gtk2 –enable-system-cairo
NOTE: For a complete list of build options, go here: https://developer.mozilla.org/en/ConfiguringBuildOptions
Here’s the explanations of the options I used:
mkaddoptions MOZCOPROJECT=browser – Means you’re tryng to build the browser
mkaddoptions MOZ_OBJDIR=@TOPSRCDIR@/ff-opt – You’re telling the compiler to create an OBJDIR
*ac_add_options –enable-application=browser *– Same thing as ‘mkaddoptions MOZCOPROJECT=browser’
acaddoptions –disable-tests – (Recommended) This will tell the scripts, not to compile tests that come with the source, this will save a LOT of time and diskspace.
acaddoptions –enable-optimize –disable-debug – This will enable code optimization and disable adding of debugging symbols (reduces the size of the executable).
acaddoptions –enable-default-toolkit=cairo-gtk2 –enable-system-cairo – This will use the cairo engine (nice fonts! )
Now, you need to do is, export the variable named ‘MOZCONFIG’, this will tell the make scripts that path of your mozconfig file.
$ export MOZCONFIG=/path/to/your/mozconfig/filestreaming film Creed 2015
eg: export MOZCONFIG=/home/john/source/mozilla-1.9.1/.mozconfig
Now, you’re ready to compile!
NOTE: This will take some time to build…yup, ever compiled the linux kernel? Yup, this will take as much time as it takes to compile a kernel (I think)
To build the browser, do this: $ make -f client.mk build
NOTE: If you have a multi-core processor, you can speed up the build by
specifying an additional option ‘-j N’ where N is the no. of cores in
your processor + 1.
eg: For dual core processors: $ make -j 3 -f client.mk build
Now, sit back, relax, listen to some music, call your gf and talk about her new shoes…or take her shopping
After the build is complete (woohoo! PS: If you took your gf shopping, then I’d recommend you to stop now and check your credit card bills first…)
You can test out the firefox right now! wooo!
cd into the directory ‘mozilla-1.9.1/ff-opt/dist/bin’ and there run the executable ‘firefox’.
$ cd mozilla-1.9.1/ff-opt/dist/bin
$ ./firefox -P
eg.: $ ./firefox -P Developer
NOTE: Close all running firefox’s and then run the new firefox build, otherwise it will just open up a new window…
If all went well, you should see a shiny new firefox running on your system! Oh Yeah!!
WOW! Looks nice doesn’t it?
Congrats! You built yourself a new firefox…completely from scratch! No need for any third party to compile it for you, now all you need to do is package the build
$ cd mozilla-1.9.1/ff-opt/
$ make package
The new package will be located in ‘ff-opt/dist/’
And there you go! You have a brand new beta version of firefox, ready to be distributed to others!
You can download my packaged build here: http://www.mediafire.com/file/ymamnkrjh42/firefox-3.5b4.en-US.linux-i686.tar.bz2