Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building iai_kinect2 with catkin #13

Closed
davetcoleman opened this issue Oct 28, 2014 · 4 comments
Closed

Building iai_kinect2 with catkin #13

davetcoleman opened this issue Oct 28, 2014 · 4 comments

Comments

@davetcoleman
Copy link

I have libfreenect2 built now, but kinect2_bridge is failing with the following error (built using the new catkin_tools):

Starting ==> kinect2_bridge                                                                                            

[kinect2_bridge] ==> '/home/dave/ros/ws_base/build/kinect2_bridge/build_env.sh /usr/bin/make -j12 -l12' in '/home/dave/ros/ws_base/build/kinect2_bridge'
Scanning dependencies of target kinect2_bridge
[100%] Building CXX object CMakeFiles/kinect2_bridge.dir/src/kinect2_bridge.cpp.o
Linking CXX executable /home/dave/ros/ws_base/devel/lib/kinect2_bridge/kinect2_bridge
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clReleaseMemObject@OPENCL_1.0'
//usr/local/lib/libfreenect2.so: undefined reference to `clRetainEvent@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clReleaseKernel@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clReleaseCommandQueue@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clReleaseEvent@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clEnqueueWriteBuffer@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clCreateBuffer@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clBuildProgram@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clReleaseDevice@OPENCL_1.2'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clSetKernelArg@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clRetainKernel@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clCreateContext@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clReleaseProgram@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clGetDeviceIDs@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clRetainDevice@OPENCL_1.2'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clGetPlatformInfo@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clRetainCommandQueue@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clCreateProgramWithSource@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clCreateKernel@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clGetDeviceInfo@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clReleaseContext@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clRetainContext@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clCreateCommandQueue@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clEnqueueNDRangeKernel@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clWaitForEvents@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clEnqueueReadBuffer@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clRetainProgram@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clGetProgramBuildInfo@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clGetPlatformIDs@OPENCL_1.0'
/home/dave/ros/ws_base/devel/lib/libdepth_registration.so: undefined reference to `clRetainMemObject@OPENCL_1.0'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/dave/ros/ws_base/devel/lib/kinect2_bridge/kinect2_bridge] Error 1
make[1]: *** [CMakeFiles/kinect2_bridge.dir/all] Error 2
[kinect2_bridge] <== '/home/dave/ros/ws_base/build/kinect2_bridge/build_env.sh /usr/bin/make -j12 -l12' failed with return code '2'

[build] There were errors:                                                                                             

    Failed to build package 'kinect2_bridge' because the following command:

        # Command run in directory: /home/dave/ros/ws_base/build/kinect2_bridge
        /home/dave/ros/ws_base/build/kinect2_bridge/build_env.sh /usr/bin/make -j12 -l12

    Exited with return code: 2 
[build] Runtime: 10.8 seconds 

Any thoughts how to fix this? Build OpenCL from source?

@kohrt
Copy link
Collaborator

kohrt commented Oct 28, 2014

Hi,
did you installed OpenCL? I mean not just the Headers, you probably need also an OpenCL library. For AMD and Nvidia it comes with their drivers. But the OpenCL library from Nvidia was not supporting the same version as the Headers, I could solve that by installing ocl-icd-opencl-dev instead of nvidia-opencl-dev. For AMD the libs that come with the driver are working fine. For Intel GPUs one should take a look at the Beignet project. Hope this helps to solve the problem.

davetcoleman added a commit to davetcoleman/libfreenect2 that referenced this issue Oct 30, 2014
@davetcoleman
Copy link
Author

Awesome, that fixed my problem! You should merge my instructions, also :-)

@kohrt
Copy link
Collaborator

kohrt commented Oct 30, 2014

I think the best solution would be to move the information from the READMEs to the wiki provided by github. This way any user can add usefull information as needed. I need to look into it.

@davetcoleman
Copy link
Author

Actually, I think using a standard README file is the easiest, unless you plan on having a ton of documentation (which I assume you don't have time for). I've never had good experiences with the Github wiki functionality. Also, my PR for documentation is simply for libfreenect2, which I really intend to just push upstream to the original version but I wanted to run it by you, and get it merged into your fork, first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants