|Problem with Bundle-NativeCode and macosx [message #552352]
||Wed, 11 August 2010 20:27
| Lars Holmstrom
Registered: August 2010
Does anybody have any experience bundling native libraries with your plugins using the OSGi Manifest's Bundle-NativeCode directive? I am using this directive to target several different platforms. It works for Win32/64 and Linux 32/64, but can't get it to work for MacOSx. Here is my Bundle-NativeCode directive:|
Bundle-NativeCode: /libNative/Linux/x64/libapdm.so; /libNative/Linux/x64/ftd2xx.so; osname=linux; processor=x86_64,
/libNative/Linux/i386/libapdm.so; /libNative/Linux/i386/ftd2xx.so; osname=linux; processor=x86,
/libNative/Windows/i386/apdm.dll; /libNative/Windows/i386/ftd2xx.dll; osname=win32; processor=x86,
/libNative/Windows/x64/apdm.dll; /libNative/Windows/x64/ftd2xx64.dll; osname=win32; processor=x86_64,
/libNative/MacOSX/i386/ftd2xx.dylib; /libNative/MacOSX/i386/libapdm.dylib; osname=macosx; processor=x86,
/libNative/MacOSX/x64/ftd2xx.dylib; /libNative/MacOSX/x64/libapdm.dylib; osname=macosx; processor=x86_64
Here are some notes:
* The error I get is of the "external library not found" variety, and is identical to the error I get on any platform when the libraries are missing.
* I have confirmed that the libraries are all spelled correctly and are getting bundled with the MacOSX plugin jar file, via the "Binary Build" mechanism.
* If I misspell one of the MacOSX native libraries, the application won't launch due to an error (Missing host Bundle-NativeCode_0.0.0.). In other words, it IS reading the directive and DOES parse the library names at launch time.
* If I add these libraries to plugin_root\Plugin.app\Contents\MacOS, they are found and used correctly and the program works as expected on a Mac machine. This is a hassle, however, because it is an extra deployment step and the libraries won't be automatically updated when the plugin is.
* I am running Eclipse 3.5.2
Here are a couple of questions:
* Has anyone done this with Gallileo and gotten it to work?
* Is it perhaps fixed in Helios?
* Anybody have any hints on how to debug this kind of thing? I have turned all of the debug logging options on in the org.eclipse.osgi.jar .options file, but this does not provide any feedback about the loading of native libraries.
* The root directory for MacOSX apps is not the plugin_root folder, but is rather the plugin_root\Plugin.app\Contents\MacOS folder. Perhaps this could be part of the issue?
Powered by FUDForum
. Page generated in 0.01617 seconds