Closed Lygggggg closed 3 years ago
I have the same issue. Did you solve it already?
I have the same issue. Did you solve it already?
Yes, I reinstalled OpenCv with its version 4.3.0.you can try it.
Small update, it could also be that multiple versions of opencv libraries are added to linker and not in right order to resolve the functions. See https://github.com/introlab/rtabmap/pull/1330#issuecomment-2319486061 for example.
Main ERROR:/usr/local/lib/libopencv_cudafeatures2d.so.3.2.0: undefined reference to `cv::cuda::...'
when I try to compile the package with GPU version of OpenCV,i occured the error,can you help me? My configuration is Ubuntu18.04 ROS melodic Source compile OpenCV3.2.0 with GPU,cuda10.2
[ 0%] Built target sensor_msgs_generate_messages_eus [ 0%] Built target std_msgs_generate_messages_nodejs [ 0%] Built target std_msgs_generate_messages_cpp [ 0%] Built target sensor_msgs_generate_messages_cpp [ 0%] Built target sensor_msgs_generate_messages_nodejs [ 0%] Built target sensor_msgs_generate_messages_lisp [ 0%] Built target std_msgs_generate_messages_py [ 0%] Built target std_msgs_generate_messages_eus [ 0%] Built target std_msgs_generate_messages_lisp [ 0%] Built target sensor_msgs_generate_messages_py [ 3%] Built target kinect2_registration [ 3%] Built target _find_object_2d_generate_messages_check_deps_ObjectsStamped [ 3%] Built target _find_object_2d_generate_messages_check_deps_DetectionInfo [ 5%] Built target find_object_2d_generate_messages_nodejs [ 7%] Built target find_object_2d_generate_messages_cpp [ 10%] Built target kinect2_bridge [ 13%] Built target find_object_2d_generate_messages_py [ 15%] Built target find_object_2d_generate_messages_lisp [ 19%] Built target find_object_2d_generate_messages_eus [ 21%] Built target kinect2_calibration [ 23%] Built target kinect2_bridge_nodelet [ 23%] Built target find_object_2d_generate_messages [ 25%] Built target kinect2_viewer [ 30%] Built target tf_example [ 30%] Built target print_objects_detected [ 97%] Built target find_object [ 98%] Linking CXX executable /home/lni/Ros_ws/catkin_ws/devel/lib/find_object_2d/find_object_2d /usr/local/lib/libopencv_cudafeatures2d.so.3.2.0: undefined reference to
cv::cuda::BufferPool::getBuffer(int, int, int)' /usr/local/lib/libopencv_cudafeatures2d.so.3.2.0: undefined reference to
cv::cuda::device::ThrustAllocator::getAllocator()' /usr/local/lib/libopencv_cudafeatures2d.so.3.2.0: undefined reference tocv::cuda::StreamAccessor::getStream(cv::cuda::Stream const&)' /usr/local/lib/libopencv_cudafeatures2d.so.3.2.0: undefined reference to
cv::cuda::BufferPool::BufferPool(cv::cuda::Stream&)' collect2: error: ld returned 1 exit status find-object-0.6.3/src/CMakeFiles/find_object_2d.dir/build.make:166: recipe for target '/home/lni/Ros_ws/catkin_ws/devel/lib/find_object_2d/find_object_2d' failed make[2]: [/home/lni/Ros_ws/catkin_ws/devel/lib/find_object_2d/find_object_2d] Error 1 CMakeFiles/Makefile2:2531: recipe for target 'find-object-0.6.3/src/CMakeFiles/find_object_2d.dir/all' failed make[1]: [find-object-0.6.3/src/CMakeFiles/find_object_2d.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j16 -l16" failed