Export to GitHub

pyrit - issue #163

/usr/bin/ld: skipping incompatible, cannot find -lOpenCL


Posted on Jun 16, 2010 by Swift Ox

What steps will reproduce the problem? 1. install cpyrit-opencl-0.3.0

What is the expected output? What do you see instead? running build running build_ext Building modules... building 'cpyrit._cpyrit_opencl' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/opencl/include -I/usr/include/python2.6 -c _cpyrit_opencl.c -o build/temp.linux-x86_64-2.6/_cpyrit_opencl.o -DVERSION="0.3.0" gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.6/_cpyrit_opencl.o -lssl -lOpenCL -lz -o build/lib.linux-x86_64-2.6/cpyrit/_cpyrit_opencl.so /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libOpenCL.so when searching for -lOpenCL /usr/bin/ld: skipping incompatible /usr/lib/../lib/libOpenCL.so when searching for -lOpenCL /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../libOpenCL.so when searching for -lOpenCL /usr/bin/ld: skipping incompatible /usr/lib64/libOpenCL.so when searching for -lOpenCL /usr/bin/ld: skipping incompatible /usr/lib/libOpenCL.so when searching for -lOpenCL /usr/bin/ld: cannot find -lOpenCL collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1

What version of the product are you using? On what operating system? No problems to install Pyrit 0.3.0; main module i'm using Ubuntu 10.04 Lucid 64Bits.

Please provide any additional information below. I think there is a problem with 64bits and cpyrit-opencl-0.3.0, no ?

thanks

Comment #1

Posted on Jun 18, 2010 by Helpful Bird

It looks like you have installed 32 bit version of OpenCL library.

Comment #2

Posted on Jun 25, 2010 by Helpful Lion

Same problem here.

I'm using Linux Mint 64Bit but I installed the 64Bit version of the OpenCL library (ati-stream-sdk-v2.1-lnx64).


running build running build_ext Building modules... building 'cpyrit._cpyrit_opencl' extension gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.6/_cpyrit_opencl.o -lssl -lOpenCL -lz -o build/lib.linux-x86_64-2.6/cpyrit/_cpyrit_opencl.so /usr/bin/ld: cannot find -lOpenCL collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1

Comment #3

Posted on Jun 25, 2010 by Helpful Lion

UPDATE: I runned the command: sudo gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.6/_cpyrit_opencl.o -lssl -OpenCL -lz -o build/lib.linux-x86_64-2.6/cpyrit_cpyrit_opencl.so manually (replaced the -lOpenCL with -OpenCL) and then I runned: sudo python setup.py install The output was: running install running build running build_ext Building modules... running install_lib copying build/lib.linux-x86_64-2.6/cpyrit/_cpyrit_opencl.so -> /usr/local/lib/python2.6/dist-packages/cpyrit running install_egg_info Writing /usr/local/lib/python2.6/dist-packages/cpyrit_opencl-0.3.0.egg-info

But pyrit don't list my ATi HD5850 :(

Comment #4

Posted on Jun 25, 2010 by Helpful Bird

You can't replace -lOpenCL with -OpenCL

Your compiler can't find proper OpenCL library. Try to install original ATI STREAM SDK.

Comment #5

Posted on Jun 25, 2010 by Helpful Lion

Okay, thank you for your answer. Where I can find the original ATI STREAM SDK? I downloaded it from http://developer.amd.com/gpu/ATIStreamSDK/Pages/default.aspx this: http://developer.amd.com/Downloads/ati-stream-sdk-v2.1-lnx64.tgz (for my 64Bit-System)... Should I download the 32Bit-version? (http://developer.amd.com/Downloads/ati-stream-sdk-v2.1-lnx32.tgz)

Comment #6

Posted on Jun 25, 2010 by Helpful Bird

For some reason compiler finds libOpenCL.so files in different directories. And these are invalid files. You should remove package which installed those. Compiler should find libOpenCL.so only in directory with ATI SDK.

Comment #7

Posted on Jun 25, 2010 by Helpful Lion

I searched for the file "libOpenCL.so", but it was only in the ATI SDK Directory...

I rebooted my machine and runned again the build-command for cpyrit-opencl-0.3.0 (sudo python setup.py build) and now the output is:

running build running build_ext Building modules...

Then I runned "sudo python setup.py install", output:

running install running build running build_ext Building modules... running install_lib running install_egg_info Removing /usr/local/lib/python2.6/dist-packages/cpyrit_opencl-0.3.0.egg-info Writing /usr/local/lib/python2.6/dist-packages/cpyrit_opencl-0.3.0.egg-info

