MozillaZine

Mac OS 10.6 -> Building Camino

Talk about the native Mac OS X browser.

Moderator: Camino Developers

krmathis

User avatar
 
Posts: 4645
Joined: May 24th, 2004, 9:40 pm
Location: Oslo, Norway
October 4th, 2009, 4:04 am

Post Posted October 4th, 2009, 4:04 am

Yesterday I finally succeeded building Camino trunk (2.1a1pre) on Mac OS 10.6, using Xcode 3.2. :D
After a long time of trial and error...

Mac OS 10.6 is 64-bit as native, while Camino is far from 64-bit ready. So cross-compiling to 32-bit is required.
First hurdle was to cross-compile and install the required libIDL library, in 32-bit. Luckily MacPorts contain a universal libIDL, so after I got the hint about "versions" I got that going using the command - "sudo port install libIDL +universal".

Next out was to configure the .mozconfig for cross-compiling. I had success with this one:
Code: Select all
. $topsrcdir/camino/config/mozconfig

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../build
mk_add_options MOZ_CO_PROJECT=camino
mk_add_options MOZ_MAKE_FLAGS=-j4

ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.5.sdk

ac_add_options --enable-optimize
ac_add_options --enable-static

ac_add_options --enable-application=camino
ac_add_options --enable-macos-target=10.5

ac_add_options --disable-shared
ac_add_options --disable-debug
ac_add_options --disable-tests

# Cross-compile 32-bit, see bug 477945
CC="gcc-4.0 -arch i386"
CXX="g++-4.0 -arch i386"
ac_add_options --target=i386-apple-darwin9.8.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

So GCC 4.0, 10.5 SDK and target 10.5 is fine.
__________________________________________________________________

But all other compiler/SDK variations fails.
Note that GCC 4.2 and 10.5 SDK built just fine on Mac OS 10.5, but not on Mac OS 10.6...

GCC 4.0, 10.6 SDK and target 10.6:
The most promising, as it compiled for ~20 minutes before failing on PrintPDE (it seems) -> http://pastebin.mozilla.org/674431
Code: Select all
#
** BUILD FAILED **
#
#
#
The following build commands failed:
#
PrintPDE:


GCC 4.2, 10.5 SDK and target 10.5:
Errors out almost instantly after beginning to compile -> http://pastebin.mozilla.org/674433
Code: Select all
/Users/username/Development/Camino/mozilla/js/src/jsbit.h:220: error: size of array ‘arg’ is negative


GCC 4.2, 10.6 SDK and target 10.6:
Errors out almost instantly after beginning to compile -> http://pastebin.mozilla.org/674434
Code: Select all
/Users/username/Development/Camino/mozilla/js/src/jsatom.h:69: error: size of array ‘arg’ is negative
#
make[4]: *** [jsarray.o] Error 1

Full logs available on request.

I know that none of these are supported build configurations, but would appreciate if someone more knowledgeable than me looked into it.
Thanks!

phiw13
 
Posts: 2066
Joined: November 7th, 2002, 1:00 am
Location: Japan
October 5th, 2009, 1:59 am

Post Posted October 5th, 2009, 1:59 am

Thanks for banging your head against a brickwall for us... - and for finding a solution ! :^)

All those build errors are in core Gecko 1.9.0 code. Not much hope of ever seeing that 'fixed', one way or another. Unless those are the result of bugs in Apple's developer tools.
The errors with GCC 4.2 and the 10.5sdk are very similar to what Al Billings had in bug 477945 (building Firefox 3.0 /Gecko 1.9.0).

----
How is the performance of the successful build (compared to an official build ?)

Uncle Asad
Camino Developer

User avatar
 
Posts: 3348
Joined: July 24th, 2004, 1:38 pm
Location: بين العالمين
October 5th, 2009, 9:49 am

Post Posted October 5th, 2009, 9:49 am

phiw13 wrote:All those build errors are in core Gecko 1.9.0 code. Not much hope of ever seeing that 'fixed', one way or another. Unless those are the result of bugs in Apple's developer tools.
The errors with GCC 4.2 and the 10.5sdk are very similar to what Al Billings had in bug 477945 (building Firefox 3.0 /Gecko 1.9.0).

Since there are at least two others (Al Billings of MozQA and aaronr of XForms) who are apparently trying to do the 4.2/10.5 dance with Gecko 1.9.0 on 10.6 (and since that combination worked previously on 10.5), it can't hurt to file a bug (against the JS engine, I guess, since that's where the failure is) on the matter and cc those two.

