Difference between revisions of "User:Moe/Assignment1"

From CDOT Wiki
Jump to: navigation, search
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''en construction'''
+
== ''':''' Research ==
  
== ''':''' Research ==
 
 
:At first I had decided to build Firefox using Visual Studio 2005 on Windows XP. No knowing where to start I did what I usually do when I don’t have a clue about something. I googled it.  Using the following search query “build Firefox using visual studio” in google I was directed to [http://cs.senecac.on.ca/~david.humphrey/writing/firefox-win32-build.html].
 
:At first I had decided to build Firefox using Visual Studio 2005 on Windows XP. No knowing where to start I did what I usually do when I don’t have a clue about something. I googled it.  Using the following search query “build Firefox using visual studio” in google I was directed to [http://cs.senecac.on.ca/~david.humphrey/writing/firefox-win32-build.html].
  
 
:I followed the instructions on that page up to the point where the buildsetup.bat needed to be executed. It did not work. I was unable to execute the script. I knew this because it wasn’t setting up the correct environmental variables for CVS to work properly. After an hour of struggle with this problem I decided to give up on Windows and decided to try my luck with OS X.
 
:I followed the instructions on that page up to the point where the buildsetup.bat needed to be executed. It did not work. I was unable to execute the script. I knew this because it wasn’t setting up the correct environmental variables for CVS to work properly. After an hour of struggle with this problem I decided to give up on Windows and decided to try my luck with OS X.
:I searched google with the following query “mac osx build firefox” and this page [http://developer.mozilla.org/en/docs/Build_Documentation] was returned as one of the search results. I then followed the instructions on this page and at the end was able to get Firefox built and running in no time.
+
 
 +
:I chose to build Firefox using the release 1.5.0.6 source which was available online on the mozilla release [http://releases.mozilla.org/pub/mozilla.org/firefox/releases/1.5.0.6/source/ website]. I downloaded firefox-1.5.0.6-source.tar.bz2 and then extracted the content of the archive into  /Users/Moe/proj/.
 +
 
 +
::'''My .mozconfig settings'''
 +
:{| class="fullwidth-table"
 +
|-
 +
|class="header" width="5%"|
 +
|class="header" width="95%"|
 +
|-
 +
 
 +
|-
 +
 
 +
|
 +
|
 +
<pre>
 +
sudo gcc_select 3.3
 +
export MOZCONFIG=~/proj
 +
. $topsrcdir/browser/config/mozconfig
 +
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/ff-opt-static
 +
ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.4u.sdk
 +
ac_add_options --enable-optimize
 +
ac_add_options --disable-debug
 +
ac_add_options --enable-static
 +
ac_add_options --disable-shared
 +
ac_add_options --disable-tests
 +
mk_add_options MOZ_CO_PROJECT=browser
 +
ac_add_options --enable-application=browser
 +
</pre>
 +
|-
 +
|}
 +
 
 +
:I searched google with the following query “mac osx build firefox” and this page [http://developer.mozilla.org/en/docs/Build_Documentation] was returned as one of the search results. I then followed the instructions on the [http://developer.mozilla.org/en/docs/Build_Documentation build documentation] page and at the end was able to get Firefox built and running in no time.
  
 
== ''':''' Hardware and Software Requirements ==
 
== ''':''' Hardware and Software Requirements ==
 
:'''Hardware'''
 
:'''Hardware'''
 
::I didn’t care much about the hardware requirements listed on the Build Documentation page because I knew that my laptop was a fairly recent model [2 years old] and that the only reason why they usually require high system requirements is mostly to decrease the time that it takes to compile code.
 
::I didn’t care much about the hardware requirements listed on the Build Documentation page because I knew that my laptop was a fairly recent model [2 years old] and that the only reason why they usually require high system requirements is mostly to decrease the time that it takes to compile code.
 +
 +
 
::'''My hardware configuration'''
 
::'''My hardware configuration'''
{| class="fullwidth-table"
+
:{| class="fullwidth-table"
 
|-
 
|-
|class="header" width="20%"|
+
|class="header" width="10%"|
|class="header" width="80%"|
+
|class="header" width="90%"|
 
|-
 
|-
  
Line 22: Line 54:
 
|
 
|
 
<pre>
 
<pre>
   Machine Name: PowerBook G4 12"
+
   Machine Name: PowerBook G4 12"
   Machine Model: PowerBook6,8
+
   Machine Model: PowerBook6,8
   CPU Type: PowerPC G4  (1.2)
+
   CPU Type: PowerPC G4  (1.2)
   Number Of CPUs: 1
+
   Number Of CPUs: 1
   CPU Speed: 1.5 GHz
+
   CPU Speed: 1.5 GHz
   L2 Cache: 512 KB
+
   L2 Cache: 512 KB
 
   Memory: 512 MB
 
   Memory: 512 MB
   Bus Speed: 167 MHz
+
   Bus Speed: 167 MHz
 
</pre>
 
</pre>
 
|-
 
|-
 
|}
 
|}
 
:'''Software'''
 
:'''Software'''
::'''Xcode''': I already had Xcode installed since I had used it before in my BTP course. Xcode provided me with the SDKs that were required for building Firefox as well as the build tools like the gcc 3.3 compiler.
+
::'''Xcode''': I already had Xcode installed since I had used it before in my BTP course. Xcode provided me with the SDKs that were required for building Firefox as well as the build tools like the gcc 3.3 compiler. [[http://developer.apple.com/tools/xcode/ Get Xcode]]
  
::'''DarwinPorts''': The Mozilla prerequisites page for building Firefox on OS X recommends the installation of    DarwinPorts, a package management system, in order to install libIDL, Glib and autoconf. I also had DarwinPorts installed on my computer.
+
::'''DarwinPorts''': The Mozilla prerequisites page for building Firefox on OS X recommends the installation of    DarwinPorts, a package management system, needed in order to [http://developer.mozilla.org/en/docs/Mac_OS_X_Build_Prerequisites install libIDL, Glib and autoconf]. I also had DarwinPorts installed on my computer.  
 +
::[[http://darwinports.opendarwin.org/docs/ Installation Document]] [[http://darwinports.opendarwin.org/getdp/ Get DarwinPorts]]
 +
 
 +
 
 +
::'''My software configuration'''
 +
{| class="fullwidth-table"
 +
|-
 +
|class="header" width="10%"|
 +
|class="header" width="90%"|
 +
|-
 +
 
 +
|-
 +
 
 +
|
 +
|
 +
<pre>
 +
  Mac OS X Version 10.7.7
 +
  GNU Make 3.80
 +
  DarwinPorts 1.310
 +
  gcc version 3.3 20030304 (Apple Computer, Inc. build 1819)
 +
  Xcode 2.3
 +
</pre>
 +
|-
 +
|}
  
 
== ''':''' Problems encountered & Resolutions ==
 
== ''':''' Problems encountered & Resolutions ==
 
:When compiling Firefox I realized that I was missing the QuickTime, CoreAudio and the OpenGL SDK. To resolve this issue I re-downloaded Xcode and installed the missing files.
 
:When compiling Firefox I realized that I was missing the QuickTime, CoreAudio and the OpenGL SDK. To resolve this issue I re-downloaded Xcode and installed the missing files.
:After I added the missing SDKs I was still unable to compile and I would get the same build error message over and over again. After many build attempts I realized that the old object files that were compiled before, when I was missing the SDKs, were causing the build process to fail. The removal of the object files with in the objdir resulted it a successful build of Firefox.
 
  
== ''':''' Resources ==
+
::'''Missing QuickTime SDK'''
 +
{| class="fullwidth-table"
 +
|-
 +
|class="header" width="6%"|
 +
|class="header" width="94%"|
 +
|-
 +
 
 +
|-
 +
 
 +
|
 +
|
 +
<pre>
 +
In file included from /Users/Moe/proj/mozilla/widget/src/mac/nsSound.cpp:64:
 +
/Developer/Headers/FlatCarbon/Movies.h:1:33: error: QuickTime/QuickTime.h: No such file or directory
 +
/Users/Moe/proj/mozilla/widget/src/mac/nsSound.cpp:166: error: 'Movie' has not been declared
 +
/Users/Moe/proj/mozilla/widget/src/mac/nsSound.cpp:170: error: 'Movie' does not name a type
 +
/Users/Moe/proj/mozilla/widget/src/mac/nsSound.cpp: In constructor 'nsMovieSoundRequest::nsMovieSoundRequest()':
 +
 
 +
.......
 +
 
 +
In file included from /System/Library/Frameworks/QuickTime.framework/Headers/QuickTime.h:62,
 +
                from /Developer/Headers/FlatCarbon/Movies.h:1,
 +
                from /Users/Moe/proj/mozilla/widget/src/mac/nsSound.cpp:64:
 +
/System/Library/Frameworks/QuickTime.framework/Headers/QuickTimeComponents.h:10966: error: parse
 +
  error before `*' token
 +
/Users/Moe/proj/mozilla/widget/src/mac/nsSound.cpp: In member function `virtual
 +
  nsresult nsMovieSoundRequest::OnStreamComplete(nsIStreamLoader*,
 +
  nsISupports*, unsigned int, unsigned int, const PRUint8*)':
 +
/Users/Moe/proj/mozilla/widget/src/mac/nsSound.cpp:782: warning: unused
 +
  variable `nsresult rv'
 +
make[5]: *** [nsSound.o] Error 1
 +
make[4]: *** [libs] Error 2
 +
make[3]: *** [libs] Error 2
 +
make[2]: *** [tier_9] Error 2
 +
make[1]: *** [default] Error 2
 +
make: *** [build] Error 2
 +
</pre>
 +
|-
 +
|}
 +
::'''Missing CoreAudio SDK'''
 +
{| class="fullwidth-table"
 +
|-
 +
|class="header" width="6%"|
 +
|class="header" width="94%"|
 +
|-
 +
 
 +
|-
 +
 
 +
|
 +
|
 +
<pre>
 +
/System/Library/Frameworks/QuickTime.framework/Headers/Movies.h:47:33: CoreAudio/CoreAudio.h: No such file or directory
 +
</pre>
 +
|-
 +
|}
 +
::'''Missing OpenGL SDK'''
 +
{| class="fullwidth-table"
 +
|-
 +
|class="header" width="6%"|
 +
|class="header" width="94%"|
 +
|-
 +
 
 +
|-
 +
 
 +
|
 +
|
 +
<pre>
 +
/System/Library/Frameworks/QuickTime.framework/Headers/ImageCompression.h:24:27: OpenGL/OpenGL.h: No such file or directory
 +
</pre>
 +
|-
 +
|}
 +
 
 +
:After I added the missing SDKs I was still unable to compile and I would get the same build error message over and over again.
 +
{| class="fullwidth-table"
 +
|-
 +
|class="header" width="9%"|
 +
|class="header" width="91%"|
 +
|-
 +
 
 +
|-
 +
 
 +
|
 +
|
 +
<pre>
 +
ld: Undefined symbols:
 +
_fprintf$LDBLStub
 +
make[7]: *** [updater] Error 1
 +
make[6]: *** [libs] Error 2
 +
make[5]: *** [libs] Error 2
 +
make[4]: *** [libs] Error 2
 +
make[3]: *** [libs] Error 2
 +
make[2]: *** [tier_50] Error 2
 +
make[1]: *** [default] Error 2
 +
make: *** [build] Error 2
 +
</pre>
 +
|-
 +
|}
 +
:After many build attempts I realized that the old object files that were compiled before, when I was missing the SDKs, were causing the build process to fail. The removal of the object files with in the objdir resulted it a successful build of Firefox.
 +
 
 +
== ''':''' Resources Used==
 
:#http://developer.mozilla.org/en/docs/Mac_OS_X_Build_Prerequisites
 
:#http://developer.mozilla.org/en/docs/Mac_OS_X_Build_Prerequisites
 
:#http://developer.mozilla.org/en/docs/Configuring_Build_Options
 
:#http://developer.mozilla.org/en/docs/Configuring_Build_Options
 
:#http://releases.mozilla.org/pub/mozilla.org/firefox/releases/1.5.0.6/source/
 
:#http://releases.mozilla.org/pub/mozilla.org/firefox/releases/1.5.0.6/source/
 
:#http://developer.apple.com
 
:#http://developer.apple.com
 +
 +
== ''':''' Screenshot==
 +
:[[Image:Moefirefoxss.jpg|Firefox screenshot [1.5.06]]]
  
 
== ''':''' Final Thoughts ==
 
== ''':''' Final Thoughts ==
 
:My first experience with building Firefox has been quite uneventful. I was expecting hours of painful struggle with this assignment but luckily the entire process went without a hitch at least compared to the other horror stories I’ve heard. I however consider myself lucky to have all the tools needed already installed and ready to go.
 
:My first experience with building Firefox has been quite uneventful. I was expecting hours of painful struggle with this assignment but luckily the entire process went without a hitch at least compared to the other horror stories I’ve heard. I however consider myself lucky to have all the tools needed already installed and ready to go.

Latest revision as of 19:32, 19 September 2006

: Research

At first I had decided to build Firefox using Visual Studio 2005 on Windows XP. No knowing where to start I did what I usually do when I don’t have a clue about something. I googled it. Using the following search query “build Firefox using visual studio” in google I was directed to [1].
I followed the instructions on that page up to the point where the buildsetup.bat needed to be executed. It did not work. I was unable to execute the script. I knew this because it wasn’t setting up the correct environmental variables for CVS to work properly. After an hour of struggle with this problem I decided to give up on Windows and decided to try my luck with OS X.
I chose to build Firefox using the release 1.5.0.6 source which was available online on the mozilla release website. I downloaded firefox-1.5.0.6-source.tar.bz2 and then extracted the content of the archive into /Users/Moe/proj/.
My .mozconfig settings
sudo gcc_select 3.3
export MOZCONFIG=~/proj
. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/ff-opt-static
ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.4u.sdk
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --enable-static
ac_add_options --disable-shared
ac_add_options --disable-tests
mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --enable-application=browser
I searched google with the following query “mac osx build firefox” and this page [2] was returned as one of the search results. I then followed the instructions on the build documentation page and at the end was able to get Firefox built and running in no time.

: Hardware and Software Requirements

Hardware
I didn’t care much about the hardware requirements listed on the Build Documentation page because I knew that my laptop was a fairly recent model [2 years old] and that the only reason why they usually require high system requirements is mostly to decrease the time that it takes to compile code.


My hardware configuration
  Machine Name: PowerBook G4 12"
  Machine Model: PowerBook6,8
  CPU Type: PowerPC G4  (1.2)
  Number Of CPUs: 1
  CPU Speed: 1.5 GHz
  L2 Cache: 512 KB
  Memory:	512 MB
  Bus Speed: 167 MHz
Software
Xcode: I already had Xcode installed since I had used it before in my BTP course. Xcode provided me with the SDKs that were required for building Firefox as well as the build tools like the gcc 3.3 compiler. [Get Xcode]
DarwinPorts: The Mozilla prerequisites page for building Firefox on OS X recommends the installation of DarwinPorts, a package management system, needed in order to install libIDL, Glib and autoconf. I also had DarwinPorts installed on my computer.
[Installation Document] [Get DarwinPorts]


My software configuration
  Mac OS X Version 10.7.7
  GNU Make 3.80
  DarwinPorts 1.310
  gcc version 3.3 20030304 (Apple Computer, Inc. build 1819)
  Xcode 2.3

: Problems encountered & Resolutions

When compiling Firefox I realized that I was missing the QuickTime, CoreAudio and the OpenGL SDK. To resolve this issue I re-downloaded Xcode and installed the missing files.
Missing QuickTime SDK
In file included from /Users/Moe/proj/mozilla/widget/src/mac/nsSound.cpp:64:
/Developer/Headers/FlatCarbon/Movies.h:1:33: error: QuickTime/QuickTime.h: No such file or directory
/Users/Moe/proj/mozilla/widget/src/mac/nsSound.cpp:166: error: 'Movie' has not been declared
/Users/Moe/proj/mozilla/widget/src/mac/nsSound.cpp:170: error: 'Movie' does not name a type
/Users/Moe/proj/mozilla/widget/src/mac/nsSound.cpp: In constructor 'nsMovieSoundRequest::nsMovieSoundRequest()':

.......

In file included from /System/Library/Frameworks/QuickTime.framework/Headers/QuickTime.h:62,
                 from /Developer/Headers/FlatCarbon/Movies.h:1,
                 from /Users/Moe/proj/mozilla/widget/src/mac/nsSound.cpp:64:
/System/Library/Frameworks/QuickTime.framework/Headers/QuickTimeComponents.h:10966: error: parse
   error before `*' token
/Users/Moe/proj/mozilla/widget/src/mac/nsSound.cpp: In member function `virtual 
   nsresult nsMovieSoundRequest::OnStreamComplete(nsIStreamLoader*, 
   nsISupports*, unsigned int, unsigned int, const PRUint8*)':
/Users/Moe/proj/mozilla/widget/src/mac/nsSound.cpp:782: warning: unused 
   variable `nsresult rv'
make[5]: *** [nsSound.o] Error 1
make[4]: *** [libs] Error 2
make[3]: *** [libs] Error 2
make[2]: *** [tier_9] Error 2
make[1]: *** [default] Error 2
make: *** [build] Error 2
Missing CoreAudio SDK
/System/Library/Frameworks/QuickTime.framework/Headers/Movies.h:47:33: CoreAudio/CoreAudio.h: No such file or directory
Missing OpenGL SDK
/System/Library/Frameworks/QuickTime.framework/Headers/ImageCompression.h:24:27: OpenGL/OpenGL.h: No such file or directory
After I added the missing SDKs I was still unable to compile and I would get the same build error message over and over again.
ld: Undefined symbols:
_fprintf$LDBLStub
make[7]: *** [updater] Error 1
make[6]: *** [libs] Error 2
make[5]: *** [libs] Error 2
make[4]: *** [libs] Error 2
make[3]: *** [libs] Error 2
make[2]: *** [tier_50] Error 2
make[1]: *** [default] Error 2
make: *** [build] Error 2
After many build attempts I realized that the old object files that were compiled before, when I was missing the SDKs, were causing the build process to fail. The removal of the object files with in the objdir resulted it a successful build of Firefox.

: Resources Used

  1. http://developer.mozilla.org/en/docs/Mac_OS_X_Build_Prerequisites
  2. http://developer.mozilla.org/en/docs/Configuring_Build_Options
  3. http://releases.mozilla.org/pub/mozilla.org/firefox/releases/1.5.0.6/source/
  4. http://developer.apple.com

: Screenshot

Firefox screenshot [1.5.06]

: Final Thoughts

My first experience with building Firefox has been quite uneventful. I was expecting hours of painful struggle with this assignment but luckily the entire process went without a hitch at least compared to the other horror stories I’ve heard. I however consider myself lucky to have all the tools needed already installed and ready to go.