-
Notifications
You must be signed in to change notification settings - Fork 26
Build Instructions for Linux Troubleshooting
configure: error: "No OpenCL C++ API; try installing opencl-headers"
If you already have an SDK installed on your system but it is older (e.g. opencl 1.1) it may not contain the C++ header file and you will receive the above mentioned error. You also are unable to install opencl-headers
because it conflicts with the installed SDK headers.
For example, the intel opencl sdk would have the following header files:
/usr/include/CL/cl_d3d9.h
/usr/include/CL/cl_ext.h
/usr/include/CL/opencl.h
/usr/include/CL/cl_gl_ext.h
/usr/include/CL/cl.h
/usr/include/CL/cl_platform.h
/usr/include/CL/cl_gl.h
which would conflict with installing opencl-headers
.
To solve this problem, you can download the C++ header file from Khronos downloads page here which provides all the OpenCL headers. You will want whichever is the most recent version you currently have. To find this out, you need to open the cl.h
file in your favorite text editor and find the /* OpenCL Version */
section. Choose the highest version, download the corresponding cl.hpp
file and put it in that directory.
##Known Ubuntu 12.04 Issues
Unable to find GL headers
You need to install mesa-common-dev
to get the GL headers.
sudo apt-get install mesa-common-dev
Unable to link to OpenCL with NVIDIA card
You need to create a symbolic link to the nvidia opencl implementation
# 32 bit
sudo ln -s /usr/local/cuda-7.0/lib64/libOpenCL.so /usr/lib/i386-linux-gnu/libOpenCL.so
# 64 bit
sudo ln -s /usr/local/cuda-7.0/lib64/libOpenCL.so /usr/lib/x86_64-linux-gnu/libOpenCL.so
Please submit additional issues on the issues tab.