When I list the cores:

Pyrit 0.3.0 (C) 2008-2010 Lukas Lueg http://pyrit.googlecode.com This code is distributed under the GNU General Public License v3+

The following cores seem available...

1: 'CPU-Core (SSE2)'

2: 'CPU-Core (SSE2)'

3: 'CPU-Core (SSE2)'

4: 'CPU-Core (SSE2)'

5: 'CPU-Core (SSE2)'

6: 'CPU-Core (SSE2)'

7: 'CPU-Core (SSE2)'

8: 'CPU-Core (SSE2)'

9: 'Network-Clients'

Hmm, what I've done? ...

Comment #8

Posted on Jun 25, 2010 by Helpful Bird

It looks like the opencl doesn't find any devices. There are many possible issues. You should try first to run any example from OpenCL SDK. Usually you need to do few things to have OpenCL working - it's all described in ATI SDK readme.

Comment #9

Posted on Jun 26, 2010 by Helpful Lion

Okay, we have the error... When I run for example "HelloCL" in ati-stream-sdk-v2.1-lnx64/samples/opencl/bin/x86_64 then I get the following error:

./HelloCL: error while loading shared libraries: libOpenCL.so: cannot open shared object file: No such file or directory

So I placed the "libOpenCL.so" from "ati-stream-sdk-v2.1-lnx64/lib/x86_64/libOpenCL.so" in "/usr/lib".

Now the output from HelloCL:

HelloCL! Getting Platform Information Segmentation fault

I runned all the build & install commands for setup.py. Output:

running build running build_ext Building modules... building 'cpyrit._cpyrit_opencl' extension creating build creating build/temp.linux-x86_64-2.6 gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/home/stammi/Downloads/ati/ati-stream-sdk-v2.1-lnx64/include -I/usr/include/python2.6 -c _cpyrit_opencl.c -o build/temp.linux-x86_64-2.6/_cpyrit_opencl.o -DVERSION="0.3.0" creating build/lib.linux-x86_64-2.6 creating build/lib.linux-x86_64-2.6/cpyrit gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.6/_cpyrit_opencl.o -lssl -lOpenCL -lz -o build/lib.linux-x86_64-2.6/cpyrit/_cpyrit_opencl.so

and:

running install running build running build_ext Building modules... running install_lib copying build/lib.linux-x86_64-2.6/cpyrit/_cpyrit_opencl.so -> /usr/local/lib/python2.6/dist-packages/cpyrit running install_egg_info Removing /usr/local/lib/python2.6/dist-packages/cpyrit_opencl-0.3.0.egg-info Writing /usr/local/lib/python2.6/dist-packages/cpyrit_opencl-0.3.0.egg-info

Output from list_cores:

Segmentation fault

I'm damned :(

Comment #10

Posted on Jun 28, 2010 by Helpful Lion

Yay =) Thank you very much for your help hazeman11.

I reinstalled the ATI-Driver (ati-driver-installer-10-6-x86.x86_64.run) and now the OpenCL-Device works :)


Pyrit 0.3.0 (C) 2008-2010 Lukas Lueg http://pyrit.googlecode.com This code is distributed under the GNU General Public License v3+

Running benchmark (29453.1 PMKs/s)... |

Computed 29845.54 PMKs/s total.

1: 'OpenCL-Device 'Cypress'': 27048.2 PMKs/s (RTT 2.2)

2: 'CPU-Core (SSE2)': 308.6 PMKs/s (RTT 2.7)

3: 'CPU-Core (SSE2)': 397.9 PMKs/s (RTT 2.5)

4: 'CPU-Core (SSE2)': 280.0 PMKs/s (RTT 2.8)

5: 'CPU-Core (SSE2)': 291.9 PMKs/s (RTT 3.0)

6: 'CPU-Core (SSE2)': 291.8 PMKs/s (RTT 2.9)

7: 'CPU-Core (SSE2)': 288.6 PMKs/s (RTT 2.8)

8: 'CPU-Core (SSE2)': 284.4 PMKs/s (RTT 2.9)

9: 'Network-Clients': 0.0 PMKs/s (RTT 0.0)

Comment #11

Posted on Jun 28, 2010 by Helpful Bird

If you are interested CAL++ based core is >90% faster ( available in svn ).

Comment #12

Posted on Jun 29, 2010 by Helpful Lion

Yeah, thank you, but I've already installed it yesterday :) I get about 70.000 PKMs/s! Really good work =)

Status: Invalid

Labels:
Type-Defect Priority-Medium