大体报错如下:
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- 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
-- 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
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")
CMake Error at CMakeLists.txt:35 (find_package):
By not providing "FindPangolin.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Pangolin",
but CMake did not find one.
Could not find a package configuration file provided by "Pangolin" with any
of the following names:
PangolinConfig.cmake
pangolin-config.cmake
Add the installation prefix of "Pangolin" to CMAKE_PREFIX_PATH or set
"Pangolin_DIR" to a directory containing one of the above files. If
"Pangolin" provides a separate development package or SDK, be sure it has
been installed.
-- Configuring incomplete, errors occurred!
解决方案
I was trying to build ORB_SLAM2, and was running into the exact same error code as everyone here, but none of the issues listed seemed to be a good fit for me. I realized that I never built Pangolin in the first place, I only partially completed the instructions for the install.
I ran these commands:
git clone https://github.com/stevenlovegrove/Pangolin.git
cd Pangolin
mkdir build
cd build
cmake …
cmake --build .
Then when I tried to build ORB_SLAM2 once more with:
cd ORB_SLAM2
chmod +x build.sh
./build.sh
There was no error message. Definitely a stupid mistake, but I aint the first, hope this helps!
git clone https://github.com/stevenlovegrove/Pangolin.git
cd Pangolin
mkdir build
cd build
cmake ..
cmake --build .
Then when I tried to build ORB_SLAM2 once more with:
cd ORB_SLAM2
chmod +x build.sh
./build.sh