FAIL: libIDL on Mac OS X 10.6 (Snow Leopard)
Since I upgraded my laptop to Snow Leopard, I’ve been trying to setup my development environment so that I can compile idl files. I need to do this for one of the Firefox extension I work on. I’ve been able to put this off for a while since my interfaces haven’t changed in a while. I’ve recently changed an interface so now I need to get the idl compiling setup. When I’ve set this up in the past, I haven’t had any problems. I install the gecko sdk, install libidl, and I’m ready to roll. This time I can’t make it work so I’m turning to you, the interweb, to help me figure this out. Here is what I’ve go so far.
I install the Gecko 1.9.1 SDK from developer.mozilla.org. I then install libidl using the following commands in MacPorts:
sudo port selfupdate sudo port sync sudo port install libidl
Now, when I run my build script I get the error:
[exec] dyld: Library not loaded: /opt/local/lib/libIDL-2.0.dylib
[exec] Referenced from: /Developer/xulrunner-sdk-1.9.1/bin/xpidl
[exec] Reason: no suitable image found. Did find:
[exec] /opt/local/lib/libIDL-2.0.dylib: mach-o, but wrong architecture
Figuring that libidl is compiled as 64 bit and the gecko sdk is 32 bit, I go searching the web. This leads me to a forum post on compiling Camino on Snow Leopard.
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”.
Alright, so now I’m trying to install the universal libIDL file and I hit another error.
Command output: _IDL_inhibit_get in libIDL_2_la-parser.o
_IDL_queue_new_ident_comment in libIDL_2_la-parser.o
_IDL_file_set in libIDL_2_la-parser.o
___IDL_do_pragma in libIDL_2_la-parser.o
_IDL_ns_scope_levels_from_here in libIDL_2_la-ns.o
_IDL_tree_properties_copy in libIDL_2_la-util.o
_IDL_tree_walk2 in libIDL_2_la-util.o
_IDL_tree_to_IDL in libIDL_2_la-util.o
_IDL_tree_get_scope in libIDL_2_la-util.o
_IDL_tree_remove_inhibits in libIDL_2_la-util.o
_IDL_tree_property_remove in libIDL_2_la-util.o
_IDL_tree_property_get in libIDL_2_la-util.o
_IDL_tree_property_set in libIDL_2_la-util.o
"_g_log", referenced from:
_IDL_check_type_cast in libIDL_2_la-util.o
_IDL_tree_walk_real in libIDL_2_la-util.o
_IDL_tree_walk_real in libIDL_2_la-util.o
_IDL_emit_IDL_literal in libIDL_2_la-util.o
_IDL_tree_get_node_info in libIDL_2_la-util.o
_IDL_tree_get_scope in libIDL_2_la-util.o
_IDL_tree_remove_empty_modules in libIDL_2_la-util.o
_IDL_tree_remove_inhibits in libIDL_2_la-util.o
_IDL_tree_process_forward_dcls in libIDL_2_la-util.o
_load_inhibits in libIDL_2_la-util.o
_IDL_tree_free in libIDL_2_la-util.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [libIDL-2.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Here is where I’m stuck. I have no idea what symbols are missing. Please, leave me a comment if you have any ideas on how to make this work.