Assignment 1 (cesar)
Overview
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).
Requirements
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 :
Problem Can't access Ubuntu's root password to install programs. Solution 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) libgtk2.0-* cvs (1.1.12.8-17) If you have a different version, read the additional information in mozilla's build guideautoconf (2.59)Not needed, and won't work apparently g++ (3.3) gcc-3.3 make (3.80) g++ (4.0) gcc-4.0 build-esssentials(11.1) libgtk-1.2 libgtk-1.2-common
That's all I can gather from my logs that I remember. 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 2401:cvs-mirror.mozilla.org:2401 -l username username@matrix
terminal 2
cvs -d :pserver:anonymous:anonymous@localhost:/cvsroot co mozilla/client.mk
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. Problem Internet suddenly stops working Solution (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 cvs-mirror.mozilla.org :
export CVSROOT=':pserver:anonymous:anonymous@localhost:/cvsroot'
Now issue the command
make -f client.mk checkout MOZ_CO_PROJECT=browser
checkout the browser. If you forget to checkout, make will recursively call itself. oops.
Configuring
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).
Building
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 client.mk build