Compile Firefox from Scratch

This guide explains how to compile firefox on ubuntu with optional jssh support.

Install dependencies

Execute following command to install necessary headers required to build Firefox.

sudo apt-get build-dep firefox-3.0

Fetch sources

Execute following commands to checkout latest sources from Mozilla cvs.

cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk
cd mozilla
make -f client.mk checkout MOZ_CO_PROJECT=browser

Specify build options

Create a new file named .mozconfig in current directory and copy paste the following build options into it.

mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-jssh
ac_add_options --enable-extensions=default,jssh,webservices
ac_add_options --enable-application=browser

Build the Browser

make -f client.mk build

Run the browser

./mozilla/firefox-jssh/dist/bin/firefox -jssh

Check whether jssh is working or not by telnet into it.

telnet localhost 9997

Now you should see the message "Welcome to the Mozilla JavaScript Shell!" in your telnet session. Thats it!

Comments

Anonymous said…
Didn't work for me. It all compiled fine and I made the package but when I try to run it I got:

*** buffer overflow detected ***: ./mozilla/firefox-jssh/dist/bin/firefox-bin terminated
======= Backtrace: =========
/lib/libc.so.6(__fortify_fail+0x37)[0x7f09c9243887]
/lib/libc.so.6[0x7f09c9241750]
/lib/libc.so.6[0x7f09c9241e0b]
./mozilla/firefox-jssh/dist/bin/libxul.so(XRE_GetBinaryPath+0x4d)[0x7f09cd6ac2c7]
./mozilla/firefox-jssh/dist/bin/firefox-bin[0x400e9e]
/lib/libc.so.6(__libc_start_main+0xe6)[0x7f09c9162466]
./mozilla/firefox-jssh/dist/bin/firefox-bin[0x400cf9]
======= Memory map: ========
00400000-00402000 r-xp 00000000 08:05 1167949 /home/oliver/mozilla/firefox-jssh/dist/bin/firefox-bin
00602000-00603000 r--p 00002000 08:05 1167949 /home/oliver/mozilla/firefox-jssh/dist/bin/firefox-bin
00603000-00604000 rw-p 00003000 08:05 1167949 /home/oliver/mozilla/firefox-jssh/dist/bin/firefox-bin
7f09c4c00000-7f09c4d00000 rw-p 7f09c4c00000 00:00 0
7f09c4d15000-7f09c4d1a000 r-xp 00000000 08:02 172630 /usr/lib/libXdmcp.so.6.0.0
7f09c4d1a000-7f09c4f19000 ---p 00005000 08:02 172630 /usr/lib/libXdmcp.so.6.0.0
7f09c4f19000-7f09c4f1a000 rw-p 00004000 08:02 172630 /usr/lib/libXdmcp.so.6.0.0
7f09c4f1a000-7f09c4f1c000 r-xp 00000000 08:02 172619 /usr/lib/libXau.so.6.0.0
7f09c4f1c000-7f09c511b000 ---p 00002000 08:02 172619 /usr/lib/libXau.so.6.0.0
7f09c511b000-7f09c511c000 rw-p 00001000 08:02 172619 /usr/lib/libXau.so.6.0.0


etc............

Even when I used the standard .mozconfig from the Mozilla site I still got this. Some kind of library conflict or something. This is in Intrepid 64-bit.
Anonymous said…
Facing same issue on Intrepid 32bit machine. Mozilla started using Mercurial for newer sources will try pin point the issue.
Anonymous said…
Same problem here, although I manged to get firefox-bin to run, I had to make symbolic links to .so files located in /usr/lib/xulrunner-1.9.0.4

But jssh is still not running
Anonymous said…
Worked out of the box, on Fedora9
Anonymous said…
Nice fill someone in on and this post helped me alot in my college assignement. Thanks you as your information.
Unknown said…
I had a small problem on ubuntu. The following patch fixed it for me: http://code.google.com/p/google-breakpad/issues/detail?id=305
Anonymous said…
отличный сайт!
toshi said…
Thanks! Article helped me a lot. I never built mozilla extended installation from source before!

Popular posts from this blog

Easy network traffic shaping on your ubuntu system

winetricks - install wine application perquisites with ease

Multi touch for any,all synaptics touchpad