Oracle FFI - External module not found on OS X

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Oracle FFI - External module not found on OS X

recursive
Thanks, it's giving this, so it's appears to be 32 bit (I compiled with CFLAGS=-m32):

/usr/local/lib/libocilib.dylib: Mach-O dynamically linked shared library i386


I think the library is ok, it's just not being found by Pharo when I launch it as an application from the Finder dialog. If I launch Pharo from a terminal window,like ./Pharo, it finds the library using DYLD_LIBRARY_PATH and DYLD_FALLBACK_LIBRARY_PATH, it doesn't even need a sym link in the Pharo Plugins directory and the library is found by Pharo and works.


If I create a sym link in the Plugins directory or copy the dylib to the Plugins directory and launch Pharo via the Finder dialog window, it fails with "External module not found", so it appears to be how Pharo and/or OSX sets it library path when launched as an Application that is causing the issue.


Thanks.

Reply | Threaded
Open this post in threaded view
|

Re: Oracle FFI - External module not found on OS X

Udo Schneider
On 28/04/15 00:03, [hidden email]
wrote:
> If I create a sym link in the Plugins directory or copy the dylib to the
> Plugins directory and launch Pharo via the Finder dialog window, it
> fails with "External module not found", so it appears to be how Pharo
> and/or OSX sets it library path when launched as an Application that is
> causing the issue.
Just by chance (have been there before :-( )... Are you starting by
double clicking on the image or on the app (and then choose the image).
I got bitten by something similar where Pharo didn't pick up the
library. Took me some tracing to find out that Mac OS X was using
another VM to start the image than the one I was adding the library to :-)

After starting the image ry something like

$ ps aux | grep Pharo

to verify which VM gets picked. If this doesn't help lsof and
Instruments are your friends :-)


CU,

Udo