Thursday, September 13, 2012

Building firefox

First attempt was to clone the repo at Seneca on the wireless connection. This failed because the wireless is slow and I didn't have the time to sit around and wait for it to download.
So then I did it at home. I forked and cloned the mozilla-central repo and then started doing the build pre-requisite steps.

I entered the command to update macports (a very old version of which was on my machine) and then waited while it did its thing. Then it refused to update properly because it had a really old version of ncurses and apparently it switched development branches or something at some point and couldn't autoupdate it. So I decided not to bother changing that.

So I used homebrew instead to do the prerequisites and, after removing macports, it worked really well.

Then the compilation failed because I had xcode 3 installed on my machine and it needed xcode 4. Which I can't get because it requires that you have OSX 10.7 installed. Which I can't do because my mac has a 32 bit processor and 10.7 requires 64 bits.

Not seeing any way around this I decided to do it on my windows machine instead. I installed visual studio 2010, the directx sdk, and then the mozilla build package, and used git to clone my fork of mozilla-central. I then attempted to build it and ran into an error.

The error was "This source tree appears to have windows-style line endings. To convert it to Unix-style line endings, run "python mozilla/build/wind32/mozilla-dos2unix.py".
The problem is that that file doesn't exist.

So I fixed the error by following the instructions at help.github.com/articles/dealing-with-line-endings to change the git global configuration to unix style endings and then reset the working tree. This time it compiled without any problems, and it took around an hour to finish. Here is a screenshot of the result.