yan99033 / CNN-SVO

Real-time motion from structure
331 stars 91 forks source link

ros melodic compile error #22

Open huqingyuan-9952 opened 1 year ago

huqingyuan-9952 commented 1 year ago

I tried to build CNN-SVO but i failed by these errors:


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

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

-- Using CATKIN_DEVEL_PREFIX: /home/lucas/catkin_ws/devel -- Using CMAKE_PREFIX_PATH: /home/lucas/Desktop/catkin_ws/devel;/opt/ros/melodic -- This workspace overlays: /home/lucas/Desktop/catkin_ws/devel;/opt/ros/melodic -- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.17", minimum required is "2") -- Using PYTHON_EXECUTABLE: /usr/bin/python2 -- Using Debian Python package layout -- Using empy: /usr/bin/empy -- Using CATKIN_ENABLE_TESTING: ON -- Call enable_testing() -- Using CATKIN_TEST_RESULTS_DIR: /home/lucas/catkin_ws/build/test_results -- Forcing gtest/gmock from source, though one was otherwise available. -- Found gtest sources under '/usr/src/googletest': gtests will be built -- Found gmock sources under '/usr/src/googletest': gmock will be built CMake Deprecation Warning at /usr/src/googletest/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at /usr/src/googletest/googlemock/CMakeLists.txt:41 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at /usr/src/googletest/googletest/CMakeLists.txt:48 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- Found PythonInterp: /usr/bin/python2 (found version "2.7.17") -- Using Python nosetests: /usr/bin/nosetests-2.7 -- catkin 0.7.29 -- BUILD_SHARED_LIBS is on -- BUILD_SHARED_LIBS is on -- ~~~~~~~~~~~~~ -- ~~ traversing 8 packages in topological order: -- ~~ - rqt_svo -- ~~ - svo_analysis -- ~~ - svo_msgs -- ~~ - vikit_common -- ~~ - vikit_py -- ~~ - vikit_ros -- ~~ - svo -- ~~ - svo_ros -- ~~~~~~~~~~~~~ -- +++ processing catkin package: 'rqt_svo' -- ==> add_subdirectory(CNN-SVO/rpg_svo/rqt_svo) CMake Deprecation Warning at CNN-SVO/rpg_svo/rqt_svo/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- +++ processing catkin package: 'svo_analysis' -- ==> add_subdirectory(CNN-SVO/rpg_svo/svo_analysis) CMake Deprecation Warning at CNN-SVO/rpg_svo/svo_analysis/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- +++ processing catkin package: 'svo_msgs' -- ==> add_subdirectory(CNN-SVO/rpg_svo/svo_msgs) CMake Deprecation Warning at CNN-SVO/rpg_svo/svo_msgs/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy -- svo_msgs: 4 messages, 0 services -- +++ processing catkin package: 'vikit_common' -- ==> add_subdirectory(CNN-SVO/rpg_vikit/vikit_common) CMake Deprecation Warning at CNN-SVO/rpg_vikit/vikit_common/CMakeLists.txt:3 (CMAKE_MINIMUM_REQUIRED): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy -- +++ processing catkin package: 'vikit_py' -- ==> add_subdirectory(CNN-SVO/rpg_vikit/vikit_py) CMake Deprecation Warning at CNN-SVO/rpg_vikit/vikit_py/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- +++ processing catkin package: 'vikit_ros' -- ==> add_subdirectory(CNN-SVO/rpg_vikit/vikit_ros) CMake Deprecation Warning at CNN-SVO/rpg_vikit/vikit_ros/CMakeLists.txt:3 (CMAKE_MINIMUM_REQUIRED): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy -- +++ processing catkin package: 'svo' -- ==> add_subdirectory(CNN-SVO/rpg_svo/svo) CMake Deprecation Warning at CNN-SVO/rpg_svo/svo/CMakeLists.txt:15 (CMAKE_MINIMUM_REQUIRED): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- Found Boost: /usr/include (found version "1.65.1") found components: thread system chrono date_time atomic -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy -- +++ processing catkin package: 'svo_ros' -- ==> add_subdirectory(CNN-SVO/rpg_svo/svo_ros) CMake Deprecation Warning at CNN-SVO/rpg_svo/svo_ros/CMakeLists.txt:9 (CMAKE_MINIMUM_REQUIRED): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy -- Found Boost: /usr/include (found version "1.65.1") found components: thread chrono system date_time atomic -- Configuring done -- Generating done -- Build files have been written to: /home/lucas/catkin_ws/build

