surfii3z / openvslam

OpenVSLAM: A Versatile Visual SLAM Framework
https://openvslam.readthedocs.io/
Other
24 stars 6 forks source link

error in building openvslam #3

Open mgrallos opened 1 year ago

mgrallos commented 1 year ago

Hi sorry it's me again.

I git cloned your repository then run the build.sh but it resulted to this error. Can you tell me what causes this error?

command: ./build.sh

output to the console:

`Building openVSLAM -- Build type: Release -- ccache: Disabled -- Address/Memory sanitizer: DISABLED -- Architecture-aware optimization (-march=native): ENABLED -- Use OpenCV 4.5.5 CMake Warning (dev) at /usr/share/cmake-3.16/Modules/FindOpenGL.cmake:275 (message): Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when available. Run "cmake --help-policy CMP0072" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

FindOpenGL found both a legacy GL library:

OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

and GLVND libraries for OpenGL and GLX:

OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for compatibility with CMake 3.10 and below the legacy GL library will be used. Call Stack (most recent call first): /usr/share/cmake-3.16/Modules/CMakeFindDependencyMacro.cmake:47 (find_package) /opt/ros/noetic/lib/cmake/g2o/g2oConfig.cmake:4 (find_dependency) src/openvslam/CMakeLists.txt:10 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

-- Failed to find CXSparse - Could not find CXSparse include directory, set CXSPARSE_INCLUDE_DIR to directory containing cs.h -- Found AMD library: /usr/lib/x86_64-linux-gnu/libamd.so -- Found AMD header in: /usr/include/suitesparse -- Found CAMD library: /usr/lib/x86_64-linux-gnu/libcamd.so -- Found CAMD header in: /usr/include/suitesparse -- Found COLAMD library: /usr/lib/x86_64-linux-gnu/libcolamd.so -- Found COLAMD header in: /usr/include/suitesparse -- Found CCOLAMD library: /usr/lib/x86_64-linux-gnu/libccolamd.so -- Found CCOLAMD header in: /usr/include/suitesparse -- Found SuiteSparse_config library: /usr/lib/x86_64-linux-gnu/libsuitesparseconfig.so -- Found SuiteSparse_config header in: /usr/include/suitesparse -- Adding librt: /usr/lib/x86_64-linux-gnu/librt.so to SuiteSparse_config libraries (required on Linux & Unix [not OSX] if SuiteSparse is compiled with timing). -- Found METIS library: /usr/lib/x86_64-linux-gnu/libmetis.so. -- OpenMP: DISABLED -- SSE3 for ORB extraction (-msse3): DISABLED -- SSE for floating-point operation (-mfpmath=sse): DISABLED -- BoW framework: DBoW2 (found in /home/mariah/tello_ws1/devel/include/DBoW2;/home/mariah/tello_ws1/devel/include/DBoW2/../) -- No preference for use of exported glog CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported glog CMake configuration if available. -- Failed to find installed glog CMake configuration, searching for glog build directories exported with CMake. -- Failed to find an installed/exported CMake configuration for glog, will perform search for installed glog components. -- Stack trace logger: ENABLED -- Google Perftools: DISABLED -- Viewer for examples: PangolinViewer -- Downloading/updating googletest -- Configuring done -- Generating done -- Build files have been written to: /home/mariah/tello_ws1/src/openvslam/build/googletest-download Scanning dependencies of target googletest-download [100%] Built target googletest-download -- Configuring done CMake Error in src/openvslam/CMakeLists.txt: Target "openvslam" INTERFACE_INCLUDE_DIRECTORIES property contains path:

"/home/mariah/tello_ws1/src/openvslam/src/openvslam/"

which is prefixed in the source directory.

CMake Error in src/openvslam/CMakeLists.txt: Target "openvslam" INTERFACE_INCLUDE_DIRECTORIES property contains path:

"/home/mariah/tello_ws1/src/openvslam/src/openvslam//home/mariah/tello_ws1/devel/include/DBoW2"

which is prefixed in the source directory.

-- Generating done CMake Generate step failed. Build files cannot be regenerated correctly. [ 2%] Built target gtest [ 5%] Built target test_helper [ 7%] Built target gtest_main [ 7%] Built target gmock [ 8%] Built target gmock_main [ 9%] Building CXX object src/openvslam/CMakeFiles/openvslam.dir/system.cc.o [ 10%] Building CXX object src/openvslam/CMakeFiles/openvslam.dir/data/bow_database.cc.o [ 11%] Building CXX object src/openvslam/CMakeFiles/openvslam.dir/data/graph_node.cc.o [ 11%] Building CXX object src/openvslam/CMakeFiles/openvslam.dir/data/camera_database.cc.o [ 12%] Building CXX object src/openvslam/CMakeFiles/openvslam.dir/data/map_database.cc.o [ 12%] Building CXX object src/openvslam/CMakeFiles/openvslam.dir/data/frame_statistics.cc.o [ 13%] Building CXX object src/openvslam/CMakeFiles/openvslam.dir/feature/orb_params.cc.o [ 15%] Building CXX object src/openvslam/CMakeFiles/openvslam.dir/feature/orb_extractor.cc.o [ 15%] Building CXX object src/openvslam/CMakeFiles/openvslam.dir/feature/orb_extractor_node.cc.o [ 15%] Building CXX object src/openvslam/CMakeFiles/openvslam.dir/initialize/base.cc.o [ 16%] Building CXX object src/openvslam/CMakeFiles/openvslam.dir/initialize/perspective.cc.o [ 17%] Building CXX object src/openvslam/CMakeFiles/openvslam.dir/initialize/bearing_vector.cc.o [ 18%] Building CXX object src/openvslam/CMakeFiles/openvslam.dir/io/trajectory_io.cc.o /home/mariah/tello_ws1/src/openvslam/src/openvslam/system.cc: In constructor ‘openvslam::system::system(const std::shared_ptr&, const string&)’: /home/mariah/tello_ws1/src/openvslam/src/openvslam/system.cc:48:21: error: ‘openvslam::data::bow_vocabulary’ {aka ‘class DBoW2::TemplatedVocabulary<cv::Mat, DBoW2::FORB>’} has no member named ‘loadFromBinaryFile’ 48 | bowvocab->loadFromBinaryFile(vocab_file_path); | ^~~~~~ [ 18%] Building CXX object src/openvslam/CMakeFiles/openvslam.dir/io/map_database_io.cc.o [ 19%] Building CXX object src/openvslam/CMakeFiles/openvslam.dir/match/area.cc.o [ 20%] Building CXX object src/openvslam/CMakeFiles/openvslam.dir/match/bow_tree.cc.o make[2]: [src/openvslam/CMakeFiles/openvslam.dir/build.make:76: src/openvslam/CMakeFiles/openvslam.dir/system.cc.o] Error 1 make[2]: Waiting for unfinished jobs.... make[1]: [CMakeFiles/Makefile2:585: src/openvslam/CMakeFiles/openvslam.dir/all] Error 2 make: [Makefile:141: all] Error 2 `

mgrallos commented 1 year ago

To add it does have a problem with DBoW2 earlier and I just git cloned DBoW2 repo on my src directory and build it. It did build but now this is the error.