ORB_SLAM2 make error

Created on 3 Jun 2018  Â·  3Comments  Â·  Source: raulmur/ORB_SLAM2

Hello, everyone!
when I run "./build.sh", I met some errors, I paste the compile error below, is anyone know the reason and how to solve it? Thank you in advance.

parallels@ubuntu:~/Downloads/ORB_SLAM2$ ./build.sh
Configuring and building Thirdparty/DBoW2 ...
mkdir: cannot create directory ‘build’: File exists
-- Configuring done
-- Generating done
-- Build files have been written to: /home/parallels/Downloads/ORB_SLAM2/Thirdparty/DBoW2/build
[100%] Built target DBoW2
Configuring and building Thirdparty/g2o ...
mkdir: cannot create directory ‘build’: File exists
-- BUILD TYPE:Release
-- Compiling on Unix
-- Configuring done
-- Generating done
-- Build files have been written to: /home/parallels/Downloads/ORB_SLAM2/Thirdparty/g2o/build
[100%] Built target g2o
Uncompress vocabulary ...
Configuring and building ORB_SLAM2 ...
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Build type: Release
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Using flag -std=c++11.
-- Found Eigen3: /usr/include/eigen3 (Required is at least version "3.1.0")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/parallels/Downloads/ORB_SLAM2/build
Scanning dependencies of target ORB_SLAM2
[ 3%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Tracking.cc.o
[ 6%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/System.cc.o
[ 9%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/LocalMapping.cc.o
[ 12%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Viewer.cc.o
[ 15%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/LoopClosing.cc.o
[ 18%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Optimizer.cc.o
[ 34%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Map.cc.o
[ 21%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/MapDrawer.cc.o
[ 25%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/FrameDrawer.cc.o
[ 28%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/ORBmatcher.cc.o
[ 31%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Converter.cc.o
[ 37%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/MapPoint.cc.o
[ 46%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Frame.cc.o
[ 40%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/ORBextractor.cc.o
[ 43%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/KeyFrameDatabase.cc.o
[ 50%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Initializer.cc.o
[ 53%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/KeyFrame.cc.o
[ 56%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/PnPsolver.cc.o
[ 59%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Sim3Solver.cc.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
CMakeFiles/ORB_SLAM2.dir/build.make:230: recipe for target 'CMakeFiles/ORB_SLAM2.dir/src/Converter.cc.o' failed
make[2]: * [CMakeFiles/ORB_SLAM2.dir/src/Converter.cc.o] Error 4
make[2]:
Waiting for unfinished jobs....
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
CMakeFiles/ORB_SLAM2.dir/build.make:446: recipe for target 'CMakeFiles/ORB_SLAM2.dir/src/Sim3Solver.cc.o' failed
make[2]:
[CMakeFiles/ORB_SLAM2.dir/src/Sim3Solver.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
CMakeFiles/ORB_SLAM2.dir/build.make:326: recipe for target 'CMakeFiles/ORB_SLAM2.dir/src/MapDrawer.cc.o' failed
make[2]:
[CMakeFiles/ORB_SLAM2.dir/src/MapDrawer.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
CMakeFiles/ORB_SLAM2.dir/build.make:494: recipe for target 'CMakeFiles/ORB_SLAM2.dir/src/Viewer.cc.o' failed
make[2]:
[CMakeFiles/ORB_SLAM2.dir/src/Viewer.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
CMakeFiles/ORB_SLAM2.dir/build.make:278: recipe for target 'CMakeFiles/ORB_SLAM2.dir/src/KeyFrame.cc.o' failed
make[2]:
[CMakeFiles/ORB_SLAM2.dir/src/KeyFrame.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
CMakeFiles/ORB_SLAM2.dir/build.make:302: recipe for target 'CMakeFiles/ORB_SLAM2.dir/src/Map.cc.o' failed
make[2]:
[CMakeFiles/ORB_SLAM2.dir/src/Map.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
CMakeFiles/ORB_SLAM2.dir/build.make:398: recipe for target 'CMakeFiles/ORB_SLAM2.dir/src/Frame.cc.o' failed
make[2]:
[CMakeFiles/ORB_SLAM2.dir/src/Frame.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
CMakeFiles/ORB_SLAM2.dir/build.make:422: recipe for target 'CMakeFiles/ORB_SLAM2.dir/src/KeyFrameDatabase.cc.o' failed
make[2]:
[CMakeFiles/ORB_SLAM2.dir/src/KeyFrameDatabase.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
CMakeFiles/ORB_SLAM2.dir/build.make:350: recipe for target 'CMakeFiles/ORB_SLAM2.dir/src/Optimizer.cc.o' failed
make[2]:
[CMakeFiles/ORB_SLAM2.dir/src/Optimizer.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
CMakeFiles/ORB_SLAM2.dir/build.make:374: recipe for target 'CMakeFiles/ORB_SLAM2.dir/src/PnPsolver.cc.o' failed
make[2]:
[CMakeFiles/ORB_SLAM2.dir/src/PnPsolver.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
CMakeFiles/ORB_SLAM2.dir/build.make:86: recipe for target 'CMakeFiles/ORB_SLAM2.dir/src/Tracking.cc.o' failed
make[2]:
[CMakeFiles/ORB_SLAM2.dir/src/Tracking.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
CMakeFiles/ORB_SLAM2.dir/build.make:470: recipe for target 'CMakeFiles/ORB_SLAM2.dir/src/Initializer.cc.o' failed
make[2]:
[CMakeFiles/ORB_SLAM2.dir/src/Initializer.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
CMakeFiles/ORB_SLAM2.dir/build.make:206: recipe for target 'CMakeFiles/ORB_SLAM2.dir/src/FrameDrawer.cc.o' failed
make[2]:
[CMakeFiles/ORB_SLAM2.dir/src/FrameDrawer.cc.o] Error 4
CMakeFiles/Makefile2:178: recipe for target 'CMakeFiles/ORB_SLAM2.dir/all' failed
make[1]:
[CMakeFiles/ORB_SLAM2.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *
[all] Error 2

Most helpful comment

The reason is virtual memory exhausted. When I set the last line of build.sh to
make -j1
it solved

The issue can be closed

All 3 comments

The reason is virtual memory exhausted. When I set the last line of build.sh to
make -j1
it solved

The issue can be closed

I have a similar problem, but using make -j1 did not solve it, in fact didnt have any effect at all
here is the error it shows with and without modification.

xt18t004@godavari:~/ORB_SLAM2$ ./build.sh
Configuring and building Thirdparty/DBoW2 ...
mkdir: cannot create directory ‘build’: File exists
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake: 148 (message):
Could NOT find CUDA: Found unsuitable version "10.0", but required is exact
version "9.0" (found /usr/local/cuda)
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:386 (_FPHSA_F AILURE_MESSAGE)
/usr/share/cmake-3.5/Modules/FindCUDA.cmake:949 (find_package_handle_standard_ args)
/usr/local/share/OpenCV/OpenCVConfig.cmake:86 (find_package)
/usr/local/share/OpenCV/OpenCVConfig.cmake:105 (find_host_package)
CMakeLists.txt:27 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/xt18t004/ORB_SLAM2/Thirdparty/DBoW2/build/CMakeFiles/CMakeOutput .log".
See also "/home/xt18t004/ORB_SLAM2/Thirdparty/DBoW2/build/CMakeFiles/CMakeError. log".
make: * No targets specified and no makefile found. Stop.
Configuring and building Thirdparty/g2o ...
mkdir: cannot create directory ‘build’: File exists
-- BUILD TYPE:Release
-- Compiling on Unix
-- Configuring done
-- Generating done
-- Build files have been written to: /home/xt18t004/ORB_SLAM2/Thirdparty/g2o/bui ld
[100%] Built target g2o
Uncompress vocabulary ...
Configuring and building ORB_SLAM2 ...
-- The C compiler identification is GNU 5.5.0
-- The CXX compiler identification is GNU 5.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Build type: Release
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Using flag -std=c++11.
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda-9.0 (found suitable exact version "9.0")
-- Found Eigen3: /usr/include/eigen3 (Required is at least version "3.1.0")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/xt18t004/ORB_SLAM2/build
Scanning dependencies of target ORB_SLAM2
make[2]:
No rule to make target '/home/xt18t004/Pangolin/build/src/libpangol in.so', needed by '../lib/libORB_SLAM2.so'. Stop.
make[2]:
Waiting for unfinished jobs....
[ 3%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/MapPoint.cc.o
[ 6%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Tracking.cc.o
[ 9%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/System.cc.o
[ 12%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/LocalMapping.cc.o
[ 15%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/ORBextractor.cc.o
[ 18%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/FrameDrawer.cc.o
[ 21%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Converter.cc.o
[ 25%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/ORBmatcher.cc.o
[ 31%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Map.cc.o
[ 31%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/LoopClosing.cc.o
[ 34%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/KeyFrame.cc.o
[ 37%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/PnPsolver.cc.o
[ 40%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Frame.cc.o
[ 43%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Initializer.cc.o
[ 46%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Sim3Solver.cc.o
[ 50%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/MapDrawer.cc.o
[ 53%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Optimizer.cc.o
[ 56%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/KeyFrameDatabase.cc.o
[ 59%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Viewer.cc.o
CMakeFiles/Makefile2:252: recipe for target 'CMakeFiles/ORB_SLAM2.dir/all' faile d
make[1]:
[CMakeFiles/ORB_SLAM2.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *
* [all] Error 2
xt18t004@godavari:~/ORB_SLAM2$

+1 Having the same issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sunstarchan picture sunstarchan  Â·  4Comments

AbnerCSZ picture AbnerCSZ  Â·  4Comments

Andreluizfc picture Andreluizfc  Â·  4Comments

angussmitchell picture angussmitchell  Â·  5Comments

imrasp picture imrasp  Â·  6Comments