Search code examples
roscatkinrealsense

Invoking "make -j4 -l4" failed Error while running catkin_make


I am working on intel realsense camera R200 in ros kinetic. After installing
While installing Intel RealSense SDK for Linux, it didn't show any error but after catkin_make command the following error occured:

Base path: /home/janhvi/catkin_ws Source space: /home/janhvi/catkin_ws/src Build space: /home/janhvi/catkin_ws/build Devel space: /home/janhvi/catkin_ws/devel Install space: /home/janhvi/catkin_ws/install

#

Running command: "make cmake_check_build_system" in "/home/janhvi/catkin_ws/build"

#

#

Running command: "make -j4 -l4" in "/home/janhvi/catkin_ws/build" [ 0%] Built target std_msgs_generate_messages_cpp [ 0%] Built target

_realsense_ros_person_generate_messages_check_deps_EulerAnglesWithConfidence [ 0%] Built target _realsense_ros_person_generate_messages_check_deps_TrackingConfig [ 0%] Built target _realsense_ros_person_generate_messages_check_deps_Landmark [ 0%] Built target sensor_msgs_generate_messages_cpp [ 0%] Built target geometry_msgs_generate_messages_cpp [ 0%] Built target _realsense_ros_person_generate_messages_check_deps_StopTracking [ 0%] Built target _realsense_ros_person_generate_messages_check_deps_UserInfo [ 0%] Built target _realsense_ros_person_generate_messages_check_deps_PersonModuleState [ 0%] Built target _realsense_ros_person_generate_messages_check_deps_FrameTest [ 0%] Built target _realsense_ros_person_generate_messages_check_deps_Wave [ 0%] Built target _realsense_ros_person_generate_messages_check_deps_Recognition [ 0%] Built target _realsense_ros_person_generate_messages_check_deps_Pointing [ 0%] Built target _realsense_ros_person_generate_messages_check_deps_StartTracking [ 0%] Built target _realsense_ros_person_generate_messages_check_deps_RectWithConfidence [ 0%] Built target _realsense_ros_person_generate_messages_check_deps_SaveRecognitionDB [ 0%] Built target _realsense_ros_person_generate_messages_check_deps_EulerAngles [ 0%] Built target _realsense_ros_person_generate_messages_check_deps_Gesture [ 0%] Built target _realsense_ros_person_generate_messages_check_deps_LandmarksInfo [ 0%] Built target _realsense_ros_person_generate_messages_check_deps_SkeletonJoint [ 0%] Built target _realsense_ros_person_generate_messages_check_deps_LoadRecognitionDB [ 0%] Built target _realsense_ros_person_generate_messages_check_deps_RecognitionRegister [ 0%] Built target _realsense_ros_person_generate_messages_check_deps_Gestures [ 0%] Built target std_msgs_generate_messages_py [ 0%] Built target _realsense_ros_person_generate_messages_check_deps_Frame [ 0%] Built target geometry_msgs_generate_messages_py [ 0%] Built target _realsense_ros_person_generate_messages_check_deps_User [ 0%] Built target sensor_msgs_generate_messages_py [ 0%] Built target std_msgs_generate_messages_nodejs [ 0%] Built target geometry_msgs_generate_messages_nodejs [ 0%] Built target sensor_msgs_generate_messages_nodejs [ 0%] Built target std_msgs_generate_messages_lisp [ 0%] Built target sensor_msgs_generate_messages_lisp [ 0%] Built target std_msgs_generate_messages_eus [ 0%] Built target geometry_msgs_generate_messages_lisp [ 0%] Built target geometry_msgs_generate_messages_eus [ 0%] Built target tf2_msgs_generate_messages_py [ 0%] Built target sensor_msgs_generate_messages_eus [ 0%] Built target roscpp_generate_messages_lisp [ 0%] Built target roscpp_generate_messages_nodejs [ 0%] Built target roscpp_generate_messages_eus [ 0%] Built target roscpp_generate_messages_cpp [ 0%] Built target rosgraph_msgs_generate_messages_nodejs [ 0%] Built target rosgraph_msgs_generate_messages_eus [ 0%] Built target rosgraph_msgs_generate_messages_cpp [ 0%] Built target roscpp_generate_messages_py [ 0%] Built target rosgraph_msgs_generate_messages_lisp [ 0%] Built target bond_generate_messages_cpp [ 0%] Built target rosgraph_msgs_generate_messages_py [ 0%] Built target bond_generate_messages_lisp [ 0%] Built target nodelet_generate_messages_nodejs [ 0%] Built target bond_generate_messages_nodejs [ 0%] Built target nodelet_generate_messages_eus [ 0%] Built target nodelet_generate_messages_cpp [ 0%] Built target bond_generate_messages_py [ 0%] Built target nodelet_generate_messages_lisp [ 0%] Built target bond_generate_messages_eus [ 0%] Built target nodelet_generate_messages_py [ 0%] Built target actionlib_generate_messages_nodejs [ 0%] Built target tf_generate_messages_py [ 0%] Built target _realsense_ros_camera_generate_messages_check_deps_Extrinsics [ 0%] Built target actionlib_msgs_generate_messages_lisp [ 0%] Built target _realsense_ros_camera_generate_messages_check_deps_IMUInfo [ 0%] Built target actionlib_generate_messages_lisp [ 0%] Built target tf2_msgs_generate_messages_cpp [ 0%] Built target tf_generate_messages_nodejs [ 0%] Built target actionlib_msgs_generate_messages_eus [ 0%] Built target actionlib_generate_messages_eus [ 0%] Built target tf_generate_messages_cpp [ 0%] Built target _catkin_empty_exported_target [ 0%] Built target tf_generate_messages_eus [ 0%] Built target actionlib_msgs_generate_messages_cpp [ 0%] Built target actionlib_generate_messages_py [ 0%] Built target actionlib_generate_messages_cpp [ 0%] Built target actionlib_msgs_generate_messages_nodejs [ 0%] Built target actionlib_msgs_generate_messages_py [ 0%] Built target tf_generate_messages_lisp [ 0%] Built target tf2_msgs_generate_messages_lisp [ 0%] Built target tf2_msgs_generate_messages_nodejs [ 0%] Built target tf2_msgs_generate_messages_eus [ 1%] Built target gtest [ 2%] Built target realsense_ros_camera_generate_messages_nodejs [ 3%] Built target realsense_ros_camera_generate_messages_py [ 4%] Built target realsense_ros_camera_generate_messages_lisp [ 5%] Built target realsense_ros_camera_generate_messages_eus [ 5%] Built target _realsense_ros_object_generate_messages_check_deps_Location3D [ 5%] Built target _realsense_ros_object_generate_messages_check_deps_cpu_gpu [ 5%] Built target _realsense_ros_object_generate_messages_check_deps_TrackedObject [ 5%] Built target _realsense_ros_object_generate_messages_check_deps_ObjectArray [ 5%] Built target _realsense_ros_object_generate_messages_check_deps_ObjectsInBoxes [ 5%] Built target _realsense_ros_object_generate_messages_check_deps_ObjectInBox [ 5%] Built target _realsense_ros_object_generate_messages_check_deps_UI [ 5%] Built target _realsense_ros_object_generate_messages_check_deps_Object [ 5%] Built target _realsense_ros_object_generate_messages_check_deps_TrackedObjectsArray [ 5%] Built target _realsense_ros_object_generate_messages_check_deps_Rect [ 5%] Built target _realsense_ros_slam_generate_messages_check_deps_TrackingAccuracy [ 5%] Built target _realsense_ros_slam_generate_messages_check_deps_SaveOutput [ 14%] Built target realsense_ros_person_generate_messages_cpp [ 24%] Built target realsense_ros_person_generate_messages_py [ 35%] Built target realsense_ros_person_generate_messages_nodejs [ 44%] Built target realsense_ros_person_generate_messages_lisp [ 44%] Built target _realsense_ros_slam_generate_messages_check_deps_Reset [ 54%] Built target realsense_ros_person_generate_messages_eus [ 55%] Built target realsense_ros_camera_generate_messages_cpp [ 60%] Built target realsense_ros_object_generate_messages_cpp [ 65%] Built target realsense_ros_object_generate_messages_lisp [ 70%] Built target realsense_ros_object_generate_messages_eus [ 73%] Built target realsense_ros_person [ 78%] Built target realsense_ros_object_generate_messages_py [ 82%] Built target realsense_ros_object_generate_messages_nodejs [ 83%] Built target realsense_ros_slam_generate_messages_cpp [ 84%] Built target realsense_ros_slam_generate_messages_lisp [ 86%] Built target realsense_ros_slam_generate_messages_py [ 88%] Built target realsense_ros_slam_generate_messages_nodejs [ 89%] Built target realsense_ros_person_generate_messages [ 90%] Built target realsense_ros_slam_generate_messages_eus [ 90%] Built target realsense_ros_camera_generate_messages [ 90%] Linking CXX executable /home/janhvi/catkin_ws/devel/lib/realsense_ros_person/realsense_ros_person_sample [ 91%] Built target realsense_ros_camera [ 92%] Built target realsense_ros_tests_camera [ 92%] Built target realsense_ros_object_generate_messages [ 92%] Built target realsense_ros_slam_generate_messages [ 94%] Built target realsense_ros_object [ 95%] Built target realsense_ros_slam [ 95%] Built target realsense_ros_object_sample1 [ 97%] Built target realsense_ros_object_viewer CMakeFiles/realsense_ros_person_sample.dir/src/sample/TrackingRenderer/Viewer.cpp.o: In function Viewer::Viewer(bool)': Viewer.cpp:(.text+0x97): undefined reference tocv::namedWindow(cv::String const&, int)' Viewer.cpp:(.text+0xc9): undefined reference to cv::setMouseCallback(cv::String const&, void (*)(int, int, int, int, void*), void*)' Viewer.cpp:(.text+0xda): undefined reference to cv::startWindowThread()' Viewer.cpp:(.text+0x106): undefined reference to cv::namedWindow(cv::String const&, int)' Viewer.cpp:(.text+0x117): undefined reference to cv::startWindowThread()' CMakeFiles/realsense_ros_person_sample.dir/src/sample/TrackingRenderer/Viewer.cpp.o: In function Viewer::ShowImage(cv::Mat)': Viewer.cpp:(.text+0x1dd): undefined reference tocv::imshow(cv::String const&, cv::_InputArray const&)' Viewer.cpp:(.text+0x1ff): undefined reference to cv::waitKey(int)' CMakeFiles/realsense_ros_person_sample.dir/src/sample/TrackingRenderer/Viewer.cpp.o: In functionViewer::ShowDepth(cv::Mat)': Viewer.cpp:(.text+0x29f): undefined reference to `cv::imshow(cv::String const&, cv::_InputArray const&)' collect2: error: ld returned 1 exit status realsense_samples_ros/realsense_ros_person/CMakeFiles/realsense_ros_person_sample.dir/build.make:209: recipe for target '/home/janhvi/catkin_ws/devel/lib/realsense_ros_person/realsense_ros_person_sample' failed make[2]: * [/home/janhvi/catkin_ws/devel/lib/realsense_ros_person/realsense_ros_person_sample] Error 1 CMakeFiles/Makefile2:1340: recipe for target 'realsense_samples_ros/realsense_ros_person/CMakeFiles/realsense_ros_person_sample.dir/all' failed make[1]: * [realsense_samples_ros/realsense_ros_person/CMakeFiles/realsense_ros_person_sample.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j4 -l4" failed

I tried to source the file but same error is occurring. Can anyone help solving this issue?


Solution

  • The Problem Is That Your Linker Cannot Find OpenCV Shared Objects.

    • Check In Your CMakeList File For Linking Your Executables To OpenCV Libs
    • Check Your OpenCV Installation (Check Path And Even Compile Something Simple With OpenCV libs)