Bug#684444: including CL/cl.hpp produces compile errors
Vincent Danjean
vdanjean at debian.org
Wed Aug 29 15:44:49 UTC 2012
Package: opencl-headers
Version: 1.2-2012.04.18a-1
Followup-For: Bug #684444
Hi,
I've been hit by this bug, too. Would you accept a patch to solve it?
Here is such a patch in attachment.
This allows to compile the first and second program and it emits
an error for the third one explaining the problem:
vdanjean at eyak:/tmp$ cat toto.cpp
#include <CL/cl.hpp>
vdanjean at eyak:/tmp$ cat toto2.cpp
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
#include <CL/opencl.h>
#include <CL/cl.hpp>
vdanjean at eyak:/tmp$ cat toto3.cpp
#include <CL/opencl.h>
#include <CL/cl.hpp>
vdanjean at eyak:/tmp$
vdanjean at eyak:/tmp$ g++ -Wall -c toto.cpp
In file included from /usr/include/CL/opencl.h:43:0,
from /usr/include/CL/cl.hpp:175,
from toto.cpp:1:
/usr/include/CL/cl_gl.h:107:2: warning: #warning CL_USE_DEPRECATED_OPENCL_1_1_APIS is defined. These APIs are unsupported and untested in OpenCL 1.2! [-Wcpp]
vdanjean at eyak:/tmp$ g++ -Wall -c toto2.cpp
In file included from /usr/include/CL/opencl.h:43:0,
from toto2.cpp:2:
/usr/include/CL/cl_gl.h:107:2: warning: #warning CL_USE_DEPRECATED_OPENCL_1_1_APIS is defined. These APIs are unsupported and untested in OpenCL 1.2! [-Wcpp]
vdanjean at eyak:/tmp$ g++ -Wall -c toto3.cpp
In file included from toto3.cpp:2:0:
/usr/include/CL/cl.hpp:183:4: error: #error some OpenCL headers have already been included without CL_USE_DEPRECATED_OPENCL_1_1_APIS defined
In file included from toto3.cpp:2:0:
/usr/include/CL/cl.hpp: In function ‘cl_int cl::UnloadCompiler()’:
/usr/include/CL/cl.hpp:1627:12: error: ‘::clUnloadCompiler’ has not been declared
/usr/include/CL/cl.hpp: In constructor ‘cl::Image2D::Image2D(const cl::Context&, cl_mem_flags, cl::ImageFormat, size_t, size_t, size_t, void*, cl_int*)’:
/usr/include/CL/cl.hpp:2386:19: error: ‘::clCreateImage2D’ has not been declared
/usr/include/CL/cl.hpp: In constructor ‘cl::Image2DGL::Image2DGL(const cl::Context&, cl_mem_flags, GLenum, GLint, GLuint, cl_int*)’:
/usr/include/CL/cl.hpp:2431:19: error: ‘::clCreateFromGLTexture2D’ has not been declared
/usr/include/CL/cl.hpp: In constructor ‘cl::Image3D::Image3D(const cl::Context&, cl_mem_flags, cl::ImageFormat, size_t, size_t, size_t, size_t, size_t, void*, cl_int*)’:
/usr/include/CL/cl.hpp:2485:19: error: ‘::clCreateImage3D’ has not been declared
/usr/include/CL/cl.hpp: In constructor ‘cl::Image3DGL::Image3DGL(const cl::Context&, cl_mem_flags, GLenum, GLint, GLuint, cl_int*)’:
/usr/include/CL/cl.hpp:2531:19: error: ‘::clCreateFromGLTexture3D’ has not been declared
/usr/include/CL/cl.hpp: In member function ‘cl_int cl::CommandQueue::enqueueMarker(cl::Event*) const’:
/usr/include/CL/cl.hpp:3766:13: error: ‘::clEnqueueMarker’ has not been declared
/usr/include/CL/cl.hpp: In member function ‘cl_int cl::CommandQueue::enqueueWaitForEvents(const std::vector<cl::Event>&) const’:
/usr/include/CL/cl.hpp:3773:13: error: ‘::clEnqueueWaitForEvents’ has not been declared
/usr/include/CL/cl.hpp: In member function ‘cl_int cl::CommandQueue::enqueueBarrier() const’:
/usr/include/CL/cl.hpp:3888:13: error: ‘::clEnqueueBarrier’ has not been declared
vdanjean at eyak:/tmp$
Regards,
Vincent
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386 armel mipsel
Kernel: Linux 3.2.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: text/x-diff
Size: 1263 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-nvidia-devel/attachments/20120829/b5095bfe/attachment.diff>
More information about the pkg-nvidia-devel
mailing list