Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#27384 - OpenCL headers: "* has not been declared"

Attached to Project: Community Packages
Opened by Christoffer Hirth (toffyrn) - Thursday, 01 December 2011, 10:18 GMT
Last edited by Stéphane Gaudreault (stephane) - Thursday, 15 December 2011, 19:19 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Stéphane Gaudreault (stephane)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

Description:
I am having problems compiling OpenCL programs after I upgraded catalyst to newest, where OpenCL libopencl is included in catalyst-utils.
At first I thought this was a catalyst problem, but I realized now that it might as well be something in opencl-headers package.

When compiling source code including "CL/cl.hpp" i get a bunch of errors saying "* has not been declared".


Additional info:
opencl-headers 1.2.20111115-1
catalyst-utils 11.11-3


Steps to reproduce:
[code]
[toffyrn@bohr Test]$ cat cltest.cpp
#include <CL/cl.hpp>
#include <iostream>

int main(int argc, char** argv)
{
std::cout << "hei\n";

return 0;
}
[toffyrn@bohr Test]$ g++ cltest.cpp
In file included from cltest.cpp:1:0:
/usr/include/CL/cl.hpp: In function ‘cl_int cl::UnloadCompiler()’:
/usr/include/CL/cl.hpp:1465: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:2109: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:2154: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:2208: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:2254: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:3544: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:3551: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:3666:13: error: ‘::clEnqueueBarrier’ has not been declared
[/code]


This task depends upon

Closed by  Stéphane Gaudreault (stephane)
Thursday, 15 December 2011, 19:19 GMT
Reason for closing:  Fixed
Additional comments about closing:  I downgraded the package to 1.1 headers
Comment by Stéphane Gaudreault (stephane) - Thursday, 01 December 2011, 12:53 GMT
I do not use the C++ bindings, but I got the same result with your test code on nvidia.

I suggest you to report the problem upstream :

http://www.khronos.org/registry/cl/ (see section "feedback on the OpenCL C++ Bindings")

There is also a forum where you can ask for help with the C++ bindings : http://www.khronos.org/message_boards/viewtopic.php?f=28&t=1415
Comment by Christoffer Hirth (toffyrn) - Thursday, 01 December 2011, 15:33 GMT
I have now posted this on khronos message boards: http://www.khronos.org/message_boards/viewtopic.php?f=28&t=4550
Looking at the headers it looks as if the C interface is at 1.2, but C++ wrapper is still at 1.1.
Also, including cl.h instead of cl.hpp in this test program works without problems.

Awaiting replies to see if this is the root of our problems.
Comment by Christoffer Hirth (toffyrn) - Monday, 05 December 2011, 15:56 GMT
I downgraded all header files to 1.1, and it is working again.
Did not get any replies over at khronos boards though.

Loading...