Difference between revisions of "Development:Building:Mozilla 1.8.* Branches"
(→Q. Can I build on Mac OS X 10.4 on PowerPC using gcc 4?: set that apart) |
m (why {{draft}} of course) |
||
Line 1: | Line 1: | ||
+ | {{draft}} | ||
While the Mozilla trunk (and future 1.9 branch/Camino 2.0pre) require a Mac OS X 10.4 runtime and gcc 4.0 and the 10.4u SDK for building, the requirements of the MOZILLA_1_8_BRANCH/Camino 1.6pre (and the security-fixes-only CAMINO_1_5_BRANCH and MOZILLA_1_8_BRANCH/Camino 1.0.x) are rather different. This page contains information on how to modify the main [[Development:Building|build instructions]] in order to produce successful builds of Camino on these branches. | While the Mozilla trunk (and future 1.9 branch/Camino 2.0pre) require a Mac OS X 10.4 runtime and gcc 4.0 and the 10.4u SDK for building, the requirements of the MOZILLA_1_8_BRANCH/Camino 1.6pre (and the security-fixes-only CAMINO_1_5_BRANCH and MOZILLA_1_8_BRANCH/Camino 1.0.x) are rather different. This page contains information on how to modify the main [[Development:Building|build instructions]] in order to produce successful builds of Camino on these branches. | ||
Revision as of 21:42, 17 July 2007
While the Mozilla trunk (and future 1.9 branch/Camino 2.0pre) require a Mac OS X 10.4 runtime and gcc 4.0 and the 10.4u SDK for building, the requirements of the MOZILLA_1_8_BRANCH/Camino 1.6pre (and the security-fixes-only CAMINO_1_5_BRANCH and MOZILLA_1_8_BRANCH/Camino 1.0.x) are rather different. This page contains information on how to modify the main build instructions in order to produce successful builds of Camino on these branches.
Contents
General Configuration
Installing additional SDKs
Camino builds on the MOZILLA_1_8_BRANCH/Camino 1.6 and CAMINO_1_5_BRANCH/Camino 1.5.x require the 10.3.9 SDK for PPC and 10.4u SDK for Intel. The MOZILLA_1_8_0_BRANCH/Camino 1.0.x still requires the Mac OS X 10.2.8 SDK on PPC. To build a Universal Camino, you must be running Mac OS X 10.4 or higher and use Xcode 2.4.1 or higher.
If you plan on building any of these versions of Camino on a PPC Mac or as Universal builds, you must install the 10.3.9 and 10.2.8 SDKs in addition to the 10.4u SDK specified in the trunk instructions.
Selecting the proper default compiler on Mac OS X 10.4
When building on the MOZILLA_1_8_BRANCH, CAMINO_1_5_BRANCH, or MOZILLA_1_8_BRANCH on Mac OS X 10.4 ("Tiger") or later on PowerPC, you must change the default system compiler to gcc 3.3, the compiler used to produce official PowerPC builds. Use the following command:
$ sudo gcc_select 3.3
Be sure to repeat this step each time you install an Xcode upgrade.
Builds on Intel Macintoshes use the proper compiler version (gcc 4.0.1, from Xcode 2.4.1 or later) by default, so no changes are needed.
Q. Can I build on Mac OS X 10.4 on PowerPC using gcc 4?
A. Yes, with a few caveats. Builds produced with gcc 4 will only run on Mac OS X 10.3.9 and above. Because of this, official Camino releases for PowerPC will continue to be built with gcc 3.3. To use gcc 3.3 on Tiger, simply enter sudo gcc_select 3.3
in a terminal.
The version of gcc 4 that initially shipped with Mac OS X 10.4 Tiger is a pre-release version and will not build Camino. Users with Xcode 2.0 must upgrade to Xcode 2.4.1, which includes a working version of gcc 4.
Building the legacy Camino 1.0.x security releases with gcc 4 and the 10.3.9 SDK has not been tested and is not recommended.
below this point has not been edited/proofed
If you've read this and are still positive that you want to use gcc 4, you must add the following line to the end of your .mozconfig
file: ac_add_options ppc --with-macos-sdk=/Developer/SDKs/MacOSX10.3.9.sdk
gcc 4 users will also need to create a link to the Shared Menus Framework in the
10.3.9 SDK if one does not already exist.
$ sudo mkdir -p /Developer/SDKs/MacOSX10.3.9.sdk/Library/Frameworks
$ sudo ln -s /Library/Frameworks/SharedMenusCocoa.framework
/Developer/SDKs/MacOSX10.3.9.sdk/Library/Frameworks
Building on the MOZILLA_1_8_BRANCH/Camino 1.6pre
sharedmenus
- From the “Project” menu, select “Edit Project Settings”, and select the “Build” tab in the settings window.
- Set “Architectures” to
ppc i386
by double-clicking Architectures, typing “ppc i386”, and pressing return. - Add the following four new settings. Settings are added by clicking the “+” button below the settings list. You should add these settings:
GCC_VERSION_i386 = 4.0
GCC_VERSION_ppc = 3.3
SDKROOT_i386 = /Developer/SDKs/MacOSX10.4u.sdk
SDKROOT_ppc = /Developer/SDKs/MacOSX10.3.9.sdk
- Close the settings window.
- Install the framework:
- PowerPC-only builds: copy the
SharedMenusCocoa.framework
file from thebuild
directory on the disk image and place it in/Library/Frameworks
You can now eject and discard the disk image. - Intel-only or Universal builds: copy the newly-built
SharedMenusCocoa.framework
frombuild/Default/SharedMenusCocoa.framework
to/Library/Frameworks
.
- PowerPC-only builds: copy the
- You now need to create a reference to the Shared Menus Framework inside the appropriate SDK folder(s). If you are building a Universal Camino, follow the steps for both PowerPC and Intel builds below. Note: recent versions of Xcode will automatically have a link from
/Developer/SDKs/*/Library/Frameworks
toLibrary/Frameworks
, in which case this step is not necessary (and will cause build failures), so be sure to check before following these steps.- PowerPC builds:
- Check to see if you have the folder
/Developer/SDKs/MacOSX10.3.9.sdk
If so, proceed to step 2; if not, install the Xcode Cross Development tools as described above. $ sudo mkdir -p /Developer/SDKs/MacOSX10.3.9.sdk/Library/Frameworks
$ cd /Developer/SDKs/MacOSX10.3.9.sdk/Library/Frameworks
$ sudo ln -s /Library/Frameworks/SharedMenusCocoa.framework SharedMenusCocoa.framework
- Check to see if you have the folder
- Intel builds:
- Check to see if you have the folder
/Developer/SDKs/MacOSX10.4u.sdk
If so, proceed to step 2; if not, install the Xcode Cross Development tools as described above. $ sudo mkdir -p /Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks
$ cd /Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks
$ sudo ln -s /Library/Frameworks/SharedMenusCocoa.framework SharedMenusCocoa.framework
- Check to see if you have the folder
- PowerPC builds:
pull/build
In your mozilla
directory, create a plain text file called .mozconfig
(note the leading period). This file is where you will set up the options for your Camino build. To begin, add the following line to your .mozconfig
file (note the leading dot and space):
. $topsrcdir/camino/config/mozconfig
- Universal builds will need to add the following lines immediately after the above line:
. $topsrcdir/build/macosx/universal/mozconfig
ac_add_app_options ppc --with-macos-sdk=/Developer/SDKs/MacOSX10.3.9.sdk
ac_add_app_options ppc --enable-macos-target=10.3
- Universal builds must also be built using an OBJDIR; be sure to add an OBJDIR line to your
.mozconfig
:
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../CaminoUni
Sample Uni mozconfig
Universal Distribution on a Dual-CPU Mac:
. $topsrcdir/camino/config/mozconfig . $topsrcdir/build/macosx/universal/mozconfig ac_add_app_options ppc --with-macos-sdk=/Developer/SDKs/MacOSX10.3.9.sdk ac_add_app_options ppc --enable-macos-target=10.3 ac_add_options --disable-shared ac_add_options --enable-static mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../CaminoUni mk_add_options MOZ_MAKE_FLAGS=-j4
Building on the CAMINO_1_5_BRANCH/Camino 1.5.x
pull/build
In your mozilla
directory, create a plain text file called .mozconfig
(note the leading period). This file is where you will set up the options for your Camino build. To begin, add the following line to your .mozconfig
file (note the leading dot and space):
. $topsrcdir/camino/config/mozconfig
- Universal builds will need to add the following lines immediately after the above line:
. $topsrcdir/build/macosx/universal/mozconfig
ac_add_app_options ppc --with-macos-sdk=/Developer/SDKs/MacOSX10.3.9.sdk
ac_add_app_options ppc --enable-macos-target=10.3
- Universal builds must also be built using an OBJDIR; be sure to add an OBJDIR line to your
.mozconfig
:
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../CaminoUni
Building on the MOZILLA_1_8_0_BRANCH/Camino 1.0.x
Q. What are the requirements for building Camino 1.0.x stable releases?
A. If you wish to build Camino 1.0.x for PPC or Universal, you must install the Mac OS X 10.2.8 SDK and properly configure your build.
- Ensure you have selected gcc 3.3 for PowerPC builds.
- In the section for configuring the Shared Menus Framework, you must use
GCC_VERSION_i386 = 4.0
GCC_VERSION_ppc = 3.3
instead ofGCC_VERSION = 4.0
SDKROOT_ppc = /Developer/SDKs/MacOSX10.2.8.sdk
SDKROOT_i386 = /Developer/SDKs/MacOSX10.4u.sdk
instead ofSDKROOT = /Developer/SDKs/MacOSX10.4u.sdk
.