fabianmurariu / graphblas-java-native

graphblas wrapper for java using JNI
Apache License 2.0
8 stars 2 forks source link

UnsatisfiedLinkError when trying to run the tests #14

Closed FlorentinD closed 3 years ago

FlorentinD commented 3 years ago

I had this error a couple of times, but it previously could be resolved by restarting the computer. OS: Ubuntu 20.04.1 Previous commands:

git clone --recurse-submodules https://github.com/fabianmurariu/graphblas-java-native.git
sudo make grb-install

Command: mvn clean install

  java.lang.UnsatisfiedLinkError: ../graphblas-java-native/graphblas-java/target/nar/graphblas-java-0.1.21-amd64-Linux-gpp-jni/lib/amd64-Linux-gpp/jni/libgraphblas-java-0.1.21.so: libgraphblas.so.4: cannot open shared object file: No such file or directory
  at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
  at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
  at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
  at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
  at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2627)
  at java.base/java.lang.Runtime.load0(Runtime.java:768)
  at java.base/java.lang.System.load(System.java:1834)
  at com.github.fabianmurariu.unsafe.NarSystem.loadLibrary(NarSystem.java:43)
  at com.github.fabianmurariu.unsafe.GRBCORE.<clinit>(GRBCORE.java:8)
  at com.github.fabianmurariu.unsafe.GRAPHBLASSpec.beforeAll(GRAPHBLASSpec.scala:117)

Interestingly the C files get compiled, so the graphblas lib could be found at a previous step. I also made sure the library is installed under /usr/local/lib. My first guess was a permission issue but libgraphblas.so.4 has lrwxrwxrwx. Do you know how to properly resolve this error?

FlorentinD commented 3 years ago

FYI: rebuilding via ldconfig did the trick.