Difference between revisions of "Assignment 1 (cesar)"

From CDOT Wiki
Jump to: navigation, search
(Final-ish)
m (linked to screenshot)
 
Line 72: Line 72:
 
  <li> [[User:RealMarkP | Mark P]] for showing me how to ssh tunnel into matrix to checkout from cvs</li>
 
  <li> [[User:RealMarkP | Mark P]] for showing me how to ssh tunnel into matrix to checkout from cvs</li>
 
</ul>
 
</ul>
 +
 +
= Screenshot =
 +
A screenshot of the 'about firefox' link in the help menu is available [[media:Minefield%28cesar%29.png| here]]
  
 
= Conclusions =
 
= Conclusions =
 
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.
 
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.

Latest revision as of 17:21, 20 September 2006

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 guide
autoconf (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 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 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
There is no solution. ACS is an incurable disease.
Treatment
(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

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.

Resources

Screenshot

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

Conclusions

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.