At the very least you'll get a "this is not a supported config, so we won't look into it" answer and know for sure (since the JS engine is also a separate product, it might even officially support more configurations, so it might be "we'll look into it").

You'll want to have the full build log handy if you do file the bug; the snippet from where it errors isn't terribly useful, since the build command looks just like one in a successful build, so the error's further back, but I don't know where they'll want to see snippets from.
Mac OS X 10.3.9 • PowerBook G4 17" 1.33 GHz | Mac OS X 10.5.x • MacBook Pro 15" 2.2 GHz
Snow7's Camino Forum FAQSearch the Forum  Camino. HelpTroubleshoot Camino

krmathis

User avatar
 
Posts: 4645
Joined: May 24th, 2004, 9:40 pm
Location: Oslo, Norway
October 5th, 2009, 9:56 am

Post Posted October 5th, 2009, 9:56 am

My pleasure... ^_^
Yeah it seems to be related to Gecko code, so I guess getting fixes back here on 1.9.0 is minimal. At least there seems to be hope for the future, if we take on gecko 1.9.3 (or later).

----

No ran any performance comparison, so unsure if my builds run faster/slower than the official ones.
I just happen to like living on the "bleeding edge", with the latest trunk code compiled with the latest compiler and SDK.

phiw13
 
Posts: 2066
Joined: November 7th, 2002, 1:00 am
Location: Japan
October 7th, 2009, 5:26 am

Post Posted October 7th, 2009, 5:26 am

Has a bug been filed on this ?

(it is a bit difficult to do it myself as I don't have 10.6. yet).

krmathis

User avatar
 
Posts: 4645
Joined: May 24th, 2004, 9:40 pm
Location: Oslo, Norway
October 8th, 2009, 6:10 am

Post Posted October 8th, 2009, 6:10 am

Ooops, totally missed the 'Uncle Asad' reply. Since we replied at the same time.
I will do my best to file a bug, then report back.

Edit:
Bug 521229 files. Please fill me in I have missed out of something... :-"
https://bugzilla.mozilla.org/show_bug.cgi?id=521229

Rttam

User avatar
 
Posts: 4
Joined: October 4th, 2009, 12:20 pm
October 8th, 2009, 5:28 pm

Post Posted October 8th, 2009, 5:28 pm

Krmathis, so far so good. Keep up the good work, my friend. :)

krmathis

User avatar
 
Posts: 4645
Joined: May 24th, 2004, 9:40 pm
Location: Oslo, Norway
October 9th, 2009, 10:18 am

Post Posted October 9th, 2009, 10:18 am

A bit sad to see Bug 521229 getting status "WONTFIX", but understandable...
Hopefully someone take on integrating Gecko 1.9.[3,4, ..] with Camino in the not too distant future. One can always cross fingers. :D

cflawson

User avatar
 
Posts: 4130
Joined: December 26th, 2004, 2:54 pm
Location: Flying over your house in a red, white, and blue jet
October 9th, 2009, 11:35 am

Post Posted October 9th, 2009, 11:35 am

krmathis wrote:A bit sad to see Bug 521229 getting status "WONTFIX", but understandable...
Hopefully someone take on integrating Gecko 1.9.[3,4, ..] with Camino in the not too distant future. One can always cross fingers. :D


Yeah, I'm personally a little worried about what's going to happen when the 1.9.0 branch goes unsupported and we're stuck without a build system...

Maybe you want to work on getting a mozilla-central build up and running instead? That's even more bleeding-edge ;) I know I'd be willing to help out.

cl

krmathis

User avatar
 
Posts: 4645
Joined: May 24th, 2004, 9:40 pm
Location: Oslo, Norway
October 9th, 2009, 2:17 pm

Post Posted October 9th, 2009, 2:17 pm

^ Well, if I knew my way around coding I would be pleased to.
But sadly I do not, or have the time taking on learning it, so compiling/testing/filing bugs it is... ;)

cflawson

User avatar
 
Posts: 4130
Joined: December 26th, 2004, 2:54 pm
Location: Flying over your house in a red, white, and blue jet
October 9th, 2009, 3:47 pm

Post Posted October 9th, 2009, 3:47 pm

You managed to get as far as you did with 1.9.0, so I think you're probably more capable of working this out than you think ;)

cl

Return to Camino


Who is online

Users browsing this forum: krmathis and 5 guests