cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

bubu
Adept II

linux libOpenCL.so deployment

I don't want to add it to the LD_LIBRARY_PATH. I want a "local" deployment without affecting the user's system.

 

I copied the libOpenCL.so to my linux app's executable path. For example,

if the user installs the application to /home/me/Myapp then my program will install there the following files:

/home/me/Myapp/MyApp.bin

/home/me/Myapp/libOpenCL.so

 

but this does not work...

 

If I make a ldd MyApp.bin says:

 

    linux-gate.so.1 =>  (0xb80b8000)
    libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb808b000)
    libOpenCL.so => not found
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7f9b000)
    libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7f75000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7f66000)
    libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7e03000)
    /lib/ld-linux.so.2 (0xb80b9000)

it's not found. Why and how can I fix this, pls?

thx

 

 

0 Likes
1 Reply
bubu
Adept II

Ok, I got it... Solution:

 

Add "-R ./" option to the linker.

Copy the libOpenCL.so to the executable's path.

Voilá.

0 Likes