I got scip optsuite from http://scip.zib.de/#scipoptsuite . It works fine as a standalone program and with the python interface, but I faced the following JNI error when I ran the example.
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jscip-0.1.darwin.x86_64.gnu.opt.spx in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1865)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at de.zib.jscip.nativ.jni.JniScipLibraryLoader.loadLibrary(JniScipLibraryLoader.java:7)
at JniKnapsack.main(JniKnapsack.java:34)
The OS is OS X 10.10.5. I compiled JNI with
make soplex GMP=false
make scip GMP=false ZIMPLE=false
The lib directory for JNI (path-to-scipoptsuite/scip-3.2.0/interfaces/jni/lib) contains the followings, and is referenced by LD_LIBRARY_PATH:
jniinc@ -> /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/include
libjscip-0.1.darwin.x86_64.gnu.opt.spx.so*
libjscip.darwin.x86_64.gnu.opt.so@ -> libjscip-0.1.darwin.x86_64.gnu.opt.spx.so
libjscip.so@ -> libjscip-0.1.darwin.x86_64.gnu.opt.spx.so
liblpispx.darwin.x86_64.gnu.opt.so
libnlpi.cppad.darwin.x86_64.gnu.opt.so
libscip.darwin.x86_64.gnu.opt.so
libsoplex.darwin.x86_64.gnu.opt.so
scip@ -> ../../..
scip.jar
soplex@ -> ../../../../soplex-2.2.0
I would be happy if you could give me a suggestion.
Accordiong to mueldgog's advice, I changed the extension to jnilib. Then another error occurred:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /.../scipoptsuite-3.2.0/scip-3.2.0/interfaces/jni/lib/libjscip-0.1.darwin.x86_64.gnu.opt.spx.jnilib: dlopen(/.../scipoptsuite-3.2.0/scip-3.2.0/interfaces/jni/lib/libjscip-0.1.darwin.x86_64.gnu.opt.spx.jnilib, 1): Library not loaded: lib/liblpispx-3.2.0.darwin.x86_64.gnu.opt.so
Referenced from: /.../scipoptsuite-3.2.0/scip-3.2.0/interfaces/jni/lib/libjscip-0.1.darwin.x86_64.gnu.opt.spx.jnilib
Reason: image not found
otools says:
Load command 11
cmd LC_LOAD_DYLIB
cmdsize 72
name lib/liblpispx-3.2.0.darwin.x86_64.gnu.opt.so (offset 24)
In a Linux environment, where I successfully run the same command, lld says
liblpispx.linux.x86_64.gnu.opt.so => /.../scipoptsuite-3.2.0/scip-3.2.0/lib/liblpispx.linux.x86_64.gnu.opt.so (0x00002b66b3d35000)
So I think I should fix the reference to the absolute path on OS X, but don't know how to fix it. Could you give any advice for this?