Hi, I checked the symbol table:
nm /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libclient.dylib | grep JNI_CreateJavaVM_Impl 00006ee9 T _JNI_CreateJavaVM_Impl so it seems that the exported symbol is _JNI_CreateJavaVM_Impl Luc #Luc 2013/9/15 Joachim Geidel <[email protected]> > I am trying to change JNIPort such that it uses NativeBoost instead of > Alien. > The first problem I ran into is that I can't load a function from the Java > VM library libclient.dylib on OS X 10.8.5 in Pharo 2.0. I am using the > 1.6.0 > JDK from Apple, and libclient.dylib is an i386 (i.e. 32 bit) library. The > following expression answers nil: > > NativeBoost > loadFunction: 'JNI_CreateJavaVM_Impl' > from: > > '/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libclient.dylib' > > The same happens when I copy libclient.dylib to the working directory and > do > not specify a path. The only way to produce a different behavior is copying > the library into the Pharo2.0.app bundle and put it in the directory > Pharo2.0.app/Contents/MacOS/Plugins. Then, executing > > NativeBoost loadFunction: 'JNI_CreateJavaVM_Impl' from: > 'libclient.dylib' > > crashes Pharo when attempting to load the library: > > Crashed Thread: 0 Dispatch queue: com.apple.main-thread > > Exception Type: EXC_BAD_ACCESS (SIGABRT) > Exception Codes: EXC_I386_GPFLT > > Application Specific Information: > dyld: in dlopen() > abort() called > > Thread 0 Crashed:: Dispatch queue: com.apple.main-thread > 0 libsystem_kernel.dylib 0x03f34a6a __pthread_kill + 10 > 1 libsystem_c.dylib 0x03df0b2f pthread_kill + 101 > 2 libsystem_c.dylib 0x03e27631 abort + 168 > 3 org.pharo.Pharo 0x0019f04a error + 138 > 4 ??? 0xffffffff 0 + 4294967295 > 5 libdyld.dylib 0x03da5be9 > getPerThreadBufferFor_dlerror(unsigned int) + 108 > 6 dyld 0x8fe87076 dlerrorSet(char const*) + 47 > 7 dyld 0x8fe8454c dlopen + 533 > 8 libdyld.dylib 0x03da5dbe dlopen + 68 > 9 org.pharo.Pharo 0x001a1d65 tryLoadingInternals + 293 > > Any ideas what is wrong? > > Joachim Geidel > > > > -- > View this message in context: > http://forum.world.st/NativeBoost-Can-t-load-function-on-OS-X-10-8-5-tp4708359.html > Sent from the Pharo Smalltalk Developers mailing list archive at > Nabble.com. > >
