Assignment 1 (cesar)

From CDOT Wiki
Jump to: navigation, search


This page outlines how to build firefox from CVS using Ubuntu 6.06. I am a complete newbie when it comes to ubuntu, I'm a slack guy. In here, I will discuss the steps required and the troubles that were encountered (you might be surprised).


The first step is go to mozilla and follow the links to Mozilla's Developer Centre and use their Mozilla's Build documentation to build the browser. Ubuntu does not come with many/any good developer tools, so we must extract the following from synaptics. But in order to use ubuntu, you need to figure out the root password, which you can't :

Can't access Ubuntu's root password to install programs.
Ubuntu doesn't have a root password per se. sudo instead

sudo dhclient

You'll have to sudo dhclient to access the internet. Now change that bloody su password. Go to synaptics and install the following :

libxt-dev (1.0.0)
libfreetype6 (2.1.10)
cvs ( If you have a different version, read the additional information in mozilla's build guide
autoconf (2.59) Not needed, and won't work apparently
g++ (3.3)
make (3.80)
g++ (4.0)

That's all I can gather from memory and logs. A lot of stuff is dependancies. The configure file will yell at you if you miss something.

Checking out the source

Before you checkout the source, check the tinderbox. I don't know why that isn't higher up in the wiki. Green is good, red bad, yellow is still building. Next, click this link to get the cvs command to checkout the source code. The first thing you should notice is that cvs hangs in the labs. You have to ssh tunnel to matrix than pull it from cvs :
terminal 1

ssh -L -l username username@matrix

terminal 2

cvs -d :pserver:anonymous:anonymous@localhost:/cvsroot co mozilla/

That will pull one important file. If you are on the internet long enough in the lab, you'll notice that things stop working. You can log in, but you can't visit any pages.
Internet suddenly stops working
There is no solution. ACS is an incurable disease.
(I kid you not) You have to renew your dhcpc leasetime, aparently after every ~800 seconds. Reissue dhclient command. I don't know what a good solution is.
Keep this in mind before checking out the source code. Continue with the instructions, change directory. Next you have to export an environment variable because you are using ssh tunneling rather than :

export CVSROOT=':pserver:anonymous:anonymous@localhost:/cvsroot'

Now issue the command

make -f checkout MOZ_CO_PROJECT=browser

checkout the browser. If you forget to checkout, make will recursively call itself. oops.


Create a mozconfig file. I did this as a . file in my home directory so I wouldn't accidently delete it. Double-check spelling

mk_add_options MOZ_OBJDIR=/home/username/mozobj
mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --enable-application=browser
ac_add_options --enable-debug
ac_add_options --enable-default-toolkit=gtk2 

Create a mozobj directory in your home directory. This is where all the object code goes (or should go).


Before you build, find an lengthy activity to engage in. Then export the following environment variables :

export MOZCONFIG='/home/username/.mozconfig'

This tells mozilla where the mozconfig file is. Issue the command to make.

make -f build

This should start configuring and build. In the above requirements, I meantioned I installed both libgtk-2.* and libgtk1.2; although on MDC it states that gtk2.0 is supported, I was getting complaints from config that it couldn't be found. After I installed gtk-1.2, the config stopped complaining.



A screenshot of the 'about firefox' link in the help menu is available here


I thought this would be a lot more difficult then it actually was. The summer students told me horror stories of trying to compile it for days. This leads me to believe that one or more of the following occured a) documentation has improved b) they exagerated c) they whine too much. Most of my difficulties were with ACS rather than Mozilla itself. And it worked when I first ran firefox. So very successful.