UnsatisfiedLinkError

I have read the FAQ for UnsatisfiedLinkErrors but my problem was not solved. Here is the console output;

/home/alex/AMD-APP-SDK-v2.4-lnx64/lib/x86_64/
Obtaining platform...
Error while loading native library "JOCL-linux-x86_64" with base name "JOCL"
Operating system name: Linux
Architecture         : amd64
Architecture bit size: 64
Stack trace from the attempt to load the library as a resource:
java.lang.UnsatisfiedLinkError: /tmp/libJOCL-linux-x86_643195663378429660897.so: libOpenCL.so.1: cannot open shared object file: No such file or directory
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1750)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1646)
	at java.lang.Runtime.load0(Runtime.java:787)
	at java.lang.System.load(System.java:1022)
	at org.jocl.LibUtils.loadLibraryResource(LibUtils.java:161)
	at org.jocl.LibUtils.loadLibrary(LibUtils.java:83)
	at org.jocl.CL.<clinit>(CL.java:47)
	at org.jocl.samples.JOCLSample.main(JOCLSample.java:59)
Stack trace from the attempt to load the library as a file:
java.lang.UnsatisfiedLinkError: no JOCL-linux-x86_64 in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681)
	at java.lang.Runtime.loadLibrary0(Runtime.java:840)
	at java.lang.System.loadLibrary(System.java:1047)
	at org.jocl.LibUtils.loadLibrary(LibUtils.java:93)
	at org.jocl.CL.<clinit>(CL.java:47)
	at org.jocl.samples.JOCLSample.main(JOCLSample.java:59)
Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load the native library
	at org.jocl.LibUtils.loadLibrary(LibUtils.java:117)
	at org.jocl.CL.<clinit>(CL.java:47)
	at org.jocl.samples.JOCLSample.main(JOCLSample.java:59)

The first line outputs java.library.path and it is correct but the error still says “libOpenCL.so.1” does not exist.

Hello

A similar message has been reported in this thread. Although it is not perfectly clear what was the reason there, it seemed to be resolved after I asked which OpenCL implementation the user had installed - so maybe asking this question will help here as well…? :wink:

bye
Marco

I am using ATI APP 2.4

Hello

OK, I searched the forum again since this error message seemed somehow familiar, and indeed, the problem already occurred in this thread (and in a similar form form JCuda). It seems that a symbolic link has to be created to the respective file, so that the file can be found.

BTW: Did you set up your LD_LIBRARY_PATH and the other environment variables, as described in the AMD_APP_SDK_Installation_Notes (PDF File) ?

In doubt, I’ll ask the contributor of the binaries if he has an idea what might be wrong there.

bye
Marco