Difference between revisions of "Assignment 1 (Pcvitori)"

From CDOT Wiki
Jump to: navigation, search
(Problems Encountered)
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
!!!!WORK IN PROGRESS!!!!
 
 
 
=Introduction=
 
=Introduction=
  
While I have attempted to build various open source projects in the past (I.e. KDE), this will be my first time building Firefox. Before I begin the whole build process, let me give you a bit of information about my computer I will be building on.
+
In prior years, I have attempted to build various open source projects, for example KDE. This project however, will be my first attempt at building Firefox. Before I begin discussing the whole build process, it is important for you to have some basic information about the computer that I will be building on.
  
==My Notebook Specifications==
+
==Hardware Configuration==
  
 
<pre>
 
<pre>
Line 14: Line 12:
 
</pre>
 
</pre>
  
This computer is about 5 years old, so let’s see how it holds up in a Firefox build. Let the build begin!
+
This computer is about 5 years old. So let’s see how it holds up in a Firefox build. Let the build begin!
  
 
=Software Installation=
 
=Software Installation=
  
Since I have already installed the latest version of Ubuntu on my notebook, I would only require a few more packages before I can execute my first build. My first step was to install any of the missing build prerequisites on the developer website to my machine.  
+
Since I have already installed the latest version of Ubuntu on my notebook, I will only require a few more packages before I can execute my first build. My first step was to install any missing build prerequisites on the developer website on to my machine. Using the Synaptic Install Wizard, I located and downloaded each package listed on the Mozilla website ([http://developer.mozilla.org/en/docs/Linux_Build_Prerequisites Linux Build Prerequisites]). The following packages were installed:
 
 
 
 
 
 
Using the Synaptic Install Wizard, I located and downloaded each package listed on the Mozilla website ([http://developer.mozilla.org/en/docs/Linux_Build_Prerequisites Linux Build Prerequisites]). The following packages were installed:
 
  
 
<pre>
 
<pre>
GTK2
 
 
gcc
 
gcc
 
libxt-dev
 
libxt-dev
 +
libidl-dev
 +
libgtk2.0-dev
 
cvs
 
cvs
 
make
 
make
 +
zip
 
</pre>
 
</pre>
  
My next step was to download the most recent version of the Mozilla source code from the cvs repository. To accomplish this task, I first need to create a directory to hold all my cvs repositories. Finally, i need to checkout the latest browser version from the Mozilla trunk and build it. I used the following commands to complete these tasks.
+
My next step required me to download the most recent version of the Mozilla source code from the cvs repository. To accomplish this task, I first need to create a directory to hold all my cvs repositories. Finally, I needed to checkout the latest browser version from the Mozilla trunk and build it. I used the following commands to complete these tasks.
  
 
<pre>
 
<pre>
Line 41: Line 37:
 
</pre>
 
</pre>
  
Now that we have a link to the Mozilla repository, I can now specify which code segment to download using the MOZ_CO_PROJECT parameter. Since we’re only building Firefox, we can specify the keyword ‘browser’ to download only the browser components.  
+
Now that I have a link to the Mozilla repository, I can now specify which code segment to download using the MOZ_CO_PROJECT parameter. Since I am only building Firefox, I am able to specify the keyword ‘browser’ for the MOZ_CO_PROJECT parameter, which will allow me to download browser components.  
  
 
<pre>
 
<pre>
Line 47: Line 43:
 
</pre>
 
</pre>
  
By accident, I missed the section that talks about the build options configuration file. I quickly moved to the Firefox build section initiated the following command to build my newly downloaded browser source.  
+
By accident, I missed the section that discusses the build options configuration file. I then quickly moved to the Firefox build section and initiated the following command to build my newly downloaded browser source.  
  
 
<pre>
 
<pre>
Line 57: Line 53:
 
==Problems Encountered==
 
==Problems Encountered==
  
My very first problem! Failing to see the section about creating a .mozconfig file has resulted in the following error.
+
The very first problem I encountered was due to my failing to see the section about creating a .mozconfig file has resulted in the following error.
  
 
<pre>
 
<pre>
Line 66: Line 62:
  
 
<pre>
 
<pre>
<PARAMETERS HERE>
+
mk_add_options MOZ_CO_PROJECT=browser
 +
ac_add_options --enable-application=browser
 
</pre>
 
</pre>
  
Once again, I initiated the build command described above to restart the Firefox build. After 1 hour into the build process, I noticed a consistent flow of error messages being display on my terminal. Minutes later, the build crashed. It turns out that I was missing a file called ‘int_types.h’ that caused various build files to crash as they could not resolve to this header file. After various google searches with no results, I decided to venture into the google newsgroups in hopes of an answer. To my surprise, many users were having the same issue. Described in many cases, my current situation was a result of not having the g++ package installed. I quickly installed the g++ package and re-executed the build command.  
+
Once again, I initiated the build command described above to restart the Firefox build. After one hour into the build process, I noticed a consistent flow of error messages being display on my terminal. Minutes later, the build crashed. It turns out that I was missing a file called ‘int_types.h’ which caused various build files to crash as they could not resolve to this header file. After various google searches with no results, I decided to venture into the google newsgroups in hopes of an answer. To my surprise, many users were having the same issue. As I began to read the descriptions of many cases, I quickly realized that my current situation was a result of not having the g++ package installed. I quickly installed the g++ package and re-executed the build command.  
  
 +
The build process this time failed much quicker then my previous attempt. Once again I received the same error as before. This time, I decided to venture into IRC and talk to my fellow classmates about the problem I was having. Within minutes, I had various users assisting me with my build problems. Tom (mystic) took the time to ensure that I had the required packages (libraries) installed. Dave then asked me about my make version and described how it may cause an issue if I had the wrong version installed. After double checking all the requirements listed by Tom and Dave, I found that they were all correct on my system. Therefore, I decided to delete and re-checkout the whole Mozilla browser code from the trunk.
  
The build process this time failed much quicker then my previous tempt. Once again I received the same error as before. This time, I decided to venture into IRC and talk to my fellow classmates about the problem I was having. Within minutes, I had various users assisting me with my build problems. Tom (mystic) took the time to ensure that I had the required packages installed libraries installed. Dave quickly asked me about my make version and described how it may cause an issue if I had the wrong version installed. After double checking all the requirements listed by Tom and Dave were correct on my system, I decided to delete and re-checkout the whole Mozilla browser code from the truck.
+
Crossing my fingers, I executed the build command in hopes that my previous snapshot of the repository was corrupted. Surely enough, I was correct. Three hours later, I then had my first Firefox build!
  
Crossing my figures, I executed the build command in hopes that my previous snapshot of the repository was corrupted. Surely enough, I was right! (What a guess) 3 hours later, I had my first Firefox build!
+
=Screenshot=
  
=Screenshot=
+
[http://cs1.senecac.on.ca/wiki/index.php/Image:Pcvitori_firefox_build.png More Information]
 +
 
 +
=Resources=
  
Coming soon!
+
* [[User:Themystic|Tom]]
 +
* [[User:David.humphrey|David Humphrey]]
 +
* [http://developer.mozilla.org/en/docs/Mozilla_Source_Code_Via_CVS Mozilla Source Code Via CVS]
 +
* [http://developer.mozilla.org/en/docs/Configuring_Build_Options Configuring Build Options]
 +
* [http://developer.mozilla.org/en/docs/Linux_Build_Prerequisites Linux Build Prerequisites]
 +
* [http://www.google.com Google]
  
 
=Conclusion=
 
=Conclusion=
  
To tell you the truth, I was expecting a fierce battle with the Mozilla Firefox build. This turned out to be better then I expected as building on Ubuntu proved to be very easy and straight forward. The build problems I encountered allowed me to understand more about the build system and how the slightest file/version change can break the build.
+
In all honesty, I was expecting a Mozilla Firefox build to be much more complex and difficult then it was. It turned out to be better then I expected, as building on Ubuntu proved to be very easy and straight forward. The build problems I encountered allowed me to understand more about the build system and how the slightest file/version change can break the build.

Latest revision as of 19:57, 19 September 2006

Introduction

In prior years, I have attempted to build various open source projects, for example KDE. This project however, will be my first attempt at building Firefox. Before I begin discussing the whole build process, it is important for you to have some basic information about the computer that I will be building on.

Hardware Configuration

Intel Pentium 4 Processor-M 1.6 MHz
512 MB RAM
40 gig Hard Drive
Dual Boot – Ubuntu and Windows XP

This computer is about 5 years old. So let’s see how it holds up in a Firefox build. Let the build begin!

Software Installation

Since I have already installed the latest version of Ubuntu on my notebook, I will only require a few more packages before I can execute my first build. My first step was to install any missing build prerequisites on the developer website on to my machine. Using the Synaptic Install Wizard, I located and downloaded each package listed on the Mozilla website (Linux Build Prerequisites). The following packages were installed:

gcc
libxt-dev
libidl-dev
libgtk2.0-dev 
cvs
make
zip

My next step required me to download the most recent version of the Mozilla source code from the cvs repository. To accomplish this task, I first need to create a directory to hold all my cvs repositories. Finally, I needed to checkout the latest browser version from the Mozilla trunk and build it. I used the following commands to complete these tasks.

>$ mkdir cvs
>$ cd cvs 
>$ cvs -d :pserver:anonymous:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk
>$ cd mozilla

Now that I have a link to the Mozilla repository, I can now specify which code segment to download using the MOZ_CO_PROJECT parameter. Since I am only building Firefox, I am able to specify the keyword ‘browser’ for the MOZ_CO_PROJECT parameter, which will allow me to download browser components.

>$ make -f client.mk checkout MOZ_CO_PROJECT=browser

By accident, I missed the section that discusses the build options configuration file. I then quickly moved to the Firefox build section and initiated the following command to build my newly downloaded browser source.

>$ make -f client.mk build

The Build

Problems Encountered

The very first problem I encountered was due to my failing to see the section about creating a .mozconfig file has resulted in the following error.

-Error: Parameter missing: --enable-application=APP

After reading over the configure build options web page, I quickly created my .mozconfig file with the following parameters.

mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --enable-application=browser

Once again, I initiated the build command described above to restart the Firefox build. After one hour into the build process, I noticed a consistent flow of error messages being display on my terminal. Minutes later, the build crashed. It turns out that I was missing a file called ‘int_types.h’ which caused various build files to crash as they could not resolve to this header file. After various google searches with no results, I decided to venture into the google newsgroups in hopes of an answer. To my surprise, many users were having the same issue. As I began to read the descriptions of many cases, I quickly realized that my current situation was a result of not having the g++ package installed. I quickly installed the g++ package and re-executed the build command.

The build process this time failed much quicker then my previous attempt. Once again I received the same error as before. This time, I decided to venture into IRC and talk to my fellow classmates about the problem I was having. Within minutes, I had various users assisting me with my build problems. Tom (mystic) took the time to ensure that I had the required packages (libraries) installed. Dave then asked me about my make version and described how it may cause an issue if I had the wrong version installed. After double checking all the requirements listed by Tom and Dave, I found that they were all correct on my system. Therefore, I decided to delete and re-checkout the whole Mozilla browser code from the trunk.

Crossing my fingers, I executed the build command in hopes that my previous snapshot of the repository was corrupted. Surely enough, I was correct. Three hours later, I then had my first Firefox build!

Screenshot

More Information

Resources

Conclusion

In all honesty, I was expecting a Mozilla Firefox build to be much more complex and difficult then it was. It turned out to be better then I expected, as building on Ubuntu proved to be very easy and straight forward. The build problems I encountered allowed me to understand more about the build system and how the slightest file/version change can break the build.