Running command: "make clean -j12 -l12" in "/home/lucas/catkin_ws/build"

lucas@hqy-P95xER:~/catkin_ws$ catkin_make Base path: /home/lucas/catkin_ws Source space: /home/lucas/catkin_ws/src Build space: /home/lucas/catkin_ws/build Devel space: /home/lucas/catkin_ws/devel Install space: /home/lucas/catkin_ws/install

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

Running command: "make -j12 -l12" in "/home/lucas/catkin_ws/build"

[ 0%] Built target sensor_msgs_generate_messages_py [ 0%] Built target geometry_msgs_generate_messages_py [ 0%] Built target sensor_msgs_generate_messages_cpp [ 0%] Built target geometry_msgs_generate_messages_eus [ 0%] Built target sensor_msgs_generate_messages_eus [ 0%] Built target geometry_msgs_generate_messages_lisp [ 0%] Built target sensor_msgs_generate_messages_lisp [ 0%] Built target geometry_msgs_generate_messages_cpp [ 0%] Built target sensor_msgs_generate_messages_nodejs [ 0%] Built target geometry_msgs_generate_messages_nodejs [ 1%] Building CXX object CNN-SVO/rpg_vikit/vikit_common/CMakeFiles/vikit_common.dir/src/atan_camera.cpp.o [ 2%] Building CXX object CNN-SVO/rpg_vikit/vikit_common/CMakeFiles/vikit_common.dir/src/math_utils.cpp.o [ 4%] Building CXX object CNN-SVO/rpg_vikit/vikit_common/CMakeFiles/vikit_common.dir/src/vision.cpp.o [ 5%] Building CXX object CNN-SVO/rpg_vikit/vikit_common/CMakeFiles/vikit_common.dir/src/omni_camera.cpp.o [ 6%] Building CXX object CNN-SVO/rpg_vikit/vikit_common/CMakeFiles/vikit_common.dir/src/performance_monitor.cpp.o [ 8%] Building CXX object CNN-SVO/rpg_vikit/vikit_common/CMakeFiles/vikit_common.dir/src/robust_cost.cpp.o [ 9%] Building CXX object CNN-SVO/rpg_vikit/vikit_common/CMakeFiles/vikit_common.dir/src/user_input_thread.cpp.o [ 10%] Building CXX object CNN-SVO/rpg_vikit/vikit_common/CMakeFiles/vikit_common.dir/src/pinhole_camera.cpp.o [ 10%] Built target _svo_msgs_generate_messages_check_deps_DenseInput [ 10%] Built target _svo_msgs_generate_messages_check_deps_NbvTrajectory [ 10%] Built target _svo_msgs_generate_messages_check_deps_Feature [ 10%] Built target _svo_msgs_generate_messages_check_deps_Info [ 12%] Building CXX object CNN-SVO/rpg_vikit/vikit_common/CMakeFiles/vikit_common.dir/src/homography.cpp.o [ 13%] Building CXX object CNN-SVO/rpg_vikit/vikit_common/CMakeFiles/vikit_common.dir/src/img_align.cpp.o [ 14%] Generating C++ code from svo_msgs/Feature.msg [ 16%] Generating Python from MSG svo_msgs/Feature [ 17%] Generating Python from MSG svo_msgs/DenseInput [ 18%] Generating C++ code from svo_msgs/DenseInput.msg [ 20%] Generating C++ code from svo_msgs/Info.msg [ 21%] Generating C++ code from svo_msgs/NbvTrajectory.msg [ 22%] Generating Python from MSG svo_msgs/Info [ 24%] Generating Python from MSG svo_msgs/NbvTrajectory [ 25%] Generating EusLisp code from svo_msgs/Feature.msg [ 25%] Built target svo_msgs_generate_messages_cpp [ 27%] Generating Lisp code from svo_msgs/Feature.msg [ 28%] Generating EusLisp code from svo_msgs/DenseInput.msg [ 29%] Generating Lisp code from svo_msgs/DenseInput.msg [ 31%] Generating EusLisp code from svo_msgs/Info.msg [ 32%] Generating Lisp code from svo_msgs/Info.msg [ 33%] Generating Python msg init.py for svo_msgs [ 35%] Generating EusLisp code from svo_msgs/NbvTrajectory.msg [ 36%] Generating Lisp code from svo_msgs/NbvTrajectory.msg [ 37%] Generating Javascript code from svo_msgs/Feature.msg [ 37%] Built target svo_msgs_generate_messages_lisp [ 39%] Generating EusLisp manifest code for svo_msgs [ 40%] Generating Javascript code from svo_msgs/DenseInput.msg [ 41%] Generating Javascript code from svo_msgs/Info.msg [ 43%] Generating Javascript code from svo_msgs/NbvTrajectory.msg [ 43%] Built target svo_msgs_generate_messages_py [ 43%] Built target svo_msgs_generate_messages_nodejs [ 43%] Built target svo_msgs_generate_messages_eus [ 43%] Built target svo_msgs_generate_messages [ 44%] Linking CXX shared library /home/lucas/catkin_ws/devel/lib/libvikit_common.so [ 44%] Built target vikit_common [ 47%] Building CXX object CNN-SVO/rpg_vikit/vikit_common/CMakeFiles/test_vk_common_patch_score.dir/test/test_patch_score.cpp.o [ 47%] Building CXX object CNN-SVO/rpg_vikit/vikit_common/CMakeFiles/test_vk_common_triangulation.dir/test/test_triangulation.cpp.o [ 48%] Building CXX object CNN-SVO/rpg_vikit/vikit_common/CMakeFiles/test_vk_common_camera.dir/test/test_camera.cpp.o [ 50%] Building CXX object CNN-SVO/rpg_vikit/vikit_ros/CMakeFiles/vikit_ros.dir/src/output_helper.cpp.o [ 51%] Linking CXX executable /home/lucas/catkin_ws/devel/lib/vikit_common/test_vk_common_patch_score [ 51%] Built target test_vk_common_patch_score [ 52%] Linking CXX executable /home/lucas/catkin_ws/devel/lib/vikit_common/test_vk_common_camera [ 54%] Linking CXX executable /home/lucas/catkin_ws/devel/lib/vikit_common/test_vk_common_triangulation [ 54%] Built target test_vk_common_camera [ 54%] Built target test_vk_common_triangulation [ 55%] Linking CXX shared library /home/lucas/catkin_ws/devel/lib/libvikit_ros.so [ 55%] Built target vikit_ros [ 56%] Building CXX object CNN-SVO/rpg_svo/svo/CMakeFiles/svo.dir/src/frame_handler_mono.cpp.o [ 58%] Building CXX object CNN-SVO/rpg_svo/svo/CMakeFiles/svo.dir/src/frame_handler_base.cpp.o [ 59%] Building CXX object CNN-SVO/rpg_svo/svo/CMakeFiles/svo.dir/src/frame_handler_monodepth.cpp.o [ 60%] Building CXX object CNN-SVO/rpg_svo/svo/CMakeFiles/svo.dir/src/frame.cpp.o [ 62%] Building CXX object CNN-SVO/rpg_svo/svo/CMakeFiles/svo.dir/src/point.cpp.o [ 63%] Building CXX object CNN-SVO/rpg_svo/svo/CMakeFiles/svo.dir/src/map.cpp.o [ 64%] Building CXX object CNN-SVO/rpg_svo/svo/CMakeFiles/svo.dir/src/pose_optimizer.cpp.o [ 66%] Building CXX object CNN-SVO/rpg_svo/svo/CMakeFiles/svo.dir/src/initialization_monodepth.cpp.o [ 67%] Building CXX object CNN-SVO/rpg_svo/svo/CMakeFiles/svo.dir/src/matcher.cpp.o [ 68%] Building CXX object CNN-SVO/rpg_svo/svo/CMakeFiles/svo.dir/src/initialization.cpp.o [ 70%] Building CXX object CNN-SVO/rpg_svo/svo/CMakeFiles/svo.dir/src/feature_alignment.cpp.o [ 71%] Building CXX object CNN-SVO/rpg_svo/svo/CMakeFiles/svo.dir/src/reprojector.cpp.o [ 72%] Building CXX object CNN-SVO/rpg_svo/svo/CMakeFiles/svo.dir/src/feature_detection.cpp.o [ 74%] Building CXX object CNN-SVO/rpg_svo/svo/CMakeFiles/svo.dir/src/depth_filter.cpp.o [ 75%] Building CXX object CNN-SVO/rpg_svo/svo/CMakeFiles/svo.dir/src/config.cpp.o [ 77%] Building CXX object CNN-SVO/rpg_svo/svo/CMakeFiles/svo.dir/src/sparse_img_align.cpp.o [ 78%] Building CXX object CNN-SVO/rpg_svo/svo/CMakeFiles/svo.dir/src/bundle_adjustment.cpp.o [ 79%] Building CXX object CNN-SVO/rpg_svo/svo/CMakeFiles/svo.dir/src/frame_handler_online.cpp.o [ 81%] Linking CXX shared library /home/lucas/catkin_ws/devel/lib/libsvo.so [ 81%] Built target svo [ 82%] Building CXX object CNN-SVO/rpg_svo/svo_ros/CMakeFiles/svo_visualizer.dir/src/visualizer.cpp.o [ 83%] Building CXX object CNN-SVO/rpg_svo/svo_ros/CMakeFiles/svo_visualizer_online.dir/src/visualizer_online.cpp.o [ 85%] Building CXX object CNN-SVO/rpg_svo/svo_ros/CMakeFiles/svo_visualizer_monodepth.dir/src/visualizer_monodepth.cpp.o [ 86%] Linking CXX shared library /home/lucas/catkin_ws/devel/lib/libsvo_visualizer.so [ 87%] Linking CXX shared library /home/lucas/catkin_ws/devel/lib/libsvo_visualizer_online.so [ 89%] Linking CXX shared library /home/lucas/catkin_ws/devel/lib/libsvo_visualizer_monodepth.so [ 89%] Built target svo_visualizer [ 90%] Building CXX object CNN-SVO/rpg_svo/svo_ros/CMakeFiles/vo.dir/src/vo_node.cpp.o [ 90%] Built target svo_visualizer_online [ 91%] Building CXX object CNN-SVO/rpg_svo/svo_ros/CMakeFiles/vo_monodepth_online.dir/src/vo_monodepth_online.cpp.o [ 91%] Built target svo_visualizer_monodepth [ 93%] Building CXX object CNN-SVO/rpg_svo/svo_ros/CMakeFiles/test_readnpy.dir/src/test_readnpy.cpp.o [ 94%] Building CXX object CNN-SVO/rpg_svo/svo_ros/CMakeFiles/vo_monodepth_offline.dir/src/vo_monodepth_offline.cpp.o [ 95%] Linking CXX executable /home/lucas/catkin_ws/devel/lib/svo_ros/test_readnpy [ 95%] Built target test_readnpy [ 97%] Linking CXX executable /home/lucas/catkin_ws/devel/lib/svo_ros/vo [ 98%] Linking CXX executable /home/lucas/catkin_ws/devel/lib/svo_ros/vo_monodepth_online /home/lucas/catkin_ws/devel/lib/libsvo.so: undefined reference to monodepth::MonoDepth::MonoDepth(int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)' collect2: error: ld returned 1 exit status CNN-SVO/rpg_svo/svo_ros/CMakeFiles/vo.dir/build.make:292: recipe for target '/home/lucas/catkin_ws/devel/lib/svo_ros/vo' failed make[2]: *** [/home/lucas/catkin_ws/devel/lib/svo_ros/vo] Error 1 CMakeFiles/Makefile2:2777: recipe for target 'CNN-SVO/rpg_svo/svo_ros/CMakeFiles/vo.dir/all' failed make[1]: *** [CNN-SVO/rpg_svo/svo_ros/CMakeFiles/vo.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... CMakeFiles/vo_monodepth_online.dir/src/vo_monodepth_online.cpp.o: In functionsvo::VoNode::readImage(int const&)': vo_monodepth_online.cpp:(.text+0xd83): undefined reference to cv::imread(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)' /home/lucas/catkin_ws/devel/lib/libsvo_visualizer_online.so: undefined reference tocv::imwrite(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, cv::_InputArray const&, std::vector<int, std::allocator > const&)' /home/lucas/catkin_ws/devel/lib/libsvo.so: undefined reference to `monodepth::MonoDepth::MonoDepth(int, int, std::cxx11::basic_string<char, std::char_traits, std::allocator >)' collect2: error: ld returned 1 exit status CNN-SVO/rpg_svo/svo_ros/CMakeFiles/vo_monodepth_online.dir/build.make:292: recipe for target '/home/lucas/catkin_ws/devel/lib/svo_ros/vo_monodepth_online' failed make[2]: [/home/lucas/catkin_ws/devel/lib/svo_ros/vo_monodepth_online] Error 1 CMakeFiles/Makefile2:2719: recipe for target 'CNN-SVO/rpg_svo/svo_ros/CMakeFiles/vo_monodepth_online.dir/all' failed make[1]: [CNN-SVO/rpg_svo/svo_ros/CMakeFiles/vo_monodepth_online.dir/all] Error 2 [100%] Linking CXX executable /home/lucas/catkin_ws/devel/lib/svo_ros/vo_monodepth_offline CMakeFiles/vo_monodepth_offline.dir/src/vo_monodepth_offline.cpp.o: In function svo::VoNode::readImage(int const&)': vo_monodepth_offline.cpp:(.text+0x12c9): undefined reference tocv::imread(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)' /home/lucas/catkin_ws/devel/lib/libsvo.so: undefined reference to `monodepth::MonoDepth::MonoDepth(int, int, std::__cxx11::basic_string<char, std::char_traits, std::allocator >)' collect2: error: ld returned 1 exit status CNN-SVO/rpg_svo/svo_ros/CMakeFiles/vo_monodepth_offline.dir/build.make:292: recipe for target '/home/lucas/catkin_ws/devel/lib/svo_ros/vo_monodepth_offline' failed make[2]: [/home/lucas/catkin_ws/devel/lib/svo_ros/vo_monodepth_offline] Error 1 CMakeFiles/Makefile2:2748: recipe for target 'CNN-SVO/rpg_svo/svo_ros/CMakeFiles/vo_monodepth_offline.dir/all' failed make[1]: [CNN-SVO/rpg_svo/svo_ros/CMakeFiles/vo_monodepth_offline.dir/all] Error 2 Makefile:145: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j12 -l12" failed


I only know that errors may related to gcc version, but I have no idea to solve the problem, can someone help me?