Monday, October 1, 2007

Creating a Debug Mozilla Build

My initial attempts of creating a debug Mozilla build was a pretty rough ride that ended in a terrible crash. At first, I had to download and install the Visual Studios 2005 which took me about 2 days. After I got my computer set up to the point where I can start following the steps for "Building Mozilla for the first time." I realized I was way over my head.

I have never built anything this big from source before so my inexperience proved to be a liability. As hard as I tried to follow the instructions, in the end I was still unsuccessful with compiling the source. My two attempts ended with memory accessing errors. I looked at my task manager and it was bombarded with make.exe that took up around 1.7MB but there were several hundred of them which in the end ate up all of the memory I had on my laptop (~2GB).

Fortunately, we did a build in our lab class and although I built the debug Mozilla build on Linux (much faster than Windows) I was able to transfer the knowledge so that my third attempt at building Mozilla at home was finally successful.

The two problems that I identified was that I had some mistypes in my "check out" statement so I never actually downloading the Mozilla source. The second problem was that my .mozconfig did not specify any project. All it had was:

# Add options
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@

# Optimization
ac_add_options --disable-optimize
ac_add_options --enable-debug
ac_add_options --disable-static --enable-shared

The combination of those two problems, I think, caused the program to continuously looping, creating make.exe until my machine ran out of RAM which took about six hours for each attempt.

No comments: