GuestbookSign our guestbook ContactGet in touch with the authors ArchiveAll unixwerk articles since 2003
November 30, 2008

Installing Firefox 3 on Slackware 11.0

Contents

  1. Introduction
  2. Requirements
  3. Building gtk+ 2.10
  4. Starting Firefox 3

1. Introduction

Error Message when starting FF3

 

Firefox 3 is out and no one knows how long Mozilla supports Firefox 2 for security updates. And since the Internet and in particular browser software is exposed to any kind of attacks this is a critical point.

Since Firefox 3 is supported for Windows down to Windows 2000 I was confident it will work on a two years old Slackware Linux system. So I downloaded the new Firefox and installed it under /opt/firefox:

$ cd /opt
$ tar xvjf /tmp/firefox-3.0.4.tar.bz2

Starting it by

$ cd /opt/firefox
$ ./firefox &

was quite disappointing. The only thing I got was a window telling me my gtk+ version is not sufficient.

Knowing this you have three options:

  1. Upgrading your Linux installation to a higher version (Slackware 11 -> 12.1)
  2. Stick to Firefox 2 and hope it will be supported
  3. Upgrade your gtk+ libraries

If you don't want to go for option 1 or 2 you have to upgrade GTK+! This article describes how this can be done on Systems running Slackware 11.0 without interfering with your other gtk based software.

2. Requirements

A typical Slackware installation comes with a complete development environment. The C++ compiler as well as all development libraries should be already in place. If the C++ compiler is missing on your system install it from the d series.

There is one exception. Slackware 11.0 lacks pkg-config that has to be installed from the sourcesı:

root@darkstar# tar xvzf pkg-config-0.21.tar.gz
root@darkstar# cd pkg-config-0.21
root@darkstar# ./configure
root@darkstar# make
root@darkstar# make install

You find pkg-config under /usr/local/bin/pkg-config


ıYou can download pkg-config from pkgconfig.freedesktop.org

3. Building gtk+ 2.10

In order to build the new gtk+ libraries we need to download the sources of 5 packages:

The latest sources for glib, atk, pango, and gtk+ can be found at ftp.gnome.org/pub/GNOME/sources or official mirrors. The cairo sources can be found at cairographics.org/releases.

Once you have them, we can start the build process. The idea is to put all the special libraries in a separate place, let's say under /opt/gtk-ff2. We have to start with the glib2 package:

user@darkstar$ tar xvjf glib-2.12.13.tar.bz2
user@darkstar$ cd glib-2.12.13
user@darkstar$ ./configure --help
user@darkstar$ ./configure --prefix=/opt/gtk-ff3
user@darkstar$ make
user@darkstar$ sudo make install
user@darkstar$ cd ..

Now we have to set some environment variables - so the build scripts can find the new glib2 version:

user@darkstar$ export  PKG_CONFIG_PATH=/opt/gtk-ff3/lib/pkgconfig
user@darkstar$ export LD_LIBRARY_PATH=/opt/gtk-ff3/lib
user@darkstar$ export PATH=/opt/gtk-ff3/bin:$PATH

and we can proceed with the other packages. Please note:

We start the build process of the other 4 packages, starting with atk

user@darkstar$ tar xvjf atk-1.19.6.tar.bz2
user@darkstar$ cd atk-1.19.6/
user@darkstar$ ./configure --prefix=/opt/gtk-ff3
user@darkstar$ make
user@darkstar$ sudo make install
user@darkstar$ cd ..

cairo...

user@darkstar$ tar xvzf cairo-1.4.10.tar.gz
user@darkstar$ cd cairo-1.4.10/
user@darkstar$ make clean
user@darkstar$ ./configure --prefix=/opt/gtk-ff3
user@darkstar$ make
user@darkstar$ sudo make install
user@darkstar$ cd ..

pango...

user@darkstar$ tar xvjf pango-1.17.5.tar.bz2
user@darkstar$ cd pango-1.17.5/
user@darkstar$ ./configure --prefix=/opt/gtk-ff3
user@darkstar$ make
user@darkstar$ sudo make install
user@darkstar$ cd ..

and finally gtk+...

user@darkstar$ tar xvjf gtk+-2.10.14.tar.bz2
user@darkstar$ ./configure --prefix=/opt/gtk-ff3
user@darkstar$ cd gtk+-2.10.14/
user@darkstar$ ./configure --prefix=/opt/gtk-ff3
user@darkstar$ make
user@darkstar$ sudo make install
user@darkstar$ cd ..

4. Starting Firefrox 3

Forgotten why we did all this? We want to start firefox. Assuming it is installed under /opt/firefox we first have to point the LD_LIBRARY_PATH> to our new gtk+ libraries:

user@darkstar$ export LD_LIBRARY_PATH=/opt/gtk-ff3/lib
user@darkstar$ /opt/firefox/firefox &

Of course you want to put this into a small script...

And don't worry - this way firefox works quite fine and stable. I had no trouble at all.