introlab / rtabmap_ros

RTAB-Map's ROS package.
http://wiki.ros.org/rtabmap_ros
BSD 3-Clause "New" or "Revised" License
1.01k stars 558 forks source link

Installation error from the source using ubuntu 14.04 #144

Open PeterPan92 opened 7 years ago

PeterPan92 commented 7 years ago

Hi, When i installed rtabmap from the source,followed all the instructions for the rtabmap_ros install,i got something wrong,just as follows,

`peter@peter:~/index_download/rtabmap/build$cmake ..
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- checking for module 'eigen3'
--   found eigen3, version 3.3.1
-- Found eigen: /usr/local/include/eigen3  
-- checking for module 'flann'
--   found flann, version 1.8.4
-- Found Flann: /usr/lib/x86_64-linux-gnu/libflann_cpp_s.a  
-- Found qhull: /usr/lib/x86_64-linux-gnu/libqhull.so  
-- checking for module 'libopenni'
--   found libopenni, version 1.5.4.0
-- Found openni: /usr/lib/libOpenNI.so  
-- checking for module 'libopenni2'
--   found libopenni2, version 2.2.0.3
-- Found OpenNI2: /usr/lib/libOpenNI2.so  
-- Found libusb-1.0: /usr/include  
-- Found PCL_COMMON: /usr/lib/libpcl_common.so  
-- Found PCL_KDTREE: /usr/lib/libpcl_kdtree.so  
-- Found PCL_OCTREE: /usr/lib/libpcl_octree.so  
-- Found PCL_SEARCH: /usr/lib/libpcl_search.so  
-- Found PCL_SURFACE: /usr/lib/libpcl_surface.so  
-- Found PCL_SAMPLE_CONSENSUS: /usr/lib/libpcl_sample_consensus.so  
-- Found PCL_IO: /usr/lib/libpcl_io.so  
-- Found PCL_FILTERS: /usr/lib/libpcl_filters.so  
-- Found PCL_FEATURES: /usr/lib/libpcl_features.so  
-- Found PCL_GEOMETRY: /usr/include/pcl-1.7  
-- Found PCL_KEYPOINTS: /usr/lib/libpcl_keypoints.so  
-- Found PCL_REGISTRATION: /usr/lib/libpcl_registration.so  
-- Found PCL_SEGMENTATION: /usr/lib/libpcl_segmentation.so  
-- Found PCL_RECOGNITION: /usr/lib/libpcl_recognition.so  
-- Found PCL_VISUALIZATION: /usr/lib/libpcl_visualization.so  
-- Found PCL_PEOPLE: /usr/lib/libpcl_people.so  
-- Found PCL_OUTOFCORE: /usr/lib/libpcl_outofcore.so  
-- Found PCL_TRACKING: /usr/lib/libpcl_tracking.so  
-- Found PCL_APPS: /usr/lib/libpcl_apps.so  
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp  
-- Found OpenMP
-- Found OpenCV: /usr/local/include/opencv;/usr/local/include
-- Found PCL: /usr/include/pcl-1.7;/usr/local/include/eigen3;/usr/include;/usr/include/ni;/usr/include/openni2;/usr/include/vtk-5.8
-- Found ZLIB: /usr/include
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- Found Qt4: /usr/bin/qmake (found version "4.8.6") 
-- Found QVTK: /usr/lib/libQVTK.so  
-- Found Freenect: /usr/include
-- Found freenect2: /usr/local/include
-- Found OpenNI2: /usr/include/openni2
-- Found DC1394: /usr/include/dc1394
-- Found CSPARSE: /usr/local/include/EXTERNAL/csparse  
-- Found g2o: /usr/local/include;/usr/local/include/EXTERNAL/csparse;/usr/include/suitesparse
-- GTSAM include directory:  /usr/local/lib/cmake/GTSAM/../../../include;/usr/include;/usr/local/include/gtsam/3rdparty/Eigen/
-- Found cvsba: /usr/local/include
-- Found octomap: /opt/ros/indigo/include
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Found Pthreads` 
-- --------------------------------------------
`--Info :
--   Version : 0.11.13
--   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  -Wno-deprecated -fopenmp -std=c++11
--   With OpenCV 2 nonfree module (SIFT/SURF) = YES (License: Non commercial)
--   With Freenect             = YES (License: Apache v2 and/or GPLv2)
--   With OpenNI2              = YES (License: Apache v2)
--   With Freenect2            = YES (License: Apache v2 and/or GPLv2)
--   With dc1394               = YES (License: LGPL)
--   With FlyCapture2/Triclops = NO (Point Grey SDK not found)
--   With TORO                 = YES (License: Creative Commons [Attribution-NonCommercial-ShareAlike])
--   With g2o                  = YES (License: BSD)
--   With GTSAM                = YES (License: BSD)
--   With VERTIGO              = YES (License: GPLv3)
--   With cvsba                = YES (License: GPLv2)
--   With ZED                  = NO (ZED sdk not found)
--   With RealSense            = NO (librealsense not found)
--   With OCTOMAP              = YES (License: BSD)
--   With Qt4                  = YES (License: Open Source or Commercial) ` 
-- --------------------------------------------
`-- Configuring done
-- Generating done
-- Build files have been written to: /home/peter/index_download/rtabmap/build
peter@peter:~/index_download/rtabmap/build$`

When i run "make -j4",errors appear:

``../../../bin/librtabmap_core.so.0.11.13:对‘g2o::csparse_extension::cs_cholsolsymb(cs_sparse` const*, double*, cs_symbolic const*, double*, int*)’未定义的引用
../../../bin/librtabmap_core.so.0.11.13:对‘g2o::csparse_extension::writeCs2Octave(char const*, cs_sparse const*, bool)’未定义的引用
../../../bin/librtabmap_core.so.0.11.13:对‘g2o::csparse_extension::cs_chol_workspace(cs_sparse const*, cs_symbolic const*, int*, double*)’未定义的引用
collect2: error: ld returned 1 exit status
make[2]: *** [../bin/rtabmap-camera] 错误 1
make[1]: *** [tools/Camera/CMakeFiles/camera.dir/all] 错误 2
make[1]: *** 正在等待未完成的任务....
../../../bin/librtabmap_core.so.0.11.13:对‘g2o::csparse_extension::cs_cholsolsymb(cs_sparse const*, double*, cs_symbolic const*, double*, int*)’未定义的引用
../../../bin/librtabmap_core.so.0.11.13:对‘g2o::csparse_extension::writeCs2Octave(char const*, cs_sparse const*, bool)’未定义的引用
../../../bin/librtabmap_core.so.0.11.13:对‘g2o::csparse_extension::cs_chol_workspace(cs_sparse const*, cs_symbolic const*, int*, double*)’未定义的引用
collect2: error: ld returned 1 exit status
make[2]: *** [../bin/rtabmap-console] 错误 1
make[1]: *** [tools/ConsoleApp/CMakeFiles/consoleApp.dir/all] 错误 2
../../../bin/librtabmap_core.so.0.11.13:对‘g2o::csparse_extension::cs_cholsolsymb(cs_sparse const*, double*, cs_symbolic const*, double*, int*)’未定义的引用
../../../bin/librtabmap_core.so.0.11.13:对‘g2o::csparse_extension::writeCs2Octave(char const*, cs_sparse const*, bool)’未定义的引用
../../../bin/librtabmap_core.so.0.11.13:对‘g2o::csparse_extension::cs_chol_workspace(cs_sparse const*, cs_symbolic const*, int*, double*)’未定义的引用
collect2: error: ld returned 1 exit status
make[2]: *** [../bin/rtabmap-rgbd_camera] 错误 1
make[1]: *** [tools/CameraRGBD/CMakeFiles/rgbd_camera.dir/all] 错误 2
make: *** [all] 错误 2``

Then i do just like this https://github.com/introlab/rtabmap/issues/154 When i make without g2o (cmake -DWITH_G2O=OFF ..),There is no error occur.So i do "$ make VERBOSE=1", there appears:

`Linking CXX executable ../../../bin/rtabmap
cd /home/peter/index_download/rtabmap/build/app/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/rtabmap.dir/link.txt --verbose=1
/usr/bin/c++    -fmessage-length=0  -Wno-deprecated -fopenmp -std=c++11 -O3 -DNDEBUG     CMakeFiles/rtabmap.dir/main.cpp.o CMakeFiles/rtabmap.dir/moc_ObjDeletionHandler.cxx.o  -o ../../../bin/rtabmap  -L/usr/local/lib -rdynamic ../../../bin/librtabmap_core.so.0.11.13 ../../../bin/librtabmap_gui.so.0.11.13 ../../../bin/librtabmap_utilite.so.0.11.13 -lQtSvg -lQtGui -lQtCore /usr/local/lib/libopencv_videostab.so.2.4.11 /usr/local/lib/libopencv_video.so.2.4.11 /usr/local/lib/libopencv_ts.a /usr/local/lib/libopencv_superres.so.2.4.11 /usr/local/lib/libopencv_stitching.so.2.4.11 /usr/local/lib/libopencv_photo.so.2.4.11 /usr/local/lib/libopencv_ocl.so.2.4.11 /usr/local/lib/libopencv_objdetect.so.2.4.11 /usr/local/lib/libopencv_nonfree.so.2.4.11 /usr/local/lib/libopencv_ml.so.2.4.11 /usr/local/lib/libopencv_legacy.so.2.4.11 /usr/local/lib/libopencv_imgproc.so.2.4.11 /usr/local/lib/libopencv_highgui.so.2.4.11 /usr/local/lib/libopencv_gpu.so.2.4.11 /usr/local/lib/libopencv_flann.so.2.4.11 /usr/local/lib/libopencv_features2d.so.2.4.11 /usr/local/lib/libopencv_core.so.2.4.11 /usr/local/lib/libopencv_contrib.so.2.4.11 /usr/local/lib/libopencv_calib3d.so.2.4.11 -lboost_system -lboost_filesystem -lboost_thread -lboost_date_time -lboost_iostreams -lboost_serialization -lboost_chrono -lpthread -lpcl_common -Wl,-Bstatic -lflann_cpp_s -Wl,-Bdynamic -lpcl_kdtree -lpcl_octree -lpcl_search -lqhull -lpcl_surface -lpcl_sample_consensus -lOpenNI -lOpenNI2 /usr/lib/libvtkCommon.so.5.8.0 /usr/lib/libvtkFiltering.so.5.8.0 /usr/lib/libvtkImaging.so.5.8.0 /usr/lib/libvtkGraphics.so.5.8.0 /usr/lib/libvtkGenericFiltering.so.5.8.0 /usr/lib/libvtkIO.so.5.8.0 /usr/lib/libvtkRendering.so.5.8.0 /usr/lib/libvtkVolumeRendering.so.5.8.0 /usr/lib/libvtkHybrid.so.5.8.0 /usr/lib/libvtkWidgets.so.5.8.0 /usr/lib/libvtkParallel.so.5.8.0 /usr/lib/libvtkInfovis.so.5.8.0 /usr/lib/libvtkGeovis.so.5.8.0 /usr/lib/libvtkViews.so.5.8.0 /usr/lib/libvtkCharts.so.5.8.0 -lpcl_io -lpcl_filters -lpcl_features -lpcl_keypoints -lpcl_registration -lpcl_segmentation -lpcl_recognition -lpcl_visualization -lpcl_people -lpcl_outofcore -lpcl_tracking -lpcl_apps -lboost_system -lboost_filesystem -lboost_thread -lboost_date_time -lboost_iostreams -lboost_serialization -lboost_chrono -lpthread -lqhull -lOpenNI -lOpenNI2 -Wl,-Bstatic -lflann_cpp_s -Wl,-Bdynamic /usr/lib/libvtkCommon.so.5.8.0 /usr/lib/libvtkFiltering.so.5.8.0 /usr/lib/libvtkImaging.so.5.8.0 /usr/lib/libvtkGraphics.so.5.8.0 /usr/lib/libvtkGenericFiltering.so.5.8.0 /usr/lib/libvtkIO.so.5.8.0 /usr/lib/libvtkRendering.so.5.8.0 /usr/lib/libvtkVolumeRendering.so.5.8.0 /usr/lib/libvtkHybrid.so.5.8.0 /usr/lib/libvtkWidgets.so.5.8.0 /usr/lib/libvtkParallel.so.5.8.0 /usr/lib/libvtkInfovis.so.5.8.0 /usr/lib/libvtkGeovis.so.5.8.0 /usr/lib/libvtkViews.so.5.8.0 /usr/lib/libvtkCharts.so.5.8.0 ../../../bin/librtabmap_core.so.0.11.13 -lz /opt/ros/indigo/lib/libfreenect.so /opt/ros/indigo/lib/libfreenect_sync.so /usr/local/lib/libfreenect2.so -ldc1394 /usr/local/lib/libg2o_core.so /usr/local/lib/libg2o_types_slam2d.so /usr/local/lib/libg2o_types_slam3d.so /usr/local/lib/libg2o_types_sba.so /usr/local/lib/libg2o_stuff.so /usr/local/lib/libg2o_solver_csparse.so /usr/local/lib/libg2o_csparse_extension.so -lcsparse /usr/local/lib/libg2o_ext_csparse.so /usr/local/lib/libg2o_solver_cholmod.so -lcholmod /usr/local/lib/libgtsam.so.4.0.0 -lboost_timer -ltbb -ltbbmalloc /usr/local/lib/libmetis.so -lblas -llapack -lf2c -lgomp -lcvsba ../../../bin/librtabmap_utilite.so.0.11.13 /usr/local/lib/libopencv_videostab.so.2.4.11 /usr/local/lib/libopencv_ts.a -lpthread -lrt /usr/local/lib/libopencv_superres.so.2.4.11 /usr/local/lib/libopencv_stitching.so.2.4.11 /usr/local/lib/libopencv_contrib.so.2.4.11 /usr/local/lib/libopencv_nonfree.so.2.4.11 /usr/local/lib/libopencv_ocl.so.2.4.11 /usr/local/lib/libopencv_gpu.so.2.4.11 /usr/local/lib/libopencv_photo.so.2.4.11 /usr/local/lib/libopencv_objdetect.so.2.4.11 /usr/local/lib/libopencv_legacy.so.2.4.11 /usr/local/lib/libopencv_video.so.2.4.11 /usr/local/lib/libopencv_ml.so.2.4.11 /usr/local/lib/libopencv_calib3d.so.2.4.11 /usr/local/lib/libopencv_features2d.so.2.4.11 /usr/local/lib/libopencv_highgui.so.2.4.11 /usr/local/lib/libopencv_imgproc.so.2.4.11 /usr/local/lib/libopencv_flann.so.2.4.11 /usr/local/lib/libopencv_core.so.2.4.11 /usr/lib/libvtkGenericFiltering.so.5.8.0 /usr/lib/libvtkGeovis.so.5.8.0 -lm /usr/lib/libvtkCharts.so.5.8.0 /usr/lib/libvtkViews.so.5.8.0 /usr/lib/libvtkInfovis.so.5.8.0 /usr/lib/libvtkWidgets.so.5.8.0 /usr/lib/libvtkVolumeRendering.so.5.8.0 /usr/lib/libvtkHybrid.so.5.8.0 /usr/lib/libvtkParallel.so.5.8.0 /usr/lib/libvtkRendering.so.5.8.0 /usr/lib/libvtkImaging.so.5.8.0 /usr/lib/libvtkGraphics.so.5.8.0 /usr/lib/libvtkIO.so.5.8.0 /usr/lib/libvtkFiltering.so.5.8.0 /usr/lib/libvtkCommon.so.5.8.0 -lm /usr/lib/libvtksys.so.5.8.0 -ldl -lboost_iostreams -lpcl_common -Wl,-Bstatic -lflann_cpp_s -Wl,-Bdynamic -lpcl_kdtree -lpcl_octree -lpcl_search -lqhull -lpcl_surface -lpcl_sample_consensus -lOpenNI -lOpenNI2 -lpcl_io -lpcl_filters -lpcl_features -lpcl_keypoints -lpcl_registration -lpcl_segmentation -lpcl_recognition -lpcl_visualization -lpcl_people -lpcl_outofcore -lpcl_tracking -lpcl_apps -lboost_iostreams -lpcl_common -Wl,-Bstatic -lflann_cpp_s -Wl,-Bdynamic -lpcl_kdtree -lpcl_octree -lpcl_search -lqhull -lpcl_surface -lpcl_sample_consensus -lOpenNI -lOpenNI2 -lpcl_io -lpcl_filters -lpcl_features -lpcl_keypoints -lpcl_registration -lpcl_segmentation -lpcl_recognition -lpcl_visualization -lpcl_people -lpcl_outofcore -lpcl_tracking -lpcl_apps -lboost_serialization -lboost_system -lboost_filesystem -lboost_thread -lboost_date_time -lboost_chrono -lpthread /opt/ros/indigo/lib/liboctomap.so /opt/ros/indigo/lib/liboctomath.so -lQVTK -Wl,-rpath,/usr/local/lib:/home/peter/index_download/rtabmap/bin:/opt/ros/indigo/lib: 
../../../bin/librtabmap_core.so.0.11.13:对‘g2o::csparse_extension::cs_cholsolsymb(cs_sparse const*, double*, cs_symbolic const*, double*, int*)’未定义的引用
../../../bin/librtabmap_core.so.0.11.13:对‘g2o::csparse_extension::writeCs2Octave(char const*, cs_sparse const*, bool)’未定义的引用
../../../bin/librtabmap_core.so.0.11.13:对‘g2o::csparse_extension::cs_chol_workspace(cs_sparse const*, cs_symbolic const*, int*, double*)’未定义的引用
collect2: error: ld returned 1 exit status
make[2]: *** [../bin/rtabmap] 错误 1
make[2]:正在离开目录 `/home/peter/index_download/rtabmap/build'
make[1]: *** [app/src/CMakeFiles/rtabmap.dir/all] 错误 2
make[1]:正在离开目录 `/home/peter/index_download/rtabmap/build'
make: *** [all] 错误 2`

I can't find which library it lost.But i find the fuction "g2o::csparse_extension::writeCs2Octave(char const, cs_sparse const, bool" is in /g2o/solvers/csparse/csparse_helper.cpp and it's header files is csparse_helper.h. I think both of those files is link into libcsparse_extension.so(i'm not sure) through the CMakeList.txt ,here is the cmakelist content

INCLUDE_DIRECTORIES(${CSPARSE_INCLUDE_DIR})

ADD_LIBRARY(csparse_extension ${G2O_LGPL_LIB_TYPE}
  csparse_helper.cpp csparse_helper.h
  g2o_csparse_extension_api.h
)
SET_TARGET_PROPERTIES(csparse_extension PROPERTIES OUTPUT_NAME ${LIB_PREFIX}csparse_extension)

IF(BUILD_CSPARSE)
  TARGET_LINK_LIBRARIES(csparse_extension csparse)
ELSE()
  TARGET_LINK_LIBRARIES(csparse_extension ${CSPARSE_LIBRARY})
ENDIF()

ADD_LIBRARY(solver_csparse${G2O_LIB_TYPE}
  solver_csparse.cpp
  linear_solver_csparse.h
  g2o_csparse_api.h
)
SET_TARGET_PROPERTIES(solver_csparse PROPERTIES OUTPUT_NAME ${LIB_PREFIX}solver_csparse)

TARGET_LINK_LIBRARIES(solver_csparse csparse_extension core)

INSTALL(TARGETS solver_csparse csparse_extension
  RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
  LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
  ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
)
FILE(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp")
INSTALL(FILES ${headers} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/g2o/solvers/csparse)

So, i think the library file "libcsparse_extension.so" should contain the functions. However the library file "libcsparse_extension.so" is found when make the program(we can see the message showed from "make VERBOSE=1"),but there still has error message .I also use the latest g2o from https://github.com/RainerKuemmerle/g2o. So it really fused me .I'm not sure what wrong here,wish your help. Thanks a lot.

matlabbe commented 7 years ago

Hi,

On my computer, csparse seems already installed, so g2o doesn't use its own version:

(rtabmap cmake log)
-- Found CSPARSE: /usr/include/suitesparse  
-- Found g2o: /usr/local/include;/usr/include/suitesparse;/usr/include/suitesparse

Try install libsuitesparse-dev before building g2o:

sudo apt-get install libsuitesparse-dev

Other info:

$ ldd rtabmap | grep sparse
    libg2o_csparse_extension.so => /usr/local/lib/libg2o_csparse_extension.so (0x00007fa2c49d2000)
    libcxsparse.so.3.1.2 => /usr/lib/x86_64-linux-gnu/libcxsparse.so.3.1.2 (0x00007fa2c47a8000)

cheers, Mathieu

PeterPan92 commented 7 years ago

Hi, Thanks very much for your reply. I tried with the method just like you said.But there are still have the problem. Here are the steps which i tried. First, i try to unload the g2o library, but i can't get any informations about it.

peter@peter:~$ dpkg -l | grep g2o
peter@peter:~$ 

I tried "sudo apt-get install libsuitesparse-dev",the terminal shows

peter@peter:~$ sudo apt-get install libsuitesparse-dev
[sudo] password for peter: 
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
libsuitesparse-dev 已经是最新的版本。
下列软件包是自动安装的并且现在不需要了:
  beignet libntdb1 python-ntdb ros-indigo-costmap-2d
  ros-indigo-create-dashboard ros-indigo-create-driver ros-indigo-create-node
  ros-indigo-move-base-msgs ros-indigo-voxel-grid
Use 'apt-get autoremove' to remove them.
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 89 个软件包未被升级。

And then ,i reinstalled the g2o,here is the steps:

peter@peter:~/g2o/build$ cmake ../
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Compiling on Unix
-- Found CHOLMOD: /usr/include/suitesparse  
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- A library with BLAS API found.
-- Looking for cheev_
-- Looking for cheev_ - found
-- A library with LAPACK API found.
-- Found CHOLMOD and its dependencies
-- Found CSPARSE: /usr/include/suitesparse  
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so  
-- Compiling with OpenGL support
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- Found Qt4: /usr/bin/qmake (found version "4.8.6") 
-- Found QGLVIEWER: /usr/include/QGLViewer  
-- Compiling g2o apps
-- Compiling g2o examples
-- Compiling with GCC
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Found Eigen3: /usr/local/include/eigen3 (Required is at least version "2.91.0") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/peter/g2o/build

then ,make and sudo make install ,everything seems goes well. But when i run "cmake .."in "rtabmap/build",the output just like before

peter@peter:~/index_download/rtabmap/build$ cmake ..
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- checking for module 'eigen3'
--   found eigen3, version 3.3.1
-- Found eigen: /usr/local/include/eigen3  
-- checking for module 'flann'
--   found flann, version 1.8.4
-- Found Flann: /usr/lib/x86_64-linux-gnu/libflann_cpp_s.a  
-- Found qhull: /usr/lib/x86_64-linux-gnu/libqhull.so  
-- checking for module 'libopenni'
--   found libopenni, version 1.5.4.0
-- Found openni: /usr/lib/libOpenNI.so  
-- checking for module 'libopenni2'
--   found libopenni2, version 2.2.0.3
-- Found OpenNI2: /usr/lib/libOpenNI2.so  
-- Found libusb-1.0: /usr/include  
-- Found PCL_COMMON: /usr/lib/libpcl_common.so  
-- Found PCL_KDTREE: /usr/lib/libpcl_kdtree.so  
-- Found PCL_OCTREE: /usr/lib/libpcl_octree.so  
-- Found PCL_SEARCH: /usr/lib/libpcl_search.so  
-- Found PCL_SURFACE: /usr/lib/libpcl_surface.so  
-- Found PCL_SAMPLE_CONSENSUS: /usr/lib/libpcl_sample_consensus.so  
-- Found PCL_IO: /usr/lib/libpcl_io.so  
-- Found PCL_FILTERS: /usr/lib/libpcl_filters.so  
-- Found PCL_FEATURES: /usr/lib/libpcl_features.so  
-- Found PCL_GEOMETRY: /usr/include/pcl-1.7  
-- Found PCL_KEYPOINTS: /usr/lib/libpcl_keypoints.so  
-- Found PCL_REGISTRATION: /usr/lib/libpcl_registration.so  
-- Found PCL_SEGMENTATION: /usr/lib/libpcl_segmentation.so  
-- Found PCL_RECOGNITION: /usr/lib/libpcl_recognition.so  
-- Found PCL_VISUALIZATION: /usr/lib/libpcl_visualization.so  
-- Found PCL_PEOPLE: /usr/lib/libpcl_people.so  
-- Found PCL_OUTOFCORE: /usr/lib/libpcl_outofcore.so  
-- Found PCL_TRACKING: /usr/lib/libpcl_tracking.so  
-- Found PCL_APPS: /usr/lib/libpcl_apps.so  
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp  
-- Found OpenMP
-- Found OpenCV: /usr/local/include/opencv;/usr/local/include
-- Found PCL: /usr/include/pcl-1.7;/usr/local/include/eigen3;/usr/include;/usr/include/ni;/usr/include/openni2;/usr/include/vtk-5.8
-- Found ZLIB: /usr/include
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- Found Qt4: /usr/bin/qmake (found version "4.8.6") 
-- Found QVTK: /usr/lib/libQVTK.so  
-- Found Freenect: /usr/include
-- Found freenect2: /usr/local/include
-- Found OpenNI2: /usr/include/openni2
-- Found DC1394: /usr/include/dc1394
-- Found CSPARSE: /usr/local/include/EXTERNAL/csparse  
-- Found g2o: /usr/local/include;/usr/local/include/EXTERNAL/csparse;/usr/include/suitesparse
-- GTSAM include directory:  /usr/local/lib/cmake/GTSAM/../../../include;/usr/include;/usr/local/include/gtsam/3rdparty/Eigen/
-- Found cvsba: /usr/local/include
-- Found octomap: /opt/ros/indigo/include
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Found Pthreads
-- --------------------------------------------
-- Info :
--   Version : 0.11.13
--   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  -Wno-deprecated -fopenmp -std=c++11
--   With OpenCV 2 nonfree module (SIFT/SURF) = YES (License: Non commercial)
--   With Freenect             = YES (License: Apache v2 and/or GPLv2)
--   With OpenNI2              = YES (License: Apache v2)
--   With Freenect2            = YES (License: Apache v2 and/or GPLv2)
--   With dc1394               = YES (License: LGPL)
--   With FlyCapture2/Triclops = NO (Point Grey SDK not found)
--   With TORO                 = YES (License: Creative Commons [Attribution-NonCommercial-ShareAlike])
--   With g2o                  = YES (License: BSD)
--   With GTSAM                = YES (License: BSD)
--   With VERTIGO              = YES (License: GPLv3)
--   With cvsba                = YES (License: GPLv2)
--   With ZED                  = NO (ZED sdk not found)
--   With RealSense            = NO (librealsense not found)
--   With OCTOMAP              = YES (License: BSD)
--   With Qt4                  = YES (License: Open Source or Commercial)
-- --------------------------------------------
-- Configuring done
-- Generating done
-- Build files have been written to: /home/peter/index_download/rtabmap/build

So, i get the same error like before. In your reply, i know there already have csparse installed.When i run "sudo apt-get install libsuitesparse-dev",it already installed.Even if i rebuild "g2o",there seems like nothing changed. Is there anything i did wrong or i forgot. Beside,when i run "ldd rtabmap | grep sparse",there shows

peter@peter:~/index_download/rtabmap/build$ ldd rtabmap | grep sparse
ldd: ./rtabmap: 没有那个文件或目录

Should i remove g2o before i rebuild g2o.Is it possible this reason caused this problem?And how to remove "g2o" from my computer.

Thanks

matlabbe commented 7 years ago

Did you try building with the g2o version from ROS? http://wiki.ros.org/libg2o

$ sudo apt-get install ros-indigo-libg2o
PeterPan92 commented 7 years ago

Thanks very much for your reply. I have tried building with the g2o version just like you said and it installed a package.However when i try building rtabmap ,the wrong message appear again.

eter@peter:~$ sudo apt-get install ros-indigo-libg2o
[sudo] password for peter: 
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
下列软件包是自动安装的并且现在不需要了:
  beignet libntdb1 python-ntdb ros-indigo-costmap-2d
  ros-indigo-create-dashboard ros-indigo-create-driver ros-indigo-create-node
  ros-indigo-move-base-msgs ros-indigo-voxel-grid
Use 'apt-get autoremove' to remove them.
下列【新】软件包将被安装:
  ros-indigo-libg2o
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 99 个软件包未被升级。
需要下载 879 kB 的软件包。
解压缩后会消耗掉 5,564 kB 的额外空间。
获取:1 http://packages.ros.org/ros/ubuntu/ trusty/main ros-indigo-libg2o amd64 2014.2.18-0trusty-20160321-175501-0700 [879 kB]
下载 879 kB,耗时 2秒 (330 kB/s)            
正在选中未选择的软件包 ros-indigo-libg2o。
(正在读取数据库 ... 系统当前共安装有 272269 个文件和目录。)
正准备解包 .../ros-indigo-libg2o_2014.2.18-0trusty-20160321-175501-0700_amd64.deb  ...
正在解包 ros-indigo-libg2o (2014.2.18-0trusty-20160321-175501-0700) ...
正在设置 ros-indigo-libg2o (2014.2.18-0trusty-20160321-175501-0700) ...

However when i try building rtabmap ,the wrong message appear again.

peter@peter:~/index_download/rtabmap/build$ make -j4
Scanning dependencies of target rtabmap_utilite
[  0%] [  1%] [  1%] [  2%] Building CXX object utilite/src/CMakeFiles/rtabmap_utilite.dir/UEventsManager.cpp.o
Building CXX object utilite/src/CMakeFiles/rtabmap_utilite.dir/UEventsHandler.cpp.o
Building CXX object utilite/src/CMakeFiles/rtabmap_utilite.dir/UEventsSender.cpp.o
Building CXX object utilite/src/CMakeFiles/rtabmap_utilite.dir/UFile.cpp.o
[  2%] Building CXX object utilite/src/CMakeFiles/rtabmap_utilite.dir/UDirectory.cpp.o
[  3%] Building CXX object utilite/src/CMakeFiles/rtabmap_utilite.dir/UConversion.cpp.o
[  3%] Building CXX object utilite/src/CMakeFiles/rtabmap_utilite.dir/ULogger.cpp.o
[  4%] Building CXX object utilite/src/CMakeFiles/rtabmap_utilite.dir/UThread.cpp.o
[  4%] Building CXX object utilite/src/CMakeFiles/rtabmap_utilite.dir/UTimer.cpp.o
[  5%] Building CXX object utilite/src/CMakeFiles/rtabmap_utilite.dir/UProcessInfo.cpp.o
[  5%] Building CXX object utilite/src/CMakeFiles/rtabmap_utilite.dir/UVariant.cpp.o
Linking CXX shared library ../../../bin/librtabmap_utilite.so
[  5%] Built target rtabmap_utilite
Scanning dependencies of target extractObject
Scanning dependencies of target res_tool
Scanning dependencies of target imagesJoiner
[  5%] Building CXX object utilite/resource_generator/CMakeFiles/res_tool.dir/main.cpp.o
[  6%] Building CXX object tools/ImagesJoiner/CMakeFiles/imagesJoiner.dir/main.cpp.o
[  6%] Building CXX object tools/ExtractObject/CMakeFiles/extractObject.dir/main.cpp.o
Linking CXX executable ../../../bin/rtabmap-res_tool
[  6%] Built target res_tool
[  7%] [Creating resources]
 Using namespace=rtabmap
 Using target directory=/home/peter/index_download/rtabmap/build/corelib/src
Input file "/home/peter/index_download/rtabmap/corelib/src/resources/DatabaseSchema.sql" size = 4208 bytes
Output file "/home/peter/index_download/rtabmap/build/corelib/src/DatabaseSchema_sql.h" size = 8637 bytes
Scanning dependencies of target rtabmap_core
Linking CXX executable ../../../bin/rtabmap-imagesJoiner
[  7%] Built target imagesJoiner
[  7%] [  8%] [  8%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/Rtabmap.cpp.o
Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/RtabmapThread.cpp.o
Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/Statistics.cpp.o
[  9%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/Memory.cpp.o
[  9%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/DBDriver.cpp.o
[ 10%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/DBDriverSqlite3.cpp.o
[ 10%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/DBReader.cpp.o
[ 11%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/Camera.cpp.o
[ 11%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/CameraThread.cpp.o
[ 12%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/CameraRGB.cpp.o
[ 12%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/CameraRGBD.cpp.o
Linking CXX executable ../../../bin/rtabmap-extractObject
[ 12%] Built target extractObject
[ 13%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/CameraStereo.cpp.o
[ 13%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/CameraModel.cpp.o
[ 14%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/EpipolarGeometry.cpp.o
[ 14%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/VisualWord.cpp.o
[ 15%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/VWDictionary.cpp.o
[ 15%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/BayesFilter.cpp.o
[ 15%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/Parameters.cpp.o
[ 16%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/Signature.cpp.o
[ 16%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/Features2d.cpp.o
[ 17%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/Transform.cpp.o
[ 17%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/GeodeticCoords.cpp.o
[ 18%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/util2d.cpp.o
[ 18%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/util3d.cpp.o
[ 19%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/util3d_filtering.cpp.o
[ 19%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/util3d_mapping.cpp.o
[ 20%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/util3d_transforms.cpp.o
[ 20%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/util3d_registration.cpp.o
[ 21%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/util3d_surface.cpp.o
[ 21%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/util3d_features.cpp.o
[ 22%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/util3d_correspondences.cpp.o
[ 22%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/util3d_motion_estimation.cpp.o
[ 23%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/SensorData.cpp.o
[ 23%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/Graph.cpp.o
[ 24%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/Compression.cpp.o
[ 24%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/Link.cpp.o
[ 24%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/Optimizer.cpp.o
[ 25%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/OptimizerTORO.cpp.o
[ 25%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/OptimizerG2O.cpp.o
[ 26%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/OptimizerGTSAM.cpp.o
[ 26%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/OptimizerCVSBA.cpp.o
[ 27%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/Registration.cpp.o
[ 27%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/RegistrationIcp.cpp.o
[ 28%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/RegistrationVis.cpp.o
[ 28%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/Odometry.cpp.o
[ 29%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/OdometryThread.cpp.o
[ 29%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/OdometryF2M.cpp.o
[ 30%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/OdometryMono.cpp.o
[ 30%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/OdometryF2F.cpp.o
[ 31%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/Stereo.cpp.o
[ 31%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/StereoDense.cpp.o
[ 32%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/StereoCameraModel.cpp.o
[ 32%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/OccupancyGrid.cpp.o
[ 33%] [ 33%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/GainCompensator.cpp.o
Building C object corelib/src/CMakeFiles/rtabmap_core.dir/rtflann/ext/lz4.c.o
[ 33%] Building C object corelib/src/CMakeFiles/rtabmap_core.dir/rtflann/ext/lz4hc.c.o
[ 34%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/FlannIndex.cpp.o
[ 34%] Building C object corelib/src/CMakeFiles/rtabmap_core.dir/sqlite3/sqlite3.c.o
[ 35%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/clams/discrete_depth_distortion_model_helpers.cpp.o
[ 35%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/clams/discrete_depth_distortion_model.cpp.o
[ 36%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/clams/frame_projector.cpp.o
[ 36%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/clams/slam_calibrator.cpp.o
[ 37%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/opencv/Orb.cpp.o
[ 37%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/opencv/solvepnp.cpp.o
[ 38%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/toro3d/posegraph3.cpp.o
[ 38%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/toro3d/treeoptimizer3_iteration.cpp.o
[ 39%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/toro3d/treeoptimizer3.cpp.o
[ 39%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/toro3d/posegraph2.cpp.o
[ 40%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/toro3d/treeoptimizer2.cpp.o
[ 40%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/vertigo/g2o/edge_se2Switchable.cpp.o
[ 41%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/vertigo/g2o/edge_se3Switchable.cpp.o
[ 41%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/vertigo/g2o/edge_switchPrior.cpp.o
[ 42%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/vertigo/g2o/types_g2o_robust.cpp.o
[ 42%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/vertigo/g2o/vertex_switchLinear.cpp.o
[ 42%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/OctoMap.cpp.o
Linking CXX shared library ../../../bin/librtabmap_core.so
[ 42%] Built target rtabmap_core
Scanning dependencies of target camera
Scanning dependencies of target consoleApp
Scanning dependencies of target rgbd_camera
[ 43%] Generating qrc_GuiLib.cxx
[ 44%] Generating __/include/rtabmap/gui/moc_MainWindow.cxx
[ 44%] [ 44%] Generating __/include/rtabmap/gui/moc_PreferencesDialog.cxx
[ 45%] Building CXX object tools/ConsoleApp/CMakeFiles/consoleApp.dir/main.cpp.o
[ 46%] Building CXX object tools/Camera/CMakeFiles/camera.dir/main.cpp.o
Generating __/include/rtabmap/gui/moc_DatabaseViewer.cxx
[ 46%] Generating moc_AboutDialog.cxx
[ 48%] [ 48%] Generating __/include/rtabmap/gui/moc_ConsoleWidget.cxx
Building CXX object tools/CameraRGBD/CMakeFiles/rgbd_camera.dir/main.cpp.o
[ 48%] Generating __/include/rtabmap/gui/moc_ImageView.cxx
[ 49%] Generating __/include/rtabmap/gui/moc_PdfPlot.cxx
[ 49%] Generating __/include/rtabmap/gui/moc_StatsToolBox.cxx
[ 50%] Generating __/include/rtabmap/gui/moc_ProgressDialog.cxx
[ 50%] Generating __/include/rtabmap/utilite/moc_UPlot.cxx
[ 51%] Generating __/include/rtabmap/utilite/moc_UImageView.cxx
[ 51%] Generating __/include/rtabmap/gui/moc_CloudViewer.cxx
[ 52%] Generating __/include/rtabmap/gui/moc_OdometryViewer.cxx
[ 52%] Generating __/include/rtabmap/gui/moc_LoopClosureViewer.cxx
[ 53%] Generating __/include/rtabmap/gui/moc_DataRecorder.cxx
[ 53%] Generating __/include/rtabmap/gui/moc_CameraViewer.cxx
[ 54%] Generating __/include/rtabmap/gui/moc_CalibrationDialog.cxx
[ 54%] Generating moc_ExportDialog.cxx
[ 54%] Generating moc_PostProcessingDialog.cxx
[ 55%] Generating moc_ExportCloudsDialog.cxx
[ 55%] Generating moc_ExportScansDialog.cxx
[ 56%] Generating moc_MapVisibilityWidget.cxx
[ 56%] Generating __/include/rtabmap/gui/moc_GraphViewer.cxx
[ 57%] Generating moc_CreateSimpleCalibrationDialog.cxx
[ 57%] Generating moc_ParametersToolBox.cxx
[ 58%] Generating moc_DepthCalibrationDialog.cxx
[ 58%] Generating 3rdParty/moc_QMultiComboBox.cxx
[ 59%] Generating ui_mainWindow.h
[ 59%] Generating ui_preferencesDialog.h
[ 60%] Generating ui_aboutDialog.h
[ 60%] Generating ui_consoleWidget.h
[ 61%] Generating ui_DatabaseViewer.h
[ 61%] Generating ui_loopClosureViewer.h
[ 62%] Generating ui_exportDialog.h
[ 62%] Generating ui_postProcessingDialog.h
[ 63%] Generating ui_exportCloudsDialog.h
[ 63%] Generating ui_exportScansDialog.h
[ 63%] Generating ui_calibrationDialog.h
[ 64%] Generating ui_createSimpleCalibrationDialog.h
[ 64%] Generating ui_depthCalibrationDialog.h
Scanning dependencies of target rtabmap_gui
[ 64%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/MainWindow.cpp.o
Linking CXX executable ../../../bin/rtabmap-camera
../../../bin/librtabmap_core.so.0.11.13:对‘g2o::csparse_extension::cs_cholsolsymb(cs_sparse const*, double*, cs_symbolic const*, double*, int*)’未定义的引用
../../../bin/librtabmap_core.so.0.11.13:对‘g2o::csparse_extension::writeCs2Octave(char const*, cs_sparse const*, bool)’未定义的引用
../../../bin/librtabmap_core.so.0.11.13:对‘g2o::csparse_extension::cs_chol_workspace(cs_sparse const*, cs_symbolic const*, int*, double*)’未定义的引用
collect2: error: ld returned 1 exit status
make[2]: *** [../bin/rtabmap-camera] 错误 1
make[1]: *** [tools/Camera/CMakeFiles/camera.dir/all] 错误 2
make[1]: *** 正在等待未完成的任务....
[ 65%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/PreferencesDialog.cpp.o
Linking CXX executable ../../../bin/rtabmap-console
../../../bin/librtabmap_core.so.0.11.13:对‘g2o::csparse_extension::cs_cholsolsymb(cs_sparse const*, double*, cs_symbolic const*, double*, int*)’未定义的引用
../../../bin/librtabmap_core.so.0.11.13:对‘g2o::csparse_extension::writeCs2Octave(char const*, cs_sparse const*, bool)’未定义的引用
../../../bin/librtabmap_core.so.0.11.13:对‘g2o::csparse_extension::cs_chol_workspace(cs_sparse const*, cs_symbolic const*, int*, double*)’未定义的引用
collect2: error: ld returned 1 exit status
make[2]: *** [../bin/rtabmap-console] 错误 1
make[1]: *** [tools/ConsoleApp/CMakeFiles/consoleApp.dir/all] 错误 2
[ 65%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/KeypointItem.cpp.o
[ 66%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/ImageView.cpp.o
[ 66%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/PdfPlot.cpp.o
Linking CXX executable ../../../bin/rtabmap-rgbd_camera
../../../bin/librtabmap_core.so.0.11.13:对‘g2o::csparse_extension::cs_cholsolsymb(cs_sparse const*, double*, cs_symbolic const*, double*, int*)’未定义的引用
../../../bin/librtabmap_core.so.0.11.13:对‘g2o::csparse_extension::writeCs2Octave(char const*, cs_sparse const*, bool)’未定义的引用
../../../bin/librtabmap_core.so.0.11.13:对‘g2o::csparse_extension::cs_chol_workspace(cs_sparse const*, cs_symbolic const*, int*, double*)’未定义的引用
collect2: error: ld returned 1 exit status
make[2]: *** [../bin/rtabmap-rgbd_camera] 错误 1
make[1]: *** [tools/CameraRGBD/CMakeFiles/rgbd_camera.dir/all] 错误 2
[ 67%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/StatsToolBox.cpp.o
[ 67%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/ProgressDialog.cpp.o
[ 68%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/AboutDialog.cpp.o
[ 68%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/ConsoleWidget.cpp.o
[ 69%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/DatabaseViewer.cpp.o
[ 69%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/utilite/UPlot.cpp.o
[ 70%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/CloudViewer.cpp.o
[ 70%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/OdometryViewer.cpp.o
[ 71%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/LoopClosureViewer.cpp.o
[ 71%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/DataRecorder.cpp.o
[ 71%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/CameraViewer.cpp.o
[ 72%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/CalibrationDialog.cpp.o
[ 72%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/ExportDialog.cpp.o
[ 73%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/PostProcessingDialog.cpp.o
[ 73%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/ExportCloudsDialog.cpp.o
[ 74%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/ExportScansDialog.cpp.o
[ 74%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/MapVisibilityWidget.cpp.o
[ 75%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/GraphViewer.cpp.o
[ 75%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/CreateSimpleCalibrationDialog.cpp.o
[ 76%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/ParametersToolBox.cpp.o
[ 76%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/DepthCalibrationDialog.cpp.o
[ 77%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/3rdParty/QMultiComboBox.cpp.o
[ 77%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_MainWindow.cxx.o
[ 78%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_PreferencesDialog.cxx.o
[ 78%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_DatabaseViewer.cxx.o
[ 79%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/moc_AboutDialog.cxx.o
[ 79%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_ConsoleWidget.cxx.o
[ 80%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_ImageView.cxx.o
[ 80%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_PdfPlot.cxx.o
[ 80%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_StatsToolBox.cxx.o
[ 81%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_ProgressDialog.cxx.o
[ 81%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/utilite/moc_UPlot.cxx.o
[ 82%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/utilite/moc_UImageView.cxx.o
[ 82%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_CloudViewer.cxx.o
[ 83%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_OdometryViewer.cxx.o
[ 83%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_LoopClosureViewer.cxx.o
[ 84%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_DataRecorder.cxx.o
[ 84%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_CameraViewer.cxx.o
[ 85%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_CalibrationDialog.cxx.o
[ 85%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/moc_ExportDialog.cxx.o
[ 86%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/moc_PostProcessingDialog.cxx.o
[ 86%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/moc_ExportCloudsDialog.cxx.o
[ 87%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/moc_ExportScansDialog.cxx.o
[ 87%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/moc_MapVisibilityWidget.cxx.o
[ 88%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_GraphViewer.cxx.o
[ 88%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/moc_CreateSimpleCalibrationDialog.cxx.o
[ 89%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/moc_ParametersToolBox.cxx.o
[ 89%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/moc_DepthCalibrationDialog.cxx.o
[ 89%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/3rdParty/moc_QMultiComboBox.cxx.o
[ 90%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/qrc_GuiLib.cxx.o
Linking CXX shared library ../../../bin/librtabmap_gui.so
[ 90%] Built target rtabmap_gui
make: *** [all] 错误 2
peter@peter:~/index_download/rtabmap/build$ 

What's more,if i change the order of " cxsparse " " g2o_ext_csparse" in the fourth line of "FindG2O.cmake" (the sentence is "FIND_LIBRARY(CSPARSE_LIBRARY NAMES cxsparse g2o_ext_csparse"),they will show different wrong message. If put "cxsparse" in front of " g2o_ext_csparse" , the error i get is the same as https://github.com/introlab/rtabmap/issues/154 .But if i let "cxsparse" behind " g2o_ext_csparse",the error shows just like above.So,is it possible the wrong path lead to this problem? I try to check up the path of g2o library, but i get nothing for there are too many storage path.What should i do ?Thanks a lot.

matlabbe commented 7 years ago

Cleanup the build directory (at least the CMake Cache) before remaking rtabmap:

$ cd rtabmap/build/
$ rm CMakeCache.txt
$ cmake ..
PeterPan92 commented 7 years ago

Everytime i try build rtabmap, i usually delete the rtabmap files. And redownload from the github. So this maybe not work.

matlabbe commented 7 years ago

What does CMake tells about which g2o/csparse found? The "Found CSPARSE" and "Found g2o" lines. Make sure you don't have remaining g2o installation in /usr/local.

PeterPan92 commented 7 years ago

Hi, Good news, i found the way to solve this question according to your suggestion.It is the wrong path caused this question.Many thanks for your help.Thank you.