introlab / rtabmap

RTAB-Map library and standalone application
https://introlab.github.io/rtabmap
Other
2.62k stars 763 forks source link

Error when make #683

Open Mingchi-Yeh opened 3 years ago

Mingchi-Yeh commented 3 years ago

Hi, I'm trying to build the rtabmap by opencv3.4.2 , but I'm getting the following make error when building rtabmap from source on ubuntu 16 with ROS kinetic.

cmake .. output is as follows :

-- Checking for module 'libopenni2'
--   No package 'libopenni2' found
-- Could NOT find OpenNI2 (missing:  OPENNI2_LIBRARY OPENNI2_INCLUDE_DIRS) 
-- The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtk" references the file
   "/usr/bin/vtk"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

-- Checking for module 'libopenni2'
--   No package 'libopenni2' found
-- Could NOT find OpenNI2 (missing:  OPENNI2_LIBRARY OPENNI2_INCLUDE_DIRS) 
-- PCL definitions don't contain "-march=native", make sure all libraries using Eigen are also compiled without that flag to avoid some segmentation faults (with gdb referring to some Eigen functions).
-- Found Sqlite3: /usr/include /usr/lib/x86_64-linux-gnu/libsqlite3.so
-- Found OpenMP
-- Found OpenCV: /usr/local/include;/usr/local/include/opencv
-- Found PCL: /usr/include/pcl-1.7;/usr/include/eigen3;/usr/include;/usr/include/ni;/usr/include/vtk-6.2;/usr/include/x86_64-linux-gnu;/usr/include/jsoncpp;/usr/include/hdf5/openmpi;/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent;/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include;/usr/lib/openmpi/include;/usr/lib/openmpi/include/openmpi;/usr/include/python2.7;/usr/include/freetype2;/usr/include/x86_64-linux-gnu/freetype2;/usr/include/libxml2;/usr/include/tcl
-- Found ZLIB: /usr/include
-- VTK_RENDERING_BACKEND=OpenGL
-- Found Freenect: /usr/include
-- Found DC1394: /usr/include/dc1394
-- Old g2o version detected with c++03 interface (config file: /opt/ros/kinetic/include/g2o/config.h).
-- Found g2o: /opt/ros/kinetic/include;/usr/include/suitesparse;/usr/include/suitesparse
-- FlyCapture2_INCLUDE_DIR=FlyCapture2_INCLUDE_DIR-NOTFOUND
-- FlyCapture2_LIBRARY=FlyCapture2_LIBRARY-NOTFOUND
-- Triclops_INCLUDE_DIR=Triclops_INCLUDE_DIR-NOTFOUND
-- Triclops_LIBRARY=Triclops_LIBRARY-NOTFOUND
-- FlyCaptureBridge_LIBRARY=FlyCaptureBridge_LIBRARY-NOTFOUND
-- Found RealSense2: 
-- Found octomap 1.8.1: /opt/ros/kinetic/include
-- Found installed version of Eigen: /usr/lib/cmake/eigen3
-- Found required Ceres dependency: Eigen version 3.2.92 in /usr/include/eigen3
-- Found required Ceres dependency: glog
-- Found required Ceres dependency: gflags
-- Found Ceres version: 1.14.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, SchurSpecializations, OpenMP, Multithreading]
-- Architecture: x86_64
-- Found Pthreads
-- --------------------------------------------
-- Info :
--   Version : 0.20.8
--   CMAKE_INSTALL_PREFIX = /usr/local
--   CMAKE_BUILD_TYPE =     Release
--   CMAKE_INSTALL_LIBDIR = lib
--   BUILD_APP =            ON
--   BUILD_TOOLS =          ON
--   BUILD_EXAMPLES =       ON
--   BUILD_SHARED_LIBS =    ON
--   CMAKE_CXX_FLAGS =  -fmessage-length=0  -fopenmp -std=c++14
--   FLANN_KDTREE_MEM_OPT = OFF
--   PCL_DEFINITIONS = -DEIGEN_USE_NEW_STDVECTOR;-DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET;-DFLANN_STATIC;-Dqh_QHpointer
--   PCL_VERSION = 1.7.2
-- 
-- Optional dependencies ('*' affects some default parameters) :
--  *With OpenCV 3.4.2 xfeatures2d = NO, nonfree = NO (License: BSD)
--   With Qt 5.5.1            = YES (License: Open Source or Commercial)
--   With VTK 6.2              = YES (License: BSD)
--   With external SQLite3     = YES (License: Public Domain)
--   With ORB OcTree           = YES (License: GPLv3)
--   With SupertPoint          = NO (WITH_TORCH=OFF)
--   With Python3              = NO (WITH_PYTHON=OFF)
--   With Madgwick             = YES (License: GPL)
--   With FastCV               = NO (FastCV not found)
--   With PDAL                 = NO (PDAL not found)
-- 
--  Solvers:
--   With TORO                 = YES (License: Creative Commons [Attribution-NonCommercial-ShareAlike])
--  *With g2o                  = YES (License: BSD)
--  *With GTSAM                = NO (GTSAM not found)
--  *With Ceres                = YES (License: BSD)
--   With VERTIGO              = YES (License: GPLv3)
--   With cvsba                = NO (cvsba not found)
--  *With libpointmatcher      = NO (libpointmatcher not found)
-- 
--  Reconstruction Approaches:
--   With OCTOMAP              = YES (License: BSD)
--   With CPUTSDF              = NO (CPUTSDF not found)
--   With OpenChisel           = NO (open_chisel not found)
--   With AliceVision          = NO (WITH_ALICE_VISION=OFF)
-- 
--  Camera Drivers:
--   With Freenect             = YES (License: Apache v2 and/or GPLv2)
--   With OpenNI2              = NO (OpenNI2 not found)
--   With Freenect2            = NO (libfreenect2 not found)
--   With Kinect for Windows 2 = NO (Kinect for Windows 2 SDK not found)
--   With Kinect for Azure     = NO (Kinect for Azure SDK not found)
--   With dc1394               = YES (License: LGPL)
--   With FlyCapture2/Triclops = NO (Point Grey SDK not found)
--   With ZED                  = NO (ZED sdk and/or cuda not found)
--   With RealSense            = NO (librealsense not found)
--   With RealSense2           = YES (License: Apache-2)
--   With MyntEyeS             = NO (mynteye s sdk not found)
-- 
--  Odometry Approaches:
--   With loam_velodyne        = NO (loam_velodyne not found)
--   With libfovis             = NO (libfovis not found)
--   With libviso2             = NO (libviso2 not found)
--   With dvo_core             = NO (dvo_core not found)
--   With okvis                = NO (okvis not found)
--   With msckf_vio            = NO (WITH_MSCKF_VIO=OFF)
--   With VINS-Fusion          = NO (VINS-Fusion not found)
--   With ORB_SLAM2            = NO (WITH_G2O should be OFF as ORB_SLAM2 uses its own g2o version)
-- Show all options with: cmake -LA | grep WITH_
-- --------------------------------------------
-- Configuring done
-- Generating done
-- Build files have been written to: /home/rvl/rtabmap/build

and this is the build error :

[ 86%] Building CXX object tools/EurocDataset/CMakeFiles/euroc_dataset.dir/main.cpp.o
[ 87%] Linking CXX executable ../../../bin/rtabmap-euroc_dataset
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::TypedBadConversion<double>::~TypedBadConversion()':
main.cpp:(.text._ZN4YAML18TypedBadConversionIdED2Ev[_ZN4YAML18TypedBadConversionIdED5Ev]+0xf): undefined reference to `YAML::BadConversion::~BadConversion()'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::TypedBadConversion<double>::~TypedBadConversion()':
main.cpp:(.text._ZN4YAML18TypedBadConversionIdED0Ev[_ZN4YAML18TypedBadConversionIdED5Ev]+0x13): undefined reference to `YAML::BadConversion::~BadConversion()'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::TypedBadConversion<float>::~TypedBadConversion()':
main.cpp:(.text._ZN4YAML18TypedBadConversionIfED2Ev[_ZN4YAML18TypedBadConversionIfED5Ev]+0xf): undefined reference to `YAML::BadConversion::~BadConversion()'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::TypedBadConversion<float>::~TypedBadConversion()':
main.cpp:(.text._ZN4YAML18TypedBadConversionIfED0Ev[_ZN4YAML18TypedBadConversionIfED5Ev]+0x13): undefined reference to `YAML::BadConversion::~BadConversion()'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::TypedBadConversion<int>::~TypedBadConversion()':
main.cpp:(.text._ZN4YAML18TypedBadConversionIiED2Ev[_ZN4YAML18TypedBadConversionIiED5Ev]+0xf): undefined reference to `YAML::BadConversion::~BadConversion()'
CMakeFiles/euroc_dataset.dir/main.cpp.o:main.cpp:(.text._ZN4YAML18TypedBadConversionIiED0Ev[_ZN4YAML18TypedBadConversionIiED5Ev]+0x13): more undefined references to `YAML::BadConversion::~BadConversion()' follow
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::Exception::Exception(YAML::Mark const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
main.cpp:(.text._ZN4YAML9ExceptionC2ERKNS_4MarkERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN4YAML9ExceptionC5ERKNS_4MarkERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x4e): undefined reference to `vtable for YAML::Exception'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::InvalidNode::InvalidNode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
main.cpp:(.text._ZN4YAML11InvalidNodeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN4YAML11InvalidNodeC5ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x85): undefined reference to `vtable for YAML::RepresentationException'
main.cpp:(.text._ZN4YAML11InvalidNodeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN4YAML11InvalidNodeC5ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0xa7): undefined reference to `vtable for YAML::InvalidNode'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::BadConversion::BadConversion(YAML::Mark const&)':
main.cpp:(.text._ZN4YAML13BadConversionC2ERKNS_4MarkE[_ZN4YAML13BadConversionC5ERKNS_4MarkE]+0x41): undefined reference to `vtable for YAML::RepresentationException'
main.cpp:(.text._ZN4YAML13BadConversionC2ERKNS_4MarkE[_ZN4YAML13BadConversionC5ERKNS_4MarkE]+0x62): undefined reference to `vtable for YAML::BadConversion'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::Node::Mark() const':
main.cpp:(.text._ZNK4YAML4Node4MarkEv[_ZNK4YAML4Node4MarkEv]+0x87): undefined reference to `YAML::InvalidNode::~InvalidNode()'
main.cpp:(.text._ZNK4YAML4Node4MarkEv[_ZNK4YAML4Node4MarkEv]+0x8e): undefined reference to `typeinfo for YAML::InvalidNode'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::Node::Type() const':
main.cpp:(.text._ZNK4YAML4Node4TypeEv[_ZNK4YAML4Node4TypeEv]+0x50): undefined reference to `YAML::InvalidNode::~InvalidNode()'
main.cpp:(.text._ZNK4YAML4Node4TypeEv[_ZNK4YAML4Node4TypeEv]+0x57): undefined reference to `typeinfo for YAML::InvalidNode'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::Node::Scalar[abi:cxx11]() const':
main.cpp:(.text._ZNK4YAML4Node6ScalarB5cxx11Ev[_ZNK4YAML4Node6ScalarB5cxx11Ev]+0x47): undefined reference to `YAML::InvalidNode::~InvalidNode()'
main.cpp:(.text._ZNK4YAML4Node6ScalarB5cxx11Ev[_ZNK4YAML4Node6ScalarB5cxx11Ev]+0x4e): undefined reference to `typeinfo for YAML::InvalidNode'
main.cpp:(.text._ZNK4YAML4Node6ScalarB5cxx11Ev[_ZNK4YAML4Node6ScalarB5cxx11Ev]+0x21): undefined reference to `YAML::detail::node_data::empty_scalar[abi:cxx11]()'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::Node::size() const':
main.cpp:(.text._ZNK4YAML4Node4sizeEv[_ZNK4YAML4Node4sizeEv]+0x45): undefined reference to `YAML::InvalidNode::~InvalidNode()'
main.cpp:(.text._ZNK4YAML4Node4sizeEv[_ZNK4YAML4Node4sizeEv]+0x4c): undefined reference to `typeinfo for YAML::InvalidNode'
main.cpp:(.text._ZNK4YAML4Node4sizeEv[_ZNK4YAML4Node4sizeEv]+0x15): undefined reference to `YAML::detail::node_data::size() const'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `int YAML::Node::as<int>() const':
main.cpp:(.text._ZNK4YAML4Node2asIiEET_v[_ZNK4YAML4Node2asIiEET_v]+0x6e): undefined reference to `YAML::InvalidNode::~InvalidNode()'
main.cpp:(.text._ZNK4YAML4Node2asIiEET_v[_ZNK4YAML4Node2asIiEET_v]+0x75): undefined reference to `typeinfo for YAML::InvalidNode'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `double YAML::Node::as<double>() const':
main.cpp:(.text._ZNK4YAML4Node2asIdEET_v[_ZNK4YAML4Node2asIdEET_v]+0x70): undefined reference to `YAML::InvalidNode::~InvalidNode()'
main.cpp:(.text._ZNK4YAML4Node2asIdEET_v[_ZNK4YAML4Node2asIdEET_v]+0x77): undefined reference to `typeinfo for YAML::InvalidNode'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `float YAML::Node::as<float>() const':
main.cpp:(.text._ZNK4YAML4Node2asIfEET_v[_ZNK4YAML4Node2asIfEET_v]+0x70): undefined reference to `YAML::InvalidNode::~InvalidNode()'
main.cpp:(.text._ZNK4YAML4Node2asIfEET_v[_ZNK4YAML4Node2asIfEET_v]+0x77): undefined reference to `typeinfo for YAML::InvalidNode'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::detail::node::mark_defined()':
main.cpp:(.text._ZN4YAML6detail4node12mark_definedEv[_ZN4YAML6detail4node12mark_definedEv]+0x24): undefined reference to `YAML::detail::node_data::mark_defined()'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::Node::EnsureNodeExists() const':
main.cpp:(.text._ZNK4YAML4Node16EnsureNodeExistsEv[_ZNK4YAML4Node16EnsureNodeExistsEv]+0xa2): undefined reference to `YAML::detail::memory::create_node()'
main.cpp:(.text._ZNK4YAML4Node16EnsureNodeExistsEv[_ZNK4YAML4Node16EnsureNodeExistsEv]+0xbd): undefined reference to `YAML::detail::node_data::set_null()'
main.cpp:(.text._ZNK4YAML4Node16EnsureNodeExistsEv[_ZNK4YAML4Node16EnsureNodeExistsEv]+0xe7): undefined reference to `YAML::InvalidNode::~InvalidNode()'
main.cpp:(.text._ZNK4YAML4Node16EnsureNodeExistsEv[_ZNK4YAML4Node16EnsureNodeExistsEv]+0xee): undefined reference to `typeinfo for YAML::InvalidNode'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::Node::Node<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
main.cpp:(.text._ZN4YAML4NodeC2INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKT_[_ZN4YAML4NodeC5INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKT_]+0xb6): undefined reference to `YAML::detail::memory::create_node()'
main.cpp:(.text._ZN4YAML4NodeC2INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKT_[_ZN4YAML4NodeC5INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKT_]+0xdd): undefined reference to `YAML::detail::node_data::set_scalar(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::BadSubscript::BadSubscript<char [24]>(YAML::Mark const&, char const (&) [24])':
main.cpp:(.text._ZN4YAML12BadSubscriptC2IA24_cEERKNS_4MarkERKT_[_ZN4YAML12BadSubscriptC5IA24_cEERKNS_4MarkERKT_]+0x3d): undefined reference to `vtable for YAML::RepresentationException'
main.cpp:(.text._ZN4YAML12BadSubscriptC2IA24_cEERKNS_4MarkERKT_[_ZN4YAML12BadSubscriptC5IA24_cEERKNS_4MarkERKT_]+0x5e): undefined reference to `vtable for YAML::BadSubscript'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::detail::node& YAML::detail::node_data::convert_to_node<char [24]>(char const (&) [24], std::shared_ptr<YAML::detail::memory_holder>)':
main.cpp:(.text._ZN4YAML6detail9node_data15convert_to_nodeIA24_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data15convert_to_nodeIA24_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0xd3): undefined reference to `YAML::detail::memory::create_node()'
main.cpp:(.text._ZN4YAML6detail9node_data15convert_to_nodeIA24_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data15convert_to_nodeIA24_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0x10a): undefined reference to `YAML::detail::node_data::set_scalar(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
main.cpp:(.text._ZN4YAML6detail9node_data15convert_to_nodeIA24_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data15convert_to_nodeIA24_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0x132): undefined reference to `YAML::detail::memory_holder::merge(YAML::detail::memory_holder&)'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::detail::node& YAML::detail::node_data::convert_to_node<int>(int const&, std::shared_ptr<YAML::detail::memory_holder>)':
main.cpp:(.text._ZN4YAML6detail9node_data15convert_to_nodeIiEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data15convert_to_nodeIiEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0x9a): undefined reference to `YAML::detail::memory_holder::merge(YAML::detail::memory_holder&)'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::Node YAML::Node::operator[]<char [5]>(char const (&) [5])':
main.cpp:(.text._ZN4YAML4NodeixIA5_cEES0_RKT_[_ZN4YAML4NodeixIA5_cEES0_RKT_]+0x1d0): undefined reference to `YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)'
main.cpp:(.text._ZN4YAML4NodeixIA5_cEES0_RKT_[_ZN4YAML4NodeixIA5_cEES0_RKT_]+0x20a): undefined reference to `YAML::BadSubscript::~BadSubscript()'
main.cpp:(.text._ZN4YAML4NodeixIA5_cEES0_RKT_[_ZN4YAML4NodeixIA5_cEES0_RKT_]+0x211): undefined reference to `typeinfo for YAML::BadSubscript'
main.cpp:(.text._ZN4YAML4NodeixIA5_cEES0_RKT_[_ZN4YAML4NodeixIA5_cEES0_RKT_]+0x257): undefined reference to `YAML::detail::memory::create_node()'
main.cpp:(.text._ZN4YAML4NodeixIA5_cEES0_RKT_[_ZN4YAML4NodeixIA5_cEES0_RKT_]+0x26c): undefined reference to `YAML::detail::node_data::insert_map_pair(YAML::detail::node&, YAML::detail::node&)'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::detail::node& YAML::detail::node_data::get<char [8]>(char const (&) [8], std::shared_ptr<YAML::detail::memory_holder>)':
main.cpp:(.text._ZN4YAML6detail9node_data3getIA8_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data3getIA8_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0xb3): undefined reference to `YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)'
main.cpp:(.text._ZN4YAML6detail9node_data3getIA8_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data3getIA8_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0xdf): undefined reference to `YAML::BadSubscript::~BadSubscript()'
main.cpp:(.text._ZN4YAML6detail9node_data3getIA8_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data3getIA8_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0xe6): undefined reference to `typeinfo for YAML::BadSubscript'
main.cpp:(.text._ZN4YAML6detail9node_data3getIA8_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data3getIA8_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0x12d): undefined reference to `YAML::detail::memory::create_node()'
main.cpp:(.text._ZN4YAML6detail9node_data3getIA8_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data3getIA8_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0x140): undefined reference to `YAML::detail::node_data::insert_map_pair(YAML::detail::node&, YAML::detail::node&)'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::Node YAML::Node::operator[]<char [11]>(char const (&) [11])':
main.cpp:(.text._ZN4YAML4NodeixIA11_cEES0_RKT_[_ZN4YAML4NodeixIA11_cEES0_RKT_]+0x1d0): undefined reference to `YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)'
main.cpp:(.text._ZN4YAML4NodeixIA11_cEES0_RKT_[_ZN4YAML4NodeixIA11_cEES0_RKT_]+0x20a): undefined reference to `YAML::BadSubscript::~BadSubscript()'
main.cpp:(.text._ZN4YAML4NodeixIA11_cEES0_RKT_[_ZN4YAML4NodeixIA11_cEES0_RKT_]+0x211): undefined reference to `typeinfo for YAML::BadSubscript'
main.cpp:(.text._ZN4YAML4NodeixIA11_cEES0_RKT_[_ZN4YAML4NodeixIA11_cEES0_RKT_]+0x257): undefined reference to `YAML::detail::memory::create_node()'
main.cpp:(.text._ZN4YAML4NodeixIA11_cEES0_RKT_[_ZN4YAML4NodeixIA11_cEES0_RKT_]+0x26c): undefined reference to `YAML::detail::node_data::insert_map_pair(YAML::detail::node&, YAML::detail::node&)'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::detail::node& YAML::detail::node_data::get<char [24]>(char const (&) [24], std::shared_ptr<YAML::detail::memory_holder>)':
main.cpp:(.text._ZN4YAML6detail9node_data3getIA24_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data3getIA24_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0xb3): undefined reference to `YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)'
main.cpp:(.text._ZN4YAML6detail9node_data3getIA24_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data3getIA24_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0xdf): undefined reference to `YAML::BadSubscript::~BadSubscript()'
main.cpp:(.text._ZN4YAML6detail9node_data3getIA24_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data3getIA24_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0xe6): undefined reference to `typeinfo for YAML::BadSubscript'
main.cpp:(.text._ZN4YAML6detail9node_data3getIA24_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data3getIA24_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0x12d): undefined reference to `YAML::detail::memory::create_node()'
main.cpp:(.text._ZN4YAML6detail9node_data3getIA24_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data3getIA24_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0x140): undefined reference to `YAML::detail::node_data::insert_map_pair(YAML::detail::node&, YAML::detail::node&)'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `YAML::Node YAML::Node::operator[]<int>(int const&)':
main.cpp:(.text._ZN4YAML4NodeixIiEES0_RKT_[_ZN4YAML4NodeixIiEES0_RKT_]+0x29f): undefined reference to `vtable for YAML::RepresentationException'
main.cpp:(.text._ZN4YAML4NodeixIiEES0_RKT_[_ZN4YAML4NodeixIiEES0_RKT_]+0x2c0): undefined reference to `vtable for YAML::BadSubscript'
main.cpp:(.text._ZN4YAML4NodeixIiEES0_RKT_[_ZN4YAML4NodeixIiEES0_RKT_]+0x2c7): undefined reference to `YAML::BadSubscript::~BadSubscript()'
main.cpp:(.text._ZN4YAML4NodeixIiEES0_RKT_[_ZN4YAML4NodeixIiEES0_RKT_]+0x2d1): undefined reference to `typeinfo for YAML::BadSubscript'
main.cpp:(.text._ZN4YAML4NodeixIiEES0_RKT_[_ZN4YAML4NodeixIiEES0_RKT_]+0x338): undefined reference to `YAML::detail::memory::create_node()'
main.cpp:(.text._ZN4YAML4NodeixIiEES0_RKT_[_ZN4YAML4NodeixIiEES0_RKT_]+0x3ba): undefined reference to `YAML::detail::memory::create_node()'
main.cpp:(.text._ZN4YAML4NodeixIiEES0_RKT_[_ZN4YAML4NodeixIiEES0_RKT_]+0x3cf): undefined reference to `YAML::detail::node_data::insert_map_pair(YAML::detail::node&, YAML::detail::node&)'
main.cpp:(.text._ZN4YAML4NodeixIiEES0_RKT_[_ZN4YAML4NodeixIiEES0_RKT_]+0x3fb): undefined reference to `YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)'
CMakeFiles/euroc_dataset.dir/main.cpp.o: In function `main':
main.cpp:(.text.startup+0xb57): undefined reference to `YAML::LoadFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
main.cpp:(.text.startup+0x1687): undefined reference to `vtable for YAML::RepresentationException'
main.cpp:(.text.startup+0x16aa): undefined reference to `vtable for YAML::BadSubscript'
main.cpp:(.text.startup+0x16b1): undefined reference to `YAML::BadSubscript::~BadSubscript()'
main.cpp:(.text.startup+0x16bb): undefined reference to `typeinfo for YAML::BadSubscript'
main.cpp:(.text.startup+0x17fc): undefined reference to `YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)'
main.cpp:(.text.startup+0x1867): undefined reference to `YAML::detail::memory::create_node()'
main.cpp:(.text.startup+0x1934): undefined reference to `YAML::detail::memory_holder::merge(YAML::detail::memory_holder&)'
main.cpp:(.text.startup+0x196a): undefined reference to `YAML::detail::memory::create_node()'
main.cpp:(.text.startup+0x197f): undefined reference to `YAML::detail::node_data::insert_map_pair(YAML::detail::node&, YAML::detail::node&)'
CMakeFiles/euroc_dataset.dir/main.cpp.o:(.data.rel.ro._ZTIN4YAML18TypedBadConversionIiEE[_ZTIN4YAML18TypedBadConversionIiEE]+0x10): undefined reference to `typeinfo for YAML::BadConversion'
CMakeFiles/euroc_dataset.dir/main.cpp.o:(.data.rel.ro._ZTIN4YAML18TypedBadConversionIdEE[_ZTIN4YAML18TypedBadConversionIdEE]+0x10): undefined reference to `typeinfo for YAML::BadConversion'
CMakeFiles/euroc_dataset.dir/main.cpp.o:(.data.rel.ro._ZTIN4YAML18TypedBadConversionIfEE[_ZTIN4YAML18TypedBadConversionIfEE]+0x10): undefined reference to `typeinfo for YAML::BadConversion'
collect2: error: ld returned 1 exit status
tools/EurocDataset/CMakeFiles/euroc_dataset.dir/build.make:418: recipe for target '../bin/rtabmap-euroc_dataset' failed
make[2]: *** [../bin/rtabmap-euroc_dataset] Error 1
CMakeFiles/Makefile2:940: recipe for target 'tools/EurocDataset/CMakeFiles/euroc_dataset.dir/all' failed
make[1]: *** [tools/EurocDataset/CMakeFiles/euroc_dataset.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

Can I get any help for this?

matlabbe commented 3 years ago

It seems there is a conflict somehow with yaml-cpp library. https://github.com/introlab/rtabmap/blob/47e40ef34d3c1dc0e96409b6e3237f48ba836be4/tools/EurocDataset/CMakeLists.txt#L3

Otherwise, the yaml dependency is used only for the euroc command line tool. If you don't need it, you can comment this line: https://github.com/introlab/rtabmap/blob/47e40ef34d3c1dc0e96409b6e3237f48ba836be4/tools/CMakeLists.txt#L9

Mingchi-Yeh commented 3 years ago

It works ! Thank you for the help.