Running xpidl on Snow Leopard
Running xpidl on Snow Leopard with 64 bit Macports is troublesome. I had to install libIDL first, but when I ran xpidl I got following message:
dyld: Library not loaded: /opt/local/lib/libIDL-2.0.dylib Referenced from: /Users/patko/work/xulrunner-sdk/sdk/bin/xpidl Reason: no suitable image found. Did find: /opt/local/lib/libIDL-2.0.dylib: mach-o, but wrong architecture Trace/BPT trap
Installed libIDL is 64 bit, while xpidl support only 32 bit version. Luckily, libIDL can be compiled into universal binary which contains both versions.
First, uninstall libidl, gettext, glib2 and libiconv as all of those must be compiled again with both versions. If you installed grep via Macports, add it on the list below.
sudo port uninstall -f glib2, gettext, libiconv, libidl
Then reinstall everything with +universal switch.
sudo port install libiconv +universal sudo port install glib2 +universal sudo port install libidl +universal
Now libraries are usable, but there’s still one more problem:
can't open included file nsISupports.idl for reading fatal flex scanner internal error--end of buffer missed
Luckily, xpidl has an option for this.
xpidl -m typelib -I path_to_idl myComponent.idl