Difference between revisions of "Development:Building:Mac OS X 10.6"

From Camino Wiki
Jump to navigation Jump to search
(link to the bug, and request updates there)
(→‎Local Patches: sparkle patch no longer needed)
 
(12 intermediate revisions by 3 users not shown)
Line 32: Line 32:
 
===<code>run-mozilla.sh</code>===
 
===<code>run-mozilla.sh</code>===
  
The <code>run-mozilla.sh</code> script is used in several places during the Gecko build and packaging (regenerating some JavaScript test code, signing NSS libraries), but due to the SQLite linking debacle ({{bug|}}), <code>run-mozilla.sh</code> sets an incompatible dyld path.
+
The <code>run-mozilla.sh</code> script is used in several places during the Gecko build and packaging (regenerating some JavaScript test code, signing NSS libraries), but due to the SQLite linking debacle ({{bug|513747}}), <code>run-mozilla.sh</code> sets an incompatible dyld path.
  
* [https://bugzilla.mozilla.org/attachment.cgi?id=445579 Attachment 445579] on {{bug|514495}} works around this problem.
+
* [https://bugzilla.mozilla.org/attachment.cgi?id=480356 Attachment 480356] on {{bug|514495}} works around this problem.
 +
 
 +
<code>$ cd mozilla; patch -p1 < path/to/that/patch/as/local/file</code>
  
 
''Note: this is the only patch that is required in all 10.6/1.9.2 build configurations.''
 
''Note: this is the only patch that is required in all 10.6/1.9.2 build configurations.''
  
===Sparkle’s <code>SUStatus.nib</code>===
+
===<code>unify</code> vs. <code>osacompile</code> and Camino’s feedhandlers===
Beginning with Xcode 3.2.2, all nibs are automatically stripped.  Sparkle’s <code>SUStatus.nib</code> can’t be stripped for some reason, so the build failsPatching Sparkle’s <code>ConfigCommon.xcconfig</code> to turn off stripping works around this problem.
+
<code>osacompile</code> on Mac OS X 10.6 will only produce 3-way ppc7400-i386-x86_64 binaries, despite being instructed to generate single-architecture binaries when building our feedhandlersMozilla’s <code>unify</code> script can only handle ppc and i386 binaries, so it must be patched in order to properly process the feedhandlers in Universal builds.
 +
 
 +
* [https://bugzilla.mozilla.org/attachment.cgi?id=442969 Attachment 442969] on {{bug|514495}} works around this problem.
  
* [https://bugzilla.mozilla.org/attachment.cgi?id=445579 Attachment 441205] on {{bug|514495}} works around this problem.
+
<code>$ cd mozilla/build/macosx/universal; patch -p0 < path/to/that/patch/as/local/file</code>
  
===<code>unify</code> vs. <code>osacompile</code> and Camino’s feedhandlers===
+
==Building in Xcode==
<code>osacompile</code> on Mac OS X 10.6 will only produce 3-way ppc7400-i386-x86_64 binaries, despite being instructed to generate single-architecture binaries when building our feedhandlers.  Mozilla’s <code>unify</code> script can only handle ppc and i386 binaries, so it must be patched in order to properly process the feedhandlers in Universal builds.
 
  
* [https://bugzilla.mozilla.org/attachment.cgi?id=445579 Attachment 442969] on {{bug|514495}} works around this problem.
+
Breakpad may fail to build, complaining about GCC 4.2 not being compatible with the 10.4 SDK. If this happens, open the Breakpad.xcodeproj file in the External Projects folder. Set the Build Configuration to match the Build Configuration set in Camino.xcodeproj. Do a Get Info on the project file in the new project window, and in the Build tab set 'C/C++ Compiler Version' to 'GCC 4.0'.

Latest revision as of 18:36, 22 March 2011

Building on Mac OS X 10.6 is unfortunately rather complicated. Gecko 1.9.2 is not 10.6-build-friendly (and, alas, becomes less so over time). This page contains a full list of supplemental instructions to help you complete a Cm2.1-M1.9.2 build on Mac OS X 10.6 (please be sure you follow all of the other instructions on Development:Building:Mozilla 1.9.2 Branch).

If you discover a new Cm2.1-M1.9.2 on Mac OS X 10.6 build breakage, please let us know in Bug 514495; once there is a solution to the new breakage, we will update these supplemental instructions.

.mozconfig

To build Gecko on Mac OS X 10.6, you must include the following lines in your .mozconfig (in addition to those already listed in Pulling Source and Building Gecko and Camino).

CC="gcc-4.0 -arch i386"
CXX="g++-4.0 -arch i386"
ac_add_options --target=i386-apple-darwin8.0.0

HOST_CC="gcc-4.0"
HOST_CXX="g++-4.0"
RANLIB=ranlib
AR=ar
AS=$CC
LD=ld
STRIP="strip -x -S"
CROSS_COMPILE=1

# gecko crashreporter doesn't build on 10.6
ac_add_options --disable-crashreporter

If you need to hack on about:crashes, you can test your changes by loading chrome://global/content/crashes.xhtml instead.

Local Patches

Currently, additional build failures must be worked around by applying local patches. Apply these patches before beginning your build.

run-mozilla.sh

The run-mozilla.sh script is used in several places during the Gecko build and packaging (regenerating some JavaScript test code, signing NSS libraries), but due to the SQLite linking debacle (Bug 513747), run-mozilla.sh sets an incompatible dyld path.

$ cd mozilla; patch -p1 < path/to/that/patch/as/local/file

Note: this is the only patch that is required in all 10.6/1.9.2 build configurations.

unify vs. osacompile and Camino’s feedhandlers

osacompile on Mac OS X 10.6 will only produce 3-way ppc7400-i386-x86_64 binaries, despite being instructed to generate single-architecture binaries when building our feedhandlers. Mozilla’s unify script can only handle ppc and i386 binaries, so it must be patched in order to properly process the feedhandlers in Universal builds.

$ cd mozilla/build/macosx/universal; patch -p0 < path/to/that/patch/as/local/file

Building in Xcode

Breakpad may fail to build, complaining about GCC 4.2 not being compatible with the 10.4 SDK. If this happens, open the Breakpad.xcodeproj file in the External Projects folder. Set the Build Configuration to match the Build Configuration set in Camino.xcodeproj. Do a Get Info on the project file in the new project window, and in the Build tab set 'C/C++ Compiler Version' to 'GCC 4.0'.