Building Mozilla Firefox

Installing mozilla from source – an unexpected challenge I faced while trying to bring my contribution to the open source world (this is the first large program that I built from source code).
First error(just an unmet dependency):
autoconf 2.13 not found (something similar to this)

apt-get install autoconf2.13

0:14.05 configure:17480: checking for gtk+-2.0 >= 2.18.0 gtk+-unix-print-2.0 glib-2.0 gobject-2.0 gdk-x11-2.0
0:14.05 configure: error: Library requirements (gtk+-2.0 >= 2.18.0 gtk+-unix-print-2.0 glib-2.0 gobject-2.0 gdk-x11-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.

I started installing GTK+ (and plenty of dependencies)
For one particular dependency (pango) I got this error:

./.libs/ undefined reference to `g_string_printfa’


Luckly I solved the problem by installing libgtk2.0-dev.

sudo apt-get install libgtk2.0-dev

Then: installed yasm, libasound2-dev, libpulse-dev, gstreamer and gstreamer plugin base 1.4.5(and some dependencies for it)

The gstreamer installation failed to work with the Mozilla installer:

configure:21625: checking for gstreamer-0.10 >= 0.10.25
0:05.32                       gstreamer-app-0.10
0:05.32                       gstreamer-plugins-base-0.10
0:05.32 configure: error: gstreamer and gstreamer-plugins-base development packages are needed to build gstreamer backend. Install them or disable gstreamer support with –disable-gstreamer

Then I found out that gstreamer 0.11 and 1.0 are kind of like two completely different libraries, not just different versions. So I uninstalled those two and installed 0.11 versions….or tried to.
gstream gave the error:

Makefile:534: recipe for target ‘’ failed
make[3]: *** [] Error 1


So…I finally installed from packages:

sudo add-apt-repository ppa:gstreamer-developers/ppa
sudo apt-get update
sudo apt-get install gstreamer-0.10

However, I didn’t know the name of the package that contained the plugin base for gstreamer so instead of wasting time searching I installed it from source.

But of course…this happened the I tried to build it:

make[3]: Entering directory ‘/home/smith/openSource/gst-plugins-base-0.11.99/gst-libs/gst/tag’
CC     libgsttag_1.0_la-gstvorbistag.lo
gstvorbistag.c:39:30: fatal error: gst/gsttagsetter.h: No such file or directory
#include <gst/gsttagsetter.h>
compilation terminated.

apt-cache search -n gstreamer0.10-plugins

It turned out the plugins base was installed already, but the Mozilla install still complained about gstreamer not being installed.

Then I found out that I can make Mozilla use gstreamer1.0 instead of 0.10. I installed all gstreamer1.0 libraries again:
sudo apt-get install gstreamer1.0*

and added to the configuration file mozconfig this:

ac_add_options –enable-gstreamer=1.0

only to run into this:

0:05.41 configure:21625: checking for gstreamer-1.0 >= 1.0
0:05.41                       gstreamer-app-1.0
0:05.41                       gstreamer-plugins-base-1.0
0:05.41 configure: error: gstreamer and gstreamer-plugins-base development packages are needed to build gstreamer backend. Install them or disable gstreamer support with –disable-gstreamer

Exporting gstreamer path did not help:
export PATH=$PATH:/usr/lib/gstreamer-1.0

I went mad and run: sudo apt-get install libgstreamer-*
I noticed the that despite all the previous installations, there were still 4-5 plugin libraries not installed.

This finally installed gstream completly:
sudo apt-get install libgstreamer-plugins-*

sudo apt-get install libxt-dev

Finally, 40 minutes later (!!!) Firefox nightly was up and running :).

Part II:

I have somehow managed to completely break my system installing mozilla, ubuntu si somehow dead regarding the GUI, no window bars or unity / gnome interface works any more and the icons are blank white.

Installed a fresh Ubuntu 14.10(the only version where my trackpad works well) and started again. This time I’ve only got one single kind of error:

The following packages have unmet dependencies:
libcairo2-dev : Depends: libcairo2 (= 1.13.0~20140204-0ubuntu1) but 1.13.0~20140204-0ubuntu1.1 is installed.
Depends: libcairo-gobject2 (= 1.13.0~20140204-0ubuntu1) but 1.13.0~20140204-0ubuntu1.1 is installed.

Not only with libcairo but with some others as well. After some struggle I discovered that this means my libs are too new and had to downgrade them.

sudo apt-get install libcairo2=1.13.0~20140204-0ubuntu1
sudo apt-get install libcairo-gobject2=1.13.0~20140204-0ubuntu1
sudo apt-get install libcairo2-dev
sudo apt-get install libgtk2.0-dev
sudo apt-get install libdbus-1-dev
Had to download dbus-glib-0.104 from official website and install manually.
sudo apt-get install yasm
sudo apt-get install libasound2-dev
sudo apt-get install libpulse-dev
sudo apt-get install gstreamer0.10 (<- probably not necessary)
sudo apt-get install libgstreamer-plugins-base0.10-*
sudo apt-get install libxt-dev



As I briefly mentioned above I managed to break Ubuntu while building Mozilla Firefox, to be more precise: Ubuntu had no side bar, there were no window bars and the ctrl + alt + t shortcut did not work. Also, the icons were all wrong (blank or error like). I did however get an error from Ubuntu that told me about two libs from /usr/local/lib that might be the cause of my my problems. After deleting those the icons were back to normal. Fortunately I came across this page which solved the last nasty bit about the interface:

I will copy it here:

  1. Log into unity.
  2. Right click on the desktop and create a new folder.
  3. Open the folder and go to /usr/bin and start gnome-terminal by clicking on it.
  4. Type ccsm in the terminal to start compiz config settings manager.
  5. Go to preferences -> plugin list.
  6. Uncheck the automatic plugin list. And enable all the plugins.

As a matter of fact, activating unity-shell plugin was the only thing I needed.