Tuesday, September 2, 2008

How to run firefox3 on ubuntu edgy, feisty or dapper

OK, I've tried hard to find a way to run firefox3 on these ancient systems. Trying to search the net didn't help much, sadly.

This walkthrough will probably work on all old(er) linuxes, where you don't/can't upgrade just to get firefox3. The main issue is firefox3's dependency on a newer version of gtk, so we will compile one for ourselves and then set LD_LIBRARY_PATH to use our compiled libraries.

So, here it goes:

1. Download firefox3 from getfirefox.com.
2. Download source of atk at ubuntu.com.
3. Download source of cairo AND pixman at cairo's website.
4. Download source of gtk+, glib and pango at GTK's website.

Save all sources in your home dir.
Now, on to compiling (you can use any other path as destination, I'll use ~/firefox):


mkdir -p ~/firefox/src
export LD_LIBRARY_PATH=~/firefox/lib
export LDFLAGS=-L${HOME}/firefox/lib
export CPPFLAGS=-I${HOME}/firefox/include
export PKG_CONFIG_PATH=${HOME}/firefox/lib/pkgconfig/
export CFLAGS=-I${HOME}/firefox/include
cd ~/firefox
tar xvjf ~/firefox-3.0.1.tar.bz2 (or whatever version you've downloaded) (this will also create ~/firefox/firefox)
cd ~/firefox/src


Untar all source tarballs you've downloaded above - they will all create their own directories.
Now you've got atk, cairo, glib, gtk+, pango, pixman in ~/firefox/src.

Compile them each by executing:

cd (package dir)
./configure --prefix=$HOME/firefox
make
make install


The order of package compilation matters, the right order is: glib, pixman, cairo, pango, atk, gtk+.

If you're done, you can execute firefox like this:


LD_LIBRARY_PATH=~/firefox/lib ~/firefox/firefox/firefox


Of course you can organise the directories better if you wish - but for a quick, working firefox3 in your homedir the above is just fine.

Have fun!

1 comment:

Ardian said...

Should I download all sources of atk on the ubuntu hardy site, including libraries and development files ?