Mac Intel Gecko SDK

Posted: May 13th, 2007

It’s currently a bit of a pain building xpcom components in intel macs. The only officially available sdk is ppc only. Until Mozilla come up with an official version, here is an intel build of it for those that want it: gecko-sdk-mac-intel-1.8.1.3.zip

As the name suggests it’s built against Gecko 1.8.1.3. To the best of my knowledge it’s right but please don’t bug me if you can’t get your component to work with it unless you’re pretty positive that it’s the sdk that’s wrong.

Right now I have no clue how you’d go about making a universal sdk, maybe if you know of a simple way then you could get in touch.

Categories: mozilla

Post a comment

Comments

October 29, 2007 Paul Dann

The following walkthrough may be helpful to those that would like to create a Universal SDK and XUL.framework:

http://www.danns.co.uk/HowToBuildUniversalSDK

Apologies if you have difficulty accessing it. It’s currently hosted on a home server.

September 5, 2007 Eric Searcy

Thanks! This was a big help not having to compile these myself. However, I wanted the universal ones, so I went ahead and built those too. This works for me; YMMV. Here’s how I did it:

Download Dave’s build, and extract (the folder will be gecko-sdk-mac-intel-1.8.1.3). Download ppc build from http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.8.1.3/contrib/sdk/ . Extract and rename folder from gecko-sdk to gecko-sdk-mac-ppc-1.8.1.3. Create a copy of the Intel version (I chose Dave’s as my base, because there are some slight differences in header files with the Intel ones having more #define lines).

$ cp -R gecko-sdk-mac-intel-1.8.1.3/ gecko-sdk

Then remove the libraries from the copy.

$ rm gecko-sdk/lib/*

The tool to use is lipo, see LIPO(1) for more info. I’m using a `sh’ for loop to streamline creating the Mach-O fat file:

$ for library in $(ls gecko-sdk-mac-intel-1.8.1.3/lib/); do lipo -create -output gecko-sdk/lib/${library} -arch ppc gecko-sdk-mac-ppc-1.8.1.3/lib/${library} -arch i386 gecko-sdk-mac-intel-1.8.1.3/lib/${library}; done

Test to see that it worked:

$ ls gecko-sdk/lib/

libembed_base_s.a libplc4.dylib libxpcom.dylib libxpcomglue_s.a

libnspr4.dylib libplds4.dylib libxpcomglue.a

$ file gecko-sdk/lib/libxpcom.dylib

gecko-sdk/lib/libxpcom.dylib: Mach-O fat file with 2 architectures

gecko-sdk/lib/libxpcom.dylib (for architecture ppc): Mach-O dynamically linked shared library ppc

gecko-sdk/lib/libxpcom.dylib (for architecture i386): Mach-O dynamically linked shared library i386

July 14, 2007 Jeff Boulter

Thanks. Looks like it needs libIDL to work. I did

sudo port install libidl

and I was good to go.