Mac Intel Gecko SDK

Update: Mozilla now produce intel gecko SDKs so there is no need to use the version I have put here, I’ll leave it for posterity though.

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:

As the name suggests it’s built against Gecko 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.

3 thoughts on “Mac Intel Gecko SDK”

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

    sudo port install libidl

    and I was good to go.

  2. 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- Download ppc build from . Extract and rename folder from gecko-sdk to gecko-sdk-mac-ppc- 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- 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-; do lipo -create -output gecko-sdk/lib/${library} -arch ppc gecko-sdk-mac-ppc-${library} -arch i386 gecko-sdk-mac-intel-${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

Comments are closed.