I had opencl set to ocl-icd, and then installed Mesa. I used the command: # eselect opencl set 1 (which is mesa on my system) However, when I list the files, cl_egl.h is still set to the old ocl-icd header file: # ls -l /usr/include/CL total 0 lrwxrwxrwx 1 root root 49 Jan 13 13:28 cl_egl.h -> //usr/lib64/OpenCL/global/include/CL-1.2/cl_egl.h lrwxrwxrwx 1 root root 51 Jan 13 13:39 cl_ext.h -> ../../lib64/OpenCL/vendors/mesa/include/CL/cl_ext.h lrwxrwxrwx 1 root root 54 Jan 13 13:39 cl_gl_ext.h -> ../../lib64/OpenCL/vendors/mesa/include/CL/cl_gl_ext.h lrwxrwxrwx 1 root root 50 Jan 13 13:39 cl_gl.h -> ../../lib64/OpenCL/vendors/mesa/include/CL/cl_gl.h lrwxrwxrwx 1 root root 47 Jan 13 13:39 cl.h -> ../../lib64/OpenCL/vendors/mesa/include/CL/cl.h lrwxrwxrwx 1 root root 49 Jan 13 13:39 cl.hpp -> ../../lib64/OpenCL/vendors/mesa/include/CL/cl.hpp lrwxrwxrwx 1 root root 56 Jan 13 13:39 cl_platform.h -> ../../lib64/OpenCL/vendors/mesa/include/CL/cl_platform.h lrwxrwxrwx 1 root root 51 Jan 13 13:39 opencl.h -> ../../lib64/OpenCL/vendors/mesa/include/CL/opencl.h All the others are set to the mesa directory. The Mesa file does exist: # find / -name cl_egl.h /home/jon/ebuilds/b/3rdparty/include/opencl/1.2/CL/cl_egl.h /home/jon/ebuilds/a/3rdparty/include/opencl/1.2/CL/cl_egl.h /usr/lib64/OpenCL/global/include/CL-1.2/cl_egl.h /usr/lib64/OpenCL/global/include/CL-2.1/cl_egl.h /usr/lib64/OpenCL/global/include/CL-2.0/cl_egl.h /usr/lib64/OpenCL/vendors/mesa/include/CL/cl_egl.h /usr/include/CL/cl_egl.h Thus it should be used instead. Cheers.
This is even more broken in the latest version of Mesa. See-Also: https://bugs.gentoo.org/show_bug.cgi?id=605576