User:Vpmirand/Assignment1
!!WORK IN PROGRESS!!
Contents
Introduction
I first started off building Firefox on my Windows XP Professional machine using Visual Studio.Net 2003. Unfortunately I had some problems along the way and solved them by using Google.com and by asking for help in the IRC chat. When I finally built Firefox I tried to run it but wasn’t successful because it crashed on me. So I tried building it on two other hard drives and I got the same error. Since I was short on time I decided to give Linux a try and see if I would be more successful with building Firefox on a Linux operating system.
I was finally able to build Firefox successfully on Ubuntu, which took me about one night to do. This document will cover the build requirements such as hardware and software that I needed in order to build Firefox successfully. I will then discuss the steps that took me to fully complete the build and any problems that I encountered along the way. I will end it off with some useful resources that I found and used throughout the process of the build and then talk about my experience with my first open source build.
Requirements
Hardware
My computer system:
Intel Pentium 3 Processor 450 Mhz 256 MB RAM 40 Gigabyte Hard Drive Ubuntu
Software
Before I could install any packages or libraries I had to install build-essential, which is the synaptic package manager (i.e. Library Manager). Once I got this installed I looked at Linux Build Prerequisites to find out which libraries I needed. The following are a list of the libraries that I installed.
- CVS
- GTK (2.0)
- Libxt-dev
- Libidl-dev
- Make
The Build
When I ran the build for the first time on Ubuntu I was bound to come in contact with some errors. The first time I ran the build I encountered an error to do with missing packages. Once that got resolved I ran the build a second time and came across another error to do with another missing package. After getting the last package installed I ran the build a third time and finally got the build to complete without any more errors.
Steps Took to Complete Build
- Asked Mike Lau a few questions about Ubuntu.
- Installed the build –essential, which is the synaptic package manager (i.e. Library Manager).
sudo apt-get install build-essential
- Installed the CVS library, from the synaptic package manager.
- Added environment variables to my environment script ( /etc/environment)
CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot CVS_RSH=ssh
- Logged into Mozilla CVS Repository.
cvs login
- Checked out the build script
cvs co mozilla/browser/config mozilla/client.mk
- Created my .mozconfig file.
# Building Firefox Trunk with Debugging . $topsrcdir/browser/config/mozconfig
- Checked out the full source code.
make -f client.mk checkout
- Started build for Firefox.
make -f client.mk build
- Received an error during my build. The error stated that my /usr/bin/pkg-config was not found.
- I knew I was missing a package but I wasn’t sure what the name of the package was. So I used Google to see if I could find a solution. I didn’t find any useful links so I asked Mike Lau if he had come across any errors like the one I had.
- After speaking with Mike Lau, I got the packages that I needed.
- I Installed packages libidl-dev and libgtk2.0-dev from the synaptic package manager.
- After installing the packages I tried to rebuild Firefox again.
- Received another error during my build. The error stated that it could not compile a basic X program. I knew that my int_types.h was missing so I knew that I was obviously missing a library but wasn’t sure which one.
- I used Google again to see if anyone had faced the same problem. I found a link on Ubuntu Forums that gave me a package libgtk2.0-dev to install. But i had already installed it.
- I then decided to try the IRC chat and pasted the error that I received and asked for some help.
- Philip Vitorino offered to help me and explained to me that I was just missing a package. I told him that I wasn't sure what package I was missing. I told him the packages that I had installed and he gave me a package to install.
- I installed libxt-dev
sudo apt -get install g++ libxt-dev
- Rebuilded Firefox and left it running over night.
- Next morning everything had gone smoothly, I ran Firefox in the terminal and got the browser running.
/dist/bin ./firefox
Problems Encountered
During my Firefox build in Ubuntu I came across two errors that took me awhile to figuire out, since I was not familiarized on how Ubuntu worked.
One of the errors I faced was to do with two missing packages not being installed.
1. checking for pkg-config... /usr/bin/pkg-config 2. checking for gtk+-2.0 >= 1.3.7 gdk-x11-2.0 glib-2.0 gobject-2.0... Package gtk+-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gtk+-2.0' foun d Package gdk-x11-2.0 was not found in the pkg-config search path. Perhaps you should a dd the directory containing `gdk-x11-2.0.pc' to the PKG_CONFIG_PATH environment variabl e No package 'gdk-x11-2.0' found Package glib-2.0 was not found in the pkg-config searc h path. Perhaps you should add the directory containing `glib-2.0.pc' to the PKG_CONFIG _PATH environment variable No package 'glib-2.0' found Package gobject-2.0 was not foun d in the pkg-config search path. Perhaps you should add the directory containing `gobje ct-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gobject-2.0' found 3. configure: error: Library requirements (gtk+-2.0 >= 1.3.7 gdk-x11-2.0 glib-2.0 gobject- 2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libra ries are in a nonstandard prefix so pkg-config can find them. 4. *** Fix above errors and then restart with "make -f client.mk build" 5. make[1]: *** [configure] Error 1 6. make[1]: Leaving directory `/home/admin/mozilla' 7. make: *** [/home/admin/mozilla/firefox-objdir/Makefile] Error 2
I solved this problem by first using Google to find a solution. I couldn't find a solution online so I tried asking a classmate who had built Firefox to see if they would be able to help me. I was then told to install two packages libidl-dev and libgtk2.0-dev from the synaptic package manager. After the installation of the packages the error was solved.
On my second build I came across another error that had to do with another missing package.
1. checking for sys/int_types.h... no 2. configure: error: Could not compile basic X program. 3. *** Fix above errors and then restart with "make -f client.mk build" 4. make[1]: *** [configure] Error 1 5. make[1]: Leaving directory `/home/admin/mozilla' 6. make: *** [/home/admin/mozilla/Makefile] Error 2
I solved this problem by first using Google to find a solution. I found a solution online that stated for me to install a package which I had already installed, so this was obviously not of use. I then posted my error on Paste Bin and pasted the link on the IRC Chat in the #Seneca room. Philip Vitorino told me to try and install a package called libxt-dev and see if it solved the problem. It definitely solved the problem and I was able to build Firefox completely.
Screenshot
Coming soon.
Resources
Here are some links that I found useful and helped me in the process of building Mozilla Firefox:
- Linux Build Prerequisites
- Setting up an MSVC Toolkit Firefox/Thunderbird Build Environment
- Ubunutu Forums
Also got some help from people in the IRC Chat in room #Seneca. The name of these individuals are as follows:
- Mike Lau (mylau) [Helped with building Firefox on Ubuntu system]
- Philip Vitorino (philly) [Helped with building Firefox on Ubuntu system]
- Dave Humphrey (dave) [Helped with building Firefox on Windows XP Professional system]
- Tom Aratyn(mystic) [Helped with building Firefox on Windows XP Professional system]
I would like to thank you all very much for taking the time to help me with the problems I faced when building Firefox.
Conclusion
This whole process of building Firefox has been an experience that I plan on taking with me where ever I go. I have never worked on such a large project, and having the opportunity to be a part of it was very exciting. Since this was my first time building an open source project I must admit i did get a bit fustrated since I wasn't sure what I had to do or what I needed in order to build Firefox successfully. I got some useful information from Tom Aratyn and Dave Humphrey who first helped me out with trying to build Firefox on the Windows platform. Their information and the information I found on Google helped me to understand what I needed and what I had to do.
Since my Firefox crashed on my Windows platform when the build finished, I decided to try the build on Ubuntu. Installing Ubuntu was a challenge since it was my first time installing a Linux operating system on my machine. After the installation I got even more confused on where to find things. I took some time to get familiarized with the interface which I picked up after a couple of minutes of looking around on the desktop. During the process of building Firefox I started to get confused when I read on the internet that you had to install specific packages and libraries. When I read this I automatically thought that I had to download the package and libraries from the internet. But then I figured out that I just needed to type a command in the terminal to install packages and install the library manager. This was one of the things I found really confusing, but now I am getting used to the Linux environment and plan to keep using it in the near future.