ORB_SLAM3 icon indicating copy to clipboard operation
ORB_SLAM3 copied to clipboard

Report an error and solving method

Open Hao-Starrr opened this issue 3 years ago • 10 comments

This error may occur on Ubuntu 20.04 and 18.04.

When running ./build.sh, I got

make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:76: CMakeFiles/ORB_SLAM3.dir/src/Tracking.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:711: CMakeFiles/ORB_SLAM3.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

The problem can be solved by add add_compile_options(-std=c++14) before CMakeLists.txt file. Then it build successfully.

Same solving method for the error:

make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:375:CMakeFiles/ORB_SLAM3.dir/src/MLPnPsolver.cpp.o] Error 1
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:76:CMakeFiles/ORB_SLAM3.dir/src/Tracking.cc.o] Error 1
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:245:CMakeFiles/ORB_SLAM3.dir/src/Frame.cc.o] Error 1
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:102:CMakeFiles/ORB_SLAM3.dir/src/LoopClosing.cc.o] Error 1
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:323:CMakeFiles/ORB_SLAM3.dir/src/G2oTypes.cc.o] Error 1
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:232:CMakeFiles/ORB_SLAM3.dir/src/Optimizer.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:390:CMakeFiles/ORB_SLAM3.dir/all] Error 2
make: *** [Makefile:84:all] Error 2

Hao-Starrr avatar May 06 '22 05:05 Hao-Starrr

Worked for me. Solved other issue during /build.sh of g2o and Sophus. Thank you.

dframirez-usmc avatar May 16 '22 02:05 dframirez-usmc

Where exactly should i paste add_compile_options(-std=c++14) in order to make it work?

anastaga avatar Jun 10 '22 20:06 anastaga

Where exactly should i paste add_compile_options(-std=c++14) in order to make it work?

At the first line of CMakeLists.txt file.

Hao-Starrr avatar Jun 11 '22 12:06 Hao-Starrr

Worked for me too, Thanks :)

CruxDevStuff avatar Jul 05 '22 14:07 CruxDevStuff

Worked for me, thanks.

MadanGTiwary avatar May 26 '23 10:05 MadanGTiwary

Anyone getting this error?

make[1]: *** [CMakeFiles/Makefile2:148: CMakeFiles/ORB_SLAM3.dir/all] Error 2 make: *** [Makefile:91: all] Error 2

kenhuang1964 avatar Nov 15 '23 05:11 kenhuang1964

Anyone getting this error?

make[1]: *** [CMakeFiles/Makefile2:148: CMakeFiles/ORB_SLAM3.dir/all] Error 2 make: *** [Makefile:91: all] Error 2

I have found the same problem with my computer, have you solved this?

jeremy7703 avatar Dec 05 '23 20:12 jeremy7703

Anyone getting this error? make[1]: *** [CMakeFiles/Makefile2:148: CMakeFiles/ORB_SLAM3.dir/all] Error 2 make: *** [Makefile:91: all] Error 2

I have found the same problem with my computer, have you solved this?

Yes, I changed some settings to C++ 14 I think. It's been a while. I forgot lol

kenhuang1964 avatar Dec 05 '23 20:12 kenhuang1964