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 co mozilla/
cd mozilla
make -f 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 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!


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: =========
======= 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/
7f09c4d1a000-7f09c4f19000 ---p 00005000 08:02 172630 /usr/lib/
7f09c4f19000-7f09c4f1a000 rw-p 00004000 08:02 172630 /usr/lib/
7f09c4f1a000-7f09c4f1c000 r-xp 00000000 08:02 172619 /usr/lib/
7f09c4f1c000-7f09c511b000 ---p 00002000 08:02 172619 /usr/lib/
7f09c511b000-7f09c511c000 rw-p 00001000 08:02 172619 /usr/lib/


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.
Bruno Martins 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-

But jssh is still not running 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.
troelskn said…
I had a small problem on ubuntu. The following patch fixed it for me:
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