Changes

Jump to: navigation, search

User:Melz/Assignment1

3,802 bytes added, 18:47, 18 September 2006
Screenshot: - added image
After reading some suggestions, I decided to go for the bleeding edge builds on CVS. Apparently [[User:Mylau|mylau]] faced a number of issues while building from the stable source archive, and Vlad's suggestion was to go with CVS to avoid those headaches.
I also spent some time reading the [http://developer.mozilla.org/en/docs/Build_Documentation build documentation] at [http://developer.mozilla.org/ MDC]. It's probably the best place to startget started since it covers the entire building process.
==Getting the required dependencies==
The default installation of Ubuntu 6.06 was rather bareboned for developers. I had to install some required tools to get started, namely the gcc compiler and cvs. Now I'm ready to check out some code and compile stuff! After getting the green light on Tinderbox, I proceeded by executing the following command: <pre>cvs -d :pserver:anonymous:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk</pre> Unfortunately, that command just hung there. CVS wasn't checking out anything. I double-checked the [http://developer.mozilla.org/en/docs/Mozilla_Source_Code_Via_CVS#Requirements documentation] and apparently cvs 1.12.9 was reported to work fine. After spending an hour looking around, I came to the conclusion that the college labs had the cvs port blocked. Now I had to resort to downloading the source and compiling it on my old computer at home. ==Configuring and Building==The second attempt to check out the source from CVS was sucessful. So it was the college firewall that was causing problems earlier. Next, I had to configure the build options. I went ahead with the sample .mozconfig included in the build documentation: <pre>. $topsrcdir/browser/config/mozconfigmk_add_options MOZ_OBJDIR=@TOPSRCDIR@/ff-opt-staticac_add_options --enable-optimizeac_add_options --disable-debugac_add_options --enable-staticac_add_options --disable-sharedac_add_options --disable-testsmk_add_options MOZ_CO_PROJECT=browser</pre> Everything seems ready. So I started compiling:
<pre>
sudo aptmake -get install cvs gccf client.mk build
</pre>
Now I'm ready to check out some code and compile stuff! After getting the green light on Tinderbox, I proceeded by executing ... which then died at the following commandpre-requisite check:
<pre>
cvs checking for gtk+-d :pserver:anonymous:anonymous@cvs2.0 >= 1.3.7 gdk-mirrorx11-2.0 glib-2.0 gobject-2.0.mozilla.org:/cvsroot co mozilla/client.mk
</pre>
Browsing through the IRC logs, I realized I needed to install a few more dependencies, specifically '''libgtk-dev''' and '''libidl-dev'''. After that, everything went chugging along ... or so it seemed==Wrapping things up==Since my computer was <strike>pretty</strike> really slow, I left it compiling overnightWhen I woke up, the build process had died prematurely.I googled the error message and there wasn't much of a solution to the problem other than reinstalling gcc. Since memory was an issue here, I assumed it must have "crashed" due to lack of memory. So I ran the build command again and the build process picked up from where it ended. I concluded that it really was due to lack of memory. This problem continued to occur several times after (each time at different points of the code, but with the same error code). Slowly, I approached the final goal. Unexpectedly, the last linking part keeps crashing my terminal window so I couldn'more t proceed further. Since Gnome probably sucks up enough memory by itself, I decided to switch to come'console mode (I know, why didn't I think about it before?). After I did that, I killed both the Gnome Display Manager (gdm) and VMWare (since it was running as well). I crossed my fingers and started building again. And it finally completed sucessfully. Phew!
=Screenshot=
Here's the a screenshot of the Help > About Mozilla Firefox dialog for my custom build I compiled:
''(to be uploaded)''[[Image:Melz_ff3ss.png]]
=Conclusion=
Overall, I think it was quite an interesting adventure, having compiled my own custom build of Firefox. This is the first GUI application I ever compiled on Linux and I must admit it also has the largest codebase I ever handled for a single application.
 
Along the way, I picked up a lot of useful knowledge, particularly those relating to maximizing my Linux experience. I'm not covering them in this report since the topics I had to delve into ranged from changing boot options all the way to simple commands for switching to console mode.
 
However, I definitely would want to rebuild the source tree again sometime soon because I broke a number of "rules" by not cleaning up my object folder after a compile error. Obviously, I was playing with fire by doing so, but since I didn't want to spend extra time re-compiling everything, I went ahead and risked it. In fact, I'm still amazed I successfully built Firefox from CVS that way.
 
This entire build process wouldn't have been successful without help from the various people at the #seneca IRC channel, the build documentation at Mozilla Developer Centre, and good 'ol trusty Google. Thanks for all your help!
1
edit

Navigation menu