macOS build issue
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-10to each cmake call to use gcc/g++ instead of default clang
- Added
- Each CMakeLists.txt file
- Was failing to detect boost library
- Added
FIND_PACKAGE(Boost)and appended${Boost_INCLUDE_DIR}toinclude_directories
- build.sh
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
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):

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".
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-10to each cmake call to use gcc/g++ instead of default clangEach CMakeLists.txt file
- Was failing to detect boost library
- Added
FIND_PACKAGE(Boost)and appended${Boost_INCLUDE_DIR}toinclude_directoriesThe 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 2Any 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!
ORBSLAM3_someroot
no use
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?