zoukankan      html  css  js  c++  java
  • darknet_ros error shooting: undefined reference to `clReleaseMemObject@OPENCL_1.0'

    libkinect2_registration.so: undefined reference to `clReleaseMemObject@OPENCL_1.0'
    /home/robot/catkin_ws/devel/lib/libkinect2_registration.so: undefined reference to `clEnqueueWriteBuffer@OPENCL_1.0'
    /home/robot/catkin_ws/devel/lib/libkinect2_registration.so: undefined reference to `clReleaseDevice@OPENCL_1.2'
    /home/robot/catkin_ws/devel/lib/libkinect2_registration.so: undefined reference to `clGetPlatformInfo@OPENCL_1.0'

    https://github.com/code-iai/iai_kinect2/issues/305

    https://github.com/OpenKinect/libfreenect2/issues/775

    https://github.com/OpenKinect/libfreenect2/issues/804

    and I noticed that the solution of developer is as following:

    web address:https://github.com/OpenKinect/libfreenect2/issues/804


    OK, so this only happens with third party compilation using installed libfreenect2.so, which is why I didn't see it happen with Protonect. To reproduce, firstsudo make install libfreenect2, then cd examples; mkdir build && cd build; cmake ..; make.

    The cause of the issue is this:

    First, libfreenect2 is built with ocl-icd which provides versioned libOpenCL.so. Therefore libfreenect2.so requires versioned symbols.
    Then, when compiling an app with this libfreenect2, CUDA's libOpenCL.so will take precendence somehow and CUDA's libOpenCL.so is unversioned. So GCC would enforce versioning and report undefined references tosymbol@version. But at runtime this versioning doesn't seem to be strictly enforced.

    Still thinking about what to do with it.


    although I do not want to do this, but I did it, I changed to the libfreenect2 directory, and removed the build folder, then created a new folder named build. And do as the github tutorial of libfreenect2 requestagain,and …
    it passed the catkin_make!

    Commands list is as following:


    sudo rm -fr build/

    mkdir build && cd build

    cmake.. -DCMAKE_INSTALL_PREFIX=$HOME/freenect2

    make

    sudo make install


    Fortunately the problem was solved!

    warning: do not try to delete the related packages and do catkin_make, I have tried to remove the libkinect2_registrationpackage, and the workspace of catkin_ws can’t pass the catkin_make either.
  • 相关阅读:
    剑指 Offer 18. 删除链表的节点
    剑指 Offer 15. 二进制中1的个数
    剑指 Offer 11. 旋转数组的最小数字
    剑指 Offer 56
    剑指 Offer 10- II. 青蛙跳台阶问题
    剑指 Offer 10- I. 斐波那契数列
    剑指 Offer 09. 用两个栈实现队列
    剑指 Offer 06. 从尾到头打印链表
    C++ 异常机制
    读《大数据——互联网大规模数据挖掘与分布式处理》
  • 原文地址:https://www.cnblogs.com/siahekai/p/11000791.html
Copyright © 2011-2022 走看看