Page 1 of 1

OpenCL linking problems on Mac

Posted: 2010-09-13T07:58:36-07:00
by blackhaz
Hello!

Can't link OpenCL for some reason.
I have the OpenCL installed, as part of Mac OS X Snow Leopard 10.6.4. It looks like configure locates it:

from config.log:
configure:8927: checking OpenCL/cl.h usability
configure:8927: gcc -std=gnu99 -std=gnu99 -c -fopenmp -g -O2 -Wall -D_THREAD_SAFE -D_THREAD_SAFE -D_THREAD_SAFE conftest.c >&5
configure:8927: $? = 0
configure:8927: result: yes
configure:8927: checking OpenCL/cl.h presence
configure:8927: gcc -E -D_THREAD_SAFE -D_THREAD_SAFE conftest.c
configure:8927: $? = 0
configure:8927: result: yes
configure:8927: checking for OpenCL/cl.h
configure:8927: result: yes
...
| #define HAVE_OPENCL_CL_H 1

then later:

configure:8954: checking for OpenCL library
configure:8997: gcc -std=gnu99 -std=gnu99 -o conftest -fopenmp -g -O2 -Wall -D_THREAD_SAFE -D_THREAD_SAFE -D_THREAD_SAFE -L/System/Library/Frameworks/OpenCL.framework/Versions/Current/Libraries conftest.c -lOpenCL -lm >&5
ld: library not found for -lOpenCL

Contents of /System/Library/Frameworks/OpenCL.framework/Versions/Current/Libraries:

bash-3.2$ ls -lr
total 8336
-rwxr-xr-x 1 root wheel 80944 Apr 8 04:10 libcldcpuengine.dylib
-rwxr-xr-x 1 root wheel 7961680 Jun 11 01:12 libcl2module.dylib
-rwxr-xr-x 1 root wheel 230752 Jun 11 01:12 libCLVMPTXPlugin.dylib
-rwxr-xr-x 1 root wheel 385376 Jun 11 01:12 libCLVMCPUPlugin.dylib
-rwxr-xr-x 1 root wheel 268704 Jun 11 01:12 libCLVMAMDilPlugin.dylib
-rwxr-xr-x 1 root wheel 1385936 Jun 11 01:12 PTX.dylib
drwxr-xr-x 22 root wheel 748 Jun 24 21:31 ImageFormats
-rwxr-xr-x 1 root wheel 60048 Apr 8 04:11 libclparser.dylib
-rwxr-xr-x 1 root wheel 5020768 Aug 7 03:44 AMDil.dylib

Am I missing something?

Thank you!

Max