ORB_SLAM2中的小BUG

c++: internal compiler error: 已杀死 (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
CMakeFiles/stereo_euroc.dir/build.make:62: recipe for target 'CMakeFiles/stereo_euroc.dir/Examples/Stereo/stereo_euroc.cc.o' failed
make[2]: *** [CMakeFiles/stereo_euroc.dir/Examples/Stereo/stereo_euroc.cc.o] Error 4
CMakeFiles/Makefile2:289: recipe for target 'CMakeFiles/stereo_euroc.dir/all' failed
make[1]: *** [CMakeFiles/stereo_euroc.dir/all] Error 2
make[1]: *** 正在等待未完成的任务....
c++: internal compiler error: 已杀死 (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
CMakeFiles/rgbd_tum.dir/build.make:62: recipe for target 'CMakeFiles/rgbd_tum.dir/Examples/RGB-D/rgbd_tum.cc.o' failed
make[2]: *** [CMakeFiles/rgbd_tum.dir/Examples/RGB-D/rgbd_tum.cc.o] Error 4
CMakeFiles/Makefile2:215: recipe for target 'CMakeFiles/rgbd_tum.dir/all' failed
make[1]: *** [CMakeFiles/rgbd_tum.dir/all] Error 2
 

开始以为是路径或者依赖库的问题,原来是opencv的版本问题。在ORB_SLAM2文件下的CMakeLists.txt文件中

find_package(OpenCV 3 QUIET)
if(NOT OpenCV_FOUND)
   find_package(OpenCV 2.4.3 QUIET)
   if(NOT OpenCV_FOUND)
      message(FATAL_ERROR "OpenCV > 2.4.3 not found.")
   endif()
endif()

原来是这样写的,但是因为我的opencv版本是3.2.0,所以它opencv3这个版本找不到。把第一个find_package(OpenCV 3 QUIET)改成find_package(OpenCV 3.2.0 QUIET)就可以了

最后收集了几个BUG的博客,感谢他们的改错成果。

https://blog.csdn.net/Operaboss/article/details/81632234

http://www.mamicode.com/info-detail-1773781.html

https://blog.csdn.net/zhang_danf/article/details/52931455

你可能感兴趣的:(ORB_SLAM2中的小BUG)