Well I must say I had a few bumps here and there but after following the instructions from Mozilla it all ended up well. Following these steps should result in a nice compile of Firefox Minefield.
- Run the following command to install any missing packages, all packages are required. (Note that I’ve included some packages that you may already have, therefore this command “should” work on any recent Linux install. This is all one line.)
- Next, check out a single file using this command. It will be used to run the main checkout/build. (note that this is all one line, thanks to Ian for pointing that out)
- Change directories to the new checkout.
- Proceed to checkout Firefox with the following command (Note that this will likely take some time)
- You will now require one more items to make it all work (at least well). For a start you will need a
.mozconfig
file (note the dot in front). This file will input command line options for you so you won’t have to. The Mozilla Build Configurator website will automatically generate one for you with any of the options you wish for. I’ve also made a generic file that you can use below. If you’re using the Mozilla directory for your CVS checkout like specified above then create the.mozconfig
file there and paste the following: - Now you can finally build it! Change to your mozilla root directory (this how to uses the default:
mozilla
) and run the following:
make -f client.mk build
Note: To time your compile addtime
to the front like so:
time make -f client.mk build - You can now run Firefox “Minefileld” edition by going to the obj-something directory. this will change according to what your computer is. So as long as it says obj- in front its the right one. Therefore the path should be something like
Afterwards simple run the “firefox” script (not the file) to use ff3!!!
mozilla/obj-i686-pc-linux-gnu/dist/bin
Note: Please inform me of corrections if needed. Full how-to can be found on Mozilla’s Build Documentation
website.
sudo apt-get install gcc g++ perl make cvs libxt-dev libidl0 libidl-dev libfreetype6 fontconfig
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk
cd mozilla
make -f client.mk checkout MOZ_CO_PROJECT=browser
To check out different projects from source simply change the MOZ_CO_PROJECT variable to the desired project. They are all listed here.
#
# See http://www.mozilla.org/build/ for build instructions.
#
# Options for client.mk.
mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@
# Options for 'configure' (same as command-line options).
ac_add_options ––enable-application=browser
18 comments
Comments feed for this article
October 26, 2007 at 4:29 am
ian
Awesome mate! thanks for that! In step 3 you might want to escape the double dash before enable because if you cut and paste it directly it doesn’t work.
also the first cv command is split over two lines and isn’t necessarily obvious
cheers!
October 29, 2007 at 1:37 pm
Dominic Baranski
Thanks for the info, I’ve updated the how-to with your notes. (Note that I “believe” I fixed your first point, however, I wasn’t sure what dash you were referring to exactly. If its still there please tell me and I’ll fix it up)
October 30, 2007 at 6:57 pm
Anders
I think he means the dash in:
ac_add_options –enable-application=browser
there should be two hyphens before enable
October 31, 2007 at 7:59 pm
Dominic Baranski
Ah, you’re absolutely right. Fixed.
(Word press interpreted my two dashes as one, even in a code block)
November 2, 2007 at 5:52 pm
The Fact
Omg, was searching for this info for a month! Thank you very much, really appreciate it.
P.S Ubuntu ownz!
November 4, 2007 at 12:42 pm
Dominic Baranski
Glad to have helped 🙂
November 18, 2007 at 2:18 pm
onidlo
Hi,
the correct name of the config file is .mozconfig.
Onidlo
November 18, 2007 at 9:38 pm
Dominic Baranski
Fixed, thank you. (Updated some parts for clarity as well)
March 16, 2008 at 12:15 am
Arun
On building firefox 3 beta 4 in Ubuntu 7.10
I am getting following error:
checking for gtk+-2.0 >= 1.8.0 gtk+-unix-print-2.0 gdk-x11-2.0 glib-2.0 gobject-2.0… Package gtk+-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gtk+-2.0.pc’ to the PKG_CONFIG_PATH environment variable No package ‘gtk+-2.0′ found Package gtk+-unix-print-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gtk+-unix-print-2.0.pc’ to the PKG_CONFIG_PATH environment variable No package ‘gtk+-unix-print-2.0′ found Package gdk-x11-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gdk-x11-2.0.pc’ to the PKG_CONFIG_PATH environment variable No package ‘gdk-x11-2.0’ found
configure: error: Library requirements (gtk+-2.0 >= 1.8.0 gtk+-unix-print-2.0 gdk-x11-2.0 glib-2.0 gobject-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
*** Fix above errors and then restart with “make -f client.mk build”
Not able find what this means in google. What could be the missing package? Any idea on this?
March 17, 2008 at 4:29 pm
Dominic Baranski
hmm.. Well my tutorial should still work for the most part, though it is outdated a bit. For any dependency packages try running this:
apt-get build-dep firefox -or- apt-get build-dep mozilla-firefox
and
sudo apt-get install libdbus-glib-1-dev curl
Also make sure that the Firefox tree is “green” and not “broken” on http://tinderbox.mozilla.org/Firefox/ when you’re checking out the code..
and finally, try http://developer.mozilla.org/en/docs/Linux_Build_Prerequisites if you still need some clarification on building Firefox in a UNIX environment.
March 23, 2008 at 11:45 pm
Arun
Thanks Dominic. I will give it a try. I have taken release source, so the code would not be broken one.
April 18, 2008 at 2:49 am
Sofyan AI
I add this to .mozconfig
after have error
ac_add_options –disable-crashreporter
May 15, 2008 at 1:19 pm
Fatman
Sofyan, install libcurl-dev. You will not have to disable the crash reporter.
August 25, 2008 at 11:49 am
Sarsura
thank you very much for this tutorial 🙂
October 24, 2008 at 11:56 am
Thinman
There is something wrong about the last line of the .mozconfig example in step 5.
The two hyphens before ‘enable’ looks like two hyphens but they are something else.
Copy the last line of .mozconfig example and paste it to a terminal and you’ll see something’s wrong.
Open this page with firefox and try to find the word ‘–enable’ (without quotes) using ctrl+F or /, firefox won’t match it on the last line.
December 16, 2008 at 12:29 am
Taylor
I continued to have troubles with the .mozconfig until I manually retyped in the last line of the file. After that, it worked fine! Just in case anyone else has the same trouble.
October 9, 2009 at 4:12 pm
Building on Ubuntu 9.04 « Anna on Stuff (Processing.js/Open Source)
[…] PS. i got some help from another blogger. If u dont understand my stuff check out https://dbaranski.wordpress.com/2007/09/19/building-firefox-on-ubuntu […]
October 25, 2010 at 5:54 pm
Mozilla Firefox質問スレッド(初心者歓迎)の54 | ソフトウェア@質問.COM
[…] […]