luigifreda/plvs

build on CPU fails

nassim12 opened this issue · 1 comments

Thank you for the nice work and sharing the code. I am trying to test the SLAM on Ubuntu 18.04, ROS Melodic, opencv 4.4 without CUDA support.

here is the log:
CUDA env var reset, check your CUDA installation
config.sh: line 107: [: -eq: unary operator expected
ZED env var reset, check your ZED installation

Building PLVS

CPP_STANDARD_VERSION: 17
external option: -DCPP_STANDARD_VERSION=17
Configuring and building PLVS ...
Build type: Release
-- eigen include: /usr/include/eigen3
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- thread
-- system
-- serialization
-- chrono
-- date_time
-- atomic
-- Number of avx2 occurrences in /proc/cpuinfo: 8
-- Number of sse3 occurrences in /proc/cpuinfo: 8
-- Number of sse4 occurrences in /proc/cpuinfo: 16
-- building fastfusion ***************
-- Desired OpenCV version: 4
-- found OpenCV version: 4.8.0
-- opencv include: /usr/local/include/opencv4
-- opencv lib dirs: /usr/local
-- opencv libs: opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_stitching;opencv_video;opencv_videoio
-- set custom pangolin folder: /home/nas/PLVS/plvs/Thirdparty/Pangolin/build/
-- pangolin include:
-- pangolin libs: pango_core;pango_display;pango_geometry;pango_glgeometry;pango_image;pango_opengl;pango_packetstream;pango_plot;pango_python;pango_scene;pango_tools;pango_vars;pango_video;pango_windowing;tinyobj
CMake Warning at CMakeLists.txt:200 (find_package):
By not providing "Findrealsense2.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"realsense2", but CMake did not find one.

Could not find a package configuration file provided by "realsense2" with
any of the following names:

realsense2Config.cmake
realsense2-config.cmake

Add the installation prefix of "realsense2" to CMAKE_PREFIX_PATH or set
"realsense2_DIR" to a directory containing one of the above files. If
"realsense2" provides a separate development package or SDK, be sure it has
been installed.

-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- system
-- filesystem
-- thread
-- date_time
-- iostreams
-- serialization
-- chrono
-- atomic
-- regex
-- Could NOT find ensenso (missing: ENSENSO_LIBRARY ENSENSO_INCLUDE_DIR)
** WARNING ** io features related to ensenso will be disabled
-- Could NOT find DAVIDSDK (missing: DAVIDSDK_LIBRARY DAVIDSDK_INCLUDE_DIR)
** WARNING ** io features related to davidSDK will be disabled
-- Could NOT find DSSDK (missing: _DSSDK_LIBRARIES)
** WARNING ** io features related to dssdk will be disabled
** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
-- 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.3/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.3/VTKTargets.cmake"
    but not all the files it references.

** WARNING ** io features related to libusb-1.0 will be disabled
-- Could NOT find ensenso (missing: ENSENSO_LIBRARY ENSENSO_INCLUDE_DIR)
** WARNING ** visualization features related to ensenso will be disabled
-- Could NOT find DAVIDSDK (missing: DAVIDSDK_LIBRARY DAVIDSDK_INCLUDE_DIR)
** WARNING ** visualization features related to davidSDK will be disabled
-- Could NOT find DSSDK (missing: _DSSDK_LIBRARIES)
** WARNING ** visualization features related to dssdk will be disabled
-- Could NOT find RSSDK (missing: _RSSDK_LIBRARIES)
** WARNING ** visualization features related to rssdk will be disabled
-- looking for PCL_COMMON
-- looking for PCL_OCTREE
-- looking for PCL_IO
-- looking for PCL_KDTREE
-- looking for PCL_SEARCH
-- looking for PCL_SAMPLE_CONSENSUS
-- looking for PCL_FILTERS
-- looking for PCL_2D
-- looking for PCL_GEOMETRY
-- looking for PCL_FEATURES
-- looking for PCL_ML
-- looking for PCL_SEGMENTATION
-- looking for PCL_VISUALIZATION
-- looking for PCL_SURFACE
-- looking for PCL_REGISTRATION
-- looking for PCL_KEYPOINTS
-- looking for PCL_TRACKING
-- looking for PCL_RECOGNITION
-- looking for PCL_STEREO
-- looking for PCL_APPS
-- looking for PCL_IN_HAND_SCANNER
-- looking for PCL_MODELER
-- looking for PCL_POINT_CLOUD_EDITOR
-- looking for PCL_OUTOFCORE
-- looking for PCL_PEOPLE
-- pcl include: /usr/include/pcl-1.8;/usr/include/eigen3;/usr/include;/usr/include/ni;/usr/include/openni2;/usr/include/vtk-6.3;/usr/include/freetype2;/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi;/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent;/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent/include;/usr/lib/x86_64-linux-gnu/openmpi/include;/usr/include/python2.7;/usr/include/x86_64-linux-gnu;/usr/include/hdf5/openmpi;/usr/include/libxml2;/usr/include/jsoncpp;/usr/include/tcl
-- pcl libs: /usr/lib/x86_64-linux-gnu
-- pcl definitions: ;-DDISABLE_ENSENSO;-DDISABLE_DAVIDSDK;-DDISABLE_DSSDK;-DDISABLE_PCAP;-DDISABLE_PNG;-DDISABLE_LIBUSB_1_0;-DFLANN_STATIC;-DDISABLE_RSSDK;-Dqh_QHpointer
-- octomap include: /opt/ros/melodic/include
-- octomap lib dirs: /opt/ros/melodic/lib
-- octomap libs: /opt/ros/melodic/lib/liboctomap.so;/opt/ros/melodic/lib/liboctomath.so
-- protobuf libs: /usr/lib/x86_64-linux-gnu/libprotobuf.so
-- LibCrypto Include Dir: /usr/include
-- LibCrypto Shared Lib: /usr/lib/x86_64-linux-gnu/libcrypto.so
-- LibCrypto Static Lib: /usr/lib/x86_64-linux-gnu/libcrypto.a
CUDA_TOOLKIT_ROOT_DIR not found or specified
-- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY)
-- building with libelas CPU ***************
-- ****************** NO CUDA WAS FOUND ******************
CMake Error at /usr/share/cmake-3.10/Modules/FindCUDA.cmake:682 (message):
Specify CUDA_TOOLKIT_ROOT_DIR
Call Stack (most recent call first):
CMakeLists.txt:287 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/nas/PLVS/plvs/build/CMakeFiles/CMakeOutput.log".

here is the part of cmakelists that I suspect on

if(WITH_LIBSGM)
if(NOT CUDA_FOUND)
message(STATUS "****************** NO CUDA WAS FOUND ******************")
find_package(CUDA REQUIRED) # make the check if not already done above
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_LIBSGM")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_LIBSGM")
if(CUDA_FOUND)
message(STATUS "building with stereo libsgm CUDA ***************")
endif()
set(LIBSGM_INCLUDES
${PROJECT_SOURCE_DIR}/Thirdparty/libsgm/include
)
set(LIBSGM_LIBRARIES
${PROJECT_SOURCE_DIR}/Thirdparty/libsgm/lib/libsgm.a # this contains CUDA
)
else()
message(STATUS "stereo libsgm disabled! ***************")
endif()

Hi,
thanks for your feedback. I've updated the README and procedures. The install and build procedures were tested under Ubuntu 20. If you don't have it, check rosdocker and use the noetic container.

In any case, there is something weird in your config.sh file, given the error at line 107. Did you modify it? Could you please share what you modified?

Another potential issue I see, the realsense package is missing in your configuration. Please, take a look at the new install_dependencies.sh script.

Hope this helps.