Closed matlabbe closed 7 years ago
After some enabling/disabling dependencies, I finally got all working with this config (ZED 1.1.1/CUDA8):
$ cmake ..
-- 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.
-- Could NOT find PCL_APPS (missing: PCL_APPS_LIBRARY)
-- Found OpenMP
-- Found OpenCV: /opt/ros/kinetic/include/opencv-3.1.0-dev/opencv;/opt/ros/kinetic/include/opencv-3.1.0-dev
-- Found PCL: /usr/include/pcl-1.7;/usr/include/eigen3;/usr/include;/usr/include/ni;/usr/include/openni2;/usr/include/vtk-6.2;/usr/include/x86_64-linux-gnu;/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/jsoncpp;/usr/include/freetype2;/usr/include/x86_64-linux-gnu/freetype2;/usr/include/hdf5/openmpi;/usr/include/python2.7;/usr/include/tcl;/usr/include/libxml2
-- Found ZLIB: /usr/include
-- Found Freenect: /opt/ros/kinetic/include/libfreenect
-- Found freenect2: /usr/local/include
-- Found OpenNI2: /usr/include/openni2
-- Found DC1394: /usr/include/dc1394
-- Found g2o: /opt/ros/kinetic/include;/usr/include/suitesparse;/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
build with AVX support... detected from cpuid
-- Found ZED sdk: /usr/local/zed/include
-- Found CUDA: /usr/local/cuda/include
-- Found RealSense: /opt/ros/kinetic/include
-- Found octomap: /opt/ros/kinetic/include
-- Found Pthreads
-- --------------------------------------------
-- Info :
-- Version : 0.11.11
-- CMAKE_INSTALL_PREFIX = /home/mathieu/catkin_ws/devel
-- 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++11
-- With OpenCV 3 xfeatures2d module (SIFT/SURF/BRIEF/FREAK) = 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 = YES (With CUDA)
-- With RealSense = YES (License: Apache-2)
-- With OCTOMAP = YES (License: BSD)
-- With Qt5 = YES (License: Open Source or Commercial)
-- --------------------------------------------
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mathieu/workspace/rtabmap/build
Not sure what was the problem, I will close it for now.
I've been fighting with this for several hours now and have finally narrowed it down to Eigen v3.3+. The problem seems to be related specifically to AVX support, added in that version. I compiled with Eigen 3.3.2 and experienced the problem, and by recompiling PCL and RTAB-Map with Eigen 3.2.10 I was able to get past the problem. You can read more about it in this Eigen bug ticket:
http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1146
Another reference in the PCL forum: http://www.pcl-users.org/Segmentation-Fault-on-Keypoint-Extraction-td4042316.html
Also referencing #129 here so that guy might get a notification about this.
One more thing. The Eigen ticket was produced using GCC, but I am using Clang on MacOSX.
Thx for the hint about Eigen. I had to reinstall on a new machine and I got the same error. I've found that it was because of GTSAM that the problem was fixed the last time. GTSAM installs Eigen in its installation directory. When rtabmap adds include directories and if it is built with GTSAM, the Eigen folder of GTSAM is used before the one installed on the machine (which would be a different Eigen version).
Here is the include order:
Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/Rtabmap.cpp.o cd /home/mathieu/workspace/rtabmap/build/corelib/src && /usr/bin/c++ -DDISABLE_OPENNI2 -DDISABLE_PCAP -DDISABLE_PNG -DEIGEN_USE_NEW_STDVECTOR -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET -DFLANN_STATIC -DGTSAM_IMPORT_STATIC -DPCL_OMP -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -Dqh_QHpointer -Drtabmap_core_EXPORTS -DvtkFiltersFlowPaths_AUTOINIT="1(vtkFiltersParallelFlowPaths)" -DvtkIOExodus_AUTOINIT="1(vtkIOParallelExodus)" -DvtkIOGeometry_AUTOINIT="1(vtkIOMPIParallel)" -DvtkIOImage_AUTOINIT="1(vtkIOMPIImage)" -DvtkIOSQL_AUTOINIT="2(vtkIOMySQL,vtkIOPostgreSQL)" -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" -DvtkRenderingCore_AUTOINIT="4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL)" -DvtkRenderingFreeType_AUTOINIT="2(vtkRenderingFreeTypeFontConfig,vtkRenderingMatplotlib)" -DvtkRenderingLIC_AUTOINIT="1(vtkRenderingParallelLIC)" -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" -I/usr/include/vtk-6.2 -I/usr/include/jsoncpp -I/usr/include/freetype2 -I/usr/include/x86_64-linux-gnu/freetype2 -I/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent -I/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include -I/usr/lib/openmpi/include -I/usr/lib/openmpi/include/openmpi -I/usr/include/hdf5/openmpi -I/usr/include/x86_64-linux-gnu -I/usr/include/libxml2 -I/usr/include/python2.7 -I/usr/include/tcl -I/usr/local/lib/cmake/GTSAM/../../../include -I/usr/local/include/gtsam/3rdparty/Eigen -I/home/mathieu/workspace/rtabmap/utilite/include -I/home/mathieu/workspace/rtabmap/corelib/src/../include -I/home/mathieu/workspace/rtabmap/corelib/src -I/home/mathieu/workspace/rtabmap/build/corelib/src -isystem /opt/ros/kinetic/include/opencv-3.1.0-dev/opencv -isystem /opt/ros/kinetic/include/opencv-3.1.0-dev -I/usr/include/pcl-1.7 -I/usr/include/eigen3 -I/usr/include/ni -I/opt/ros/kinetic/include/libfreenect -I/usr/local/include -I/opt/ros/kinetic/include -I/usr/include/suitesparse -I/usr/local/zed/include -I/usr/local/cuda/include -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -fmessage-length=0 -fopenmp -std=c++11 -O3 -DNDEBUG -fPIC -Wall -Wno-unknown-pragmas -mavx -fPIC -o CMakeFiles/rtabmap_core.dir/Rtabmap.cpp.o -c /home/mathieu/workspace/rtabmap/corelib/src/Rtabmap.cpp
Note the -I/usr/local/include/gtsam/3rdparty/Eigen.
gdb output (with rtabmap built in Debug, Ubuntu 16.04/Kinectic, ZED 1.1.1 with libraries linked to Kinetic OpenCV3.1 libraries):
CMake config: