ORB_SLAM3 icon indicating copy to clipboard operation
ORB_SLAM3 copied to clipboard

macOS build issue

Open wcandres opened this issue 4 years ago • 4 comments

Hello!

Relevant info:

  • macOS Big Sur 11.3.1 (20E241)
  • Made a couple of file changes for building
    • build.sh
      • Added -DCMAKE_CXX_COMPILER=/usr/local/bin/g++-10 -DCMAKE_C_COMPILER=/usr/local/bin/gcc-10 to each cmake call to use gcc/g++ instead of default clang
    • Each CMakeLists.txt file
      • Was failing to detect boost library
      • Added FIND_PACKAGE(Boost) and appended ${Boost_INCLUDE_DIR} to include_directories

The most relevant part of the error is as follows, but I can decipher no meaning from the error.

make[2]: *** No rule to make target `../Thirdparty/DBoW2/lib/libDBoW2.so', needed by `../lib/libORB_SLAM3.dylib'.  Stop.
make[1]: *** [CMakeFiles/ORB_SLAM3.dir/all] Error 2
make: *** [all] Error 2

Any help with this issue would be greatly appreciated.

Here is a full log from a fresh build: freshbuild.txt

And a shorter log from a build attempt after a fresh build: build.txt

wcandres avatar May 25 '21 22:05 wcandres

In this freshbuild.txt log file, there is this at the beginning:

MACOSX_RPATH is not specified for the following targets: DBoW2

I suppose you have to add the path to DBoW2 to your MACOSX_RPATH environment variable. I'm not familiar with macOS but in Windows, you have to append it here (far right): image

Or maybe you have to provide a path in build.sh which links to CMakeLists.txt. If this is the case, then you might need to add "add_subdirectory(Thirdparty/DBoW2)" or edit line "${PROJECT_SOURCE_DIR}/Thirdparty/DBoW2/lib/libDBoW2.so".

georgidimitrovx avatar May 31 '21 08:05 georgidimitrovx

Hello!

Relevant info:

  • macOS Big Sur 11.3.1 (20E241)

  • Made a couple of file changes for building

    • build.sh

      • Added -DCMAKE_CXX_COMPILER=/usr/local/bin/g++-10 -DCMAKE_C_COMPILER=/usr/local/bin/gcc-10 to each cmake call to use gcc/g++ instead of default clang
    • Each CMakeLists.txt file

      • Was failing to detect boost library
      • Added FIND_PACKAGE(Boost) and appended ${Boost_INCLUDE_DIR} to include_directories

The most relevant part of the error is as follows, but I can decipher no meaning from the error.

make[2]: *** No rule to make target `../Thirdparty/DBoW2/lib/libDBoW2.so', needed by `../lib/libORB_SLAM3.dylib'.  Stop.
make[1]: *** [CMakeFiles/ORB_SLAM3.dir/all] Error 2
make: *** [all] Error 2

Any help with this issue would be greatly appreciated.

Here is a full log from a fresh build: freshbuild.txt

And a shorter log from a build attempt after a fresh build: build.txt

1.Modify CMakeLists in DBoW2/g2o, make sure their dylibs are generated, e.g. ~/Codes/ORB_SLAM3/Thirdparty/DBoW2/lib/libDBoW2.dylib 2.Modify /ORBSLAM3_someroot/CMakeLists.txt ${PROJECT_SOURCE_DIR}/Thirdparty/DBoW2/lib/libDBoW2.so ${PROJECT_SOURCE_DIR}/Thirdparty/g2o/lib/libg2o.so to ${PROJECT_SOURCE_DIR}/Thirdparty/DBoW2/lib/libDBoW2.dylib ${PROJECT_SOURCE_DIR}/Thirdparty/g2o/lib/libg2o.dylib Good Luck!

BigJohnn avatar Jun 02 '21 11:06 BigJohnn

ORBSLAM3_someroot

no use

dandingol03 avatar Nov 23 '22 06:11 dandingol03

Not sure if anyone is still checking this. My dylib file for DBow2 is empty. I cannot seem to make a dylib. Has anyone made any headway here?

gabriel-bronfman avatar Oct 25 '23 21:10 gabriel-bronfman