Tharatyn Assingment 1
Steps To Complete Build
1. Checked the Bon Echo source out of cvs
$ cvs -d :pserver:anonymous:firstname.lastname@example.org:/cvsroot co -r MOZILLA_1_8_BRANCH mozilla/client.mk $ cd mozilla $ make -f client.mk checkout
2. Wrote a mozconfig
mk_add_options MOZ_CO_PROJECT=browser mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/hopefullyWorked.firefox.optimized ac_add_options --enable-application=browser ac_add_options --enable-optimize ac_add_options --disable-debug ac_add_options --enable-svg ac_add_options --enable-canvas
3. Set the environment variable pointing to where the mozconfig is
$ export MOZCONFIG=`pwd`/mozconfig
$ make -f client.mk build
In order to do my build I needed the following Ubuntu packages:
I'd never done a build on Ubuntu before so I hit a few problems mainly to do with Ubuntu not coming with any development tools.
More detail here would be good (David.humphrey 14:16, 3 October 2006 (EDT))
I knew Ben Hearsum had recently built moz on Ubuntu so I went to talk to him on IRC and he told me the packages I needed (he didn't remember the exact names my self I had to use apt-cache search all by myself to figure it out)
Same issue here. This should be a living record so that someone doing a build on Ubuntu could use your doc. (David.humphrey 14:17, 3 October 2006 (EDT))
- Ben Hearsum
- http://developer.mozilla.org/en/docs/Mozilla_Source_Code_Via_CVS (I don't remember the cvs check out command)
- http://developer.mozilla.org/en/docs/Configuring_Build_Options (I don't remember the mozilla build config options)
- http://archive.ubuntu.com/ubuntu/ (location of Ubuntu packages)
This was not the first time I built a mozilla project (nor even firefox). The first time I built a moz project was on the last weekend of January 2006 when I wanted to learn about embedding Mozilla into other applications, I blogged the event saying (sic):
“It took me over four hours to figure out the foundations of writting an embedded Mozilla/Gecko application, download (the correct) source code, figure out how to compile Mozilla, and compile Mozilla. To be fair about one hour of this was spent compiling the Mozilla Application Suite (now called SeaMonkey). I’d like to write about each of the above points in turn.
First of all, I’d like to thank the people at the Mozilla IRC channels for being so nice and helpful.
I’ve tried building Mozilla before and I wasn’t looking forward to failing again. But this time, I figured, I could go to the IRC channel and hopefully get some help. I squared my shoulders gritted my teeth and downloaded Mozilla.1.7.8 source. Untar. Write a mozconfig file. Look for instructions on writting a mozconfig. Look around for better instructions on writting a mozconfig file. Shrug shoulders, think “oh, to hell with it at least I’ll have something to show the guys on IRC and have them correct”. I wrote a mozconfig file. Exported the location as a system variable (as per instructions) and ran “make -f client.mk build”. It broke after 10 minutes.
Slightly intimdated but still hopeful I fire up Chatzilla and go to the Seamonkey channel looking for help. I discover two things. Firstly, I’m not using the latest source (ignoring Seamonkey 1.0 Source which isn’t quite released yet). The latest version is 1.7.12. I never noticed since it’s listed above 1.7.8 in the ftp server. Not to mention the fact that it’s awkward to even find the source since it’s not under ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/source/. No, no, no it’s under ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7.12/source/. Like so many other things with programming, it makes sense (sorta) once you know about it. Secondly, I mention that it broke while compiling something to do with FreeType.
Mystic:the mozconfig file I wrote/copy/pasted doesn’t mention freetype at all.
biesi: you probably have to disable freetype
biesi: ac_add_options –disable-freetype2
biesi: (1.7.x does not like new freetype versions)
I’m not sure where this is documented but wherever it may be, biesi saved me hours. So I added the changes as per biesi’s recomendation’s and have a mozconfig file as follows:
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/hopefullyWorked (or whatever you want to name your object dir)
An hour of compiling and I built mozilla (see http://developer.mozilla.org/en/docs/Build_and_Install to find out how to run/install a build). That’s all well and good, ofcourse, but I don’t really feel closer to having built an application embedding Mozilla.
That’s pretty much all so far, but there will be more.”
Due to a delightful mix of improved documentation, improved source code, and improved experience, this build went much quicker than my first experience. In fact outside of the issues of not knowing about which packages were required this build was a breeze.