Oracle FFI - External module not found on OS X

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

Oracle FFI - External module not found on OS X

recursive
Hi,

I wrote a FFI wrapper for an Oracle library ( OCILib ) sometime ago, which worked on Pharo 1.4 and Pharo 2.0 / 3.0. I'm now trying to use it with Pharo 4.0 and its failing with "External module not found". This is on OSX and I've set DYLD_LIB_LIBRARY so the OCILib dylib is present in it. I've also tried putting a sym link to the library in Resources directory. Do I need to set anything else, such as Info.plist ?

Thanks
Reply | Threaded
Open this post in threaded view
|

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

Ben Coman

On Sun, Apr 26, 2015 at 3:04 AM, <[hidden email]> wrote:
Hi,

I wrote a FFI wrapper for an Oracle library ( OCILib ) sometime ago, which worked on Pharo 1.4 and Pharo 2.0 / 3.0. I'm now trying to use it with Pharo 4.0 and its failing with "External module not found". This is on OSX and I've set DYLD_LIB_LIBRARY so the OCILib dylib is present in it. I've also tried putting a sym link to the library in Resources directory. Do I need to set anything else, such as Info.plist ?

Thanks

Not that I can help, but I presume this is all on the same machine?

cheers -benĀ 

Reply | Threaded
Open this post in threaded view
|

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

Pierce Ng-3
In reply to this post by recursive
On Sat, Apr 25, 2015 at 08:04:30PM +0100, [hidden email] wrote:
> also tried putting a sym link to the library in Resources directory. Do I

Should go into MacOS/Plugins. You'll see a bunch of dylib files there.


Reply | Threaded
Open this post in threaded view
|

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

Udo Schneider
In reply to this post by recursive
On 25/04/15 21:04, [hidden email]
wrote:
> I wrote a FFI wrapper for an Oracle library ( OCILib ) sometime ago,
> which worked on Pharo 1.4 and Pharo 2.0 / 3.0. I'm now trying to use it
> with Pharo 4.0 and its failing with "External module not found". This is
> on OSX and I've set DYLD_LIB_LIBRARY so the OCILib dylib is present in
> it. I've also tried putting a sym link to the library in Resources
> directory. Do I need to set anything else, such as Info.plist ?
Could you make sure that you actually have an 32bit or universal version
of OCILib?

You can check with "file libraryname.dylib". If this is an 64bit-only
lib only you'll get that error even if the lib is found.

64bit Only lib:

$ file /usr/local/lib/libjpeg.dylib
/usr/local/lib/libjpeg.dylib: Mach-O 64-bit dynamically linked shared
library x86_64

"Universal" lib:
$ file /usr/local/lib/libnanomsg.dylib
/usr/local/lib/libnanomsg.dylib: Mach-O universal binary with 2
architectures
/usr/local/lib/libnanomsg.dylib (for architecture i386): Mach-O
dynamically linked shared library i386
/usr/local/lib/libnanomsg.dylib (for architecture x86_64): Mach-O 64-bit
dynamically linked shared library x86_64


CU,

Udo