raulmur / ORB_SLAM2

Real-Time SLAM for Monocular, Stereo and RGB-D Cameras, with Loop Detection and Relocalization Capabilities
Other
9.48k stars 4.7k forks source link

fatal error: opencv2/photo/photo_c.h: 没有那个文件或目录 #1106

Open Godturalmy opened 6 months ago

Godturalmy commented 6 months ago

当我运行./build.sh,报错:/usr/local/include/opencv/cv.h:65:10: fatal error: opencv2/photo/photo_c.h: 没有那个文件或目录 65 | #include "opencv2/photo/photo_c.h" | ^~~~~~~~~ compilation terminated.

Godturalmy commented 6 months ago

这是详细的报错信息 Configuring and building Thirdparty/DBoW2 ... mkdir: 无法创建目录 “build”: 文件已存在 CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

CMake Warning (dev) at /usr/local/share/OpenCV/OpenCVConfig.cmake:86 (find_package): Policy CMP0074 is not set: find_package uses _ROOT variables. Run "cmake --help-policy CMP0074" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

Environment variable CUDA_ROOT is set to:

/usr/local/cuda-11.4

For compatibility, CMake is ignoring the variable. Call Stack (most recent call first): /usr/local/share/OpenCV/OpenCVConfig.cmake:105 (find_host_package) CMakeLists.txt:27 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/OpenCV/OpenCVConfig.cmake:86 (find_package): Policy CMP0146 is not set: The FindCUDA module is removed. Run "cmake --help-policy CMP0146" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first): /usr/local/share/OpenCV/OpenCVConfig.cmake:105 (find_host_package) CMakeLists.txt:27 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:162 (message): The imported target "opencv_cudev" references the file

 "/usr/local/lib/libopencv_cudev.so.3.2.0"

but this file does not exist. Possible reasons include:

Call Stack (most recent call first): /usr/local/share/OpenCV/OpenCVConfig.cmake:164 (include) CMakeLists.txt:27 (find_package)

-- Configuring incomplete, errors occurred! make: *** 没有指明目标并且找不到 makefile。 停止。 Configuring and building Thirdparty/g2o ... mkdir: 无法创建目录 “build”: 文件已存在 CMake Deprecation Warning at CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED): Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- BUILD TYPE:Release -- Compiling on Unix -- Configuring done (0.0s) -- Generating done (0.0s) -- Build files have been written to: /home/hy/Desktop/orb_slam2/Thirdparty/g2o/build [100%] Built target g2o Uncompress vocabulary ... Configuring and building ORB_SLAM2 ... mkdir: 无法创建目录 “build”: 文件已存在 CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

Build type: Release -- Using flag -std=c++11. CMake Error at CMakeLists.txt:40 (find_package): Found package configuration file:

/home/hy/Desktop/pangolin-master/build/PangolinConfig.cmake

but it set Pangolin_FOUND to FALSE so package "Pangolin" is considered to be NOT FOUND. Reason given by package:

Pangolin could not be found because dependency Eigen3 could not be found.

-- Configuring incomplete, errors occurred! [ 9%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Tracking.cc.o [ 9%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/LocalMapping.cc.o [ 9%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/System.cc.o [ 15%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/ORBextractor.cc.o [ 15%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/LoopClosing.cc.o [ 18%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/ORBmatcher.cc.o [ 21%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/MapPoint.cc.o [ 25%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/FrameDrawer.cc.o [ 28%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/KeyFrame.cc.o [ 31%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/MapDrawer.cc.o [ 34%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Map.cc.o [ 40%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/PnPsolver.cc.o [ 40%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Optimizer.cc.o [ 43%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Frame.cc.o [ 46%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/KeyFrameDatabase.cc.o [ 50%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Sim3Solver.cc.o make[2]: 没有规则可制作目标“/home/hy/Desktop/orb_slam2/Thirdparty/DBoW2/lib/libDBoW2.so”,由“/home/hy/Desktop/orb_slam2/lib/libORB_SLAM2.so” 需求。 停止。 make[2]: 正在等待未完成的任务.... [ 53%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Initializer.cc.o [ 56%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Viewer.cc.o In file included from /home/hy/Desktop/orb_slam2/include/ORBextractor.h:26, from /home/hy/Desktop/orb_slam2/include/Frame.h:31, from /home/hy/Desktop/orb_slam2/include/MapPoint.h:25, from /home/hy/Desktop/orb_slam2/include/KeyFrame.h:24, from /home/hy/Desktop/orb_slam2/include/LocalMapping.h:24, from /home/hy/Desktop/orb_slam2/src/LocalMapping.cc:21: /usr/local/include/opencv/cv.h:65:10: fatal error: opencv2/photo/photo_c.h: 没有那个文件或目录 65 | #include "opencv2/photo/photo_c.h" | ^~~~~~~~~ compilation terminated. make[2]: [CMakeFiles/ORB_SLAM2.dir/build.make:104:CMakeFiles/ORB_SLAM2.dir/src/LocalMapping.cc.o] 错误 1 In file included from /home/hy/Desktop/orb_slam2/include/ORBextractor.h:26, from /home/hy/Desktop/orb_slam2/include/KeyFrame.h:28, from /home/hy/Desktop/orb_slam2/include/MapPoint.h:24, from /home/hy/Desktop/orb_slam2/include/ORBmatcher.h:29, from /home/hy/Desktop/orb_slam2/src/ORBmatcher.cc:21: /usr/local/include/opencv/cv.h:65:10: fatal error: opencv2/photo/photo_c.h: 没有那个文件或目录 65 | #include "opencv2/photo/photo_c.h" | ^~~~~~~~~ compilation terminated. In file included from /home/hy/Desktop/orb_slam2/include/ORBextractor.h:26, from /home/hy/Desktop/orb_slam2/include/KeyFrame.h:28, from /home/hy/Desktop/orb_slam2/include/MapPoint.h:24, from /home/hy/Desktop/orb_slam2/include/FrameDrawer.h:25, from /home/hy/Desktop/orb_slam2/include/Viewer.h:25, from /home/hy/Desktop/orb_slam2/include/Tracking.h:28, from /home/hy/Desktop/orb_slam2/include/System.h:29, from /home/hy/Desktop/orb_slam2/src/System.cc:23: /usr/local/include/opencv/cv.h:65:10: fatal error: opencv2/photo/photo_c.h: 没有那个文件或目录 65 | #include "opencv2/photo/photo_c.h" | ^~~~~~~~~ compilation terminated. make[2]: [CMakeFiles/ORB_SLAM2.dir/build.make:146:CMakeFiles/ORB_SLAM2.dir/src/ORBmatcher.cc.o] 错误 1 In file included from /home/hy/Desktop/orb_slam2/include/ORBextractor.h:26, from /home/hy/Desktop/orb_slam2/include/KeyFrame.h:28, from /home/hy/Desktop/orb_slam2/include/MapPoint.h:24, from /home/hy/Desktop/orb_slam2/src/MapPoint.cc:21: /usr/local/include/opencv/cv.h:65:10: fatal error: opencv2/photo/photo_c.h: 没有那个文件或目录 65 | #include "opencv2/photo/photo_c.h" | ^~~~~~~~~ compilation terminated. make[2]: [CMakeFiles/ORB_SLAM2.dir/build.make:76:CMakeFiles/ORB_SLAM2.dir/src/System.cc.o] 错误 1 In file included from /home/hy/Desktop/orb_slam2/include/ORBextractor.h:26, from /home/hy/Desktop/orb_slam2/include/KeyFrame.h:28, from /home/hy/Desktop/orb_slam2/include/MapPoint.h:24, from /home/hy/Desktop/orb_slam2/include/Map.h:24, from /home/hy/Desktop/orb_slam2/include/MapDrawer.h:24, from /home/hy/Desktop/orb_slam2/src/MapDrawer.cc:21: /usr/local/include/opencv/cv.h:65:10: fatal error: opencv2/photo/photo_c.h: 没有那个文件或目录 65 | #include "opencv2/photo/photo_c.h" | ^~~~~~~~~ make[2]: [CMakeFiles/ORB_SLAM2.dir/build.make:188:CMakeFiles/ORB_SLAM2.dir/src/MapPoint.cc.o] 错误 1 compilation terminated. In file included from /home/hy/Desktop/orb_slam2/include/ORBextractor.h:26, from /home/hy/Desktop/orb_slam2/include/KeyFrame.h:28, from /home/hy/Desktop/orb_slam2/include/MapPoint.h:24, from /home/hy/Desktop/orb_slam2/include/Map.h:24, from /home/hy/Desktop/orb_slam2/include/MapDrawer.h:24, from /home/hy/Desktop/orb_slam2/include/Viewer.h:26, from /home/hy/Desktop/orb_slam2/include/Tracking.h:28, from /home/hy/Desktop/orb_slam2/include/FrameDrawer.h:24, from /home/hy/Desktop/orb_slam2/src/FrameDrawer.cc:21: /usr/local/include/opencv/cv.h:65:10: fatal error: opencv2/photo/photo_c.h: 没有那个文件或目录 65 | #include "opencv2/photo/photo_c.h" | ^~~~~~~~~ make[2]: [CMakeFiles/ORB_SLAM2.dir/build.make:230:CMakeFiles/ORB_SLAM2.dir/src/MapDrawer.cc.o] 错误 1 compilation terminated. In file included from /home/hy/Desktop/orb_slam2/include/ORBextractor.h:26, from /home/hy/Desktop/orb_slam2/include/Frame.h:31, from /home/hy/Desktop/orb_slam2/include/MapPoint.h:25, from /home/hy/Desktop/orb_slam2/include/KeyFrame.h:24, from /home/hy/Desktop/orb_slam2/include/LoopClosing.h:24, from /home/hy/Desktop/orb_slam2/src/LoopClosing.cc:21: /usr/local/include/opencv/cv.h:65:10: fatal error: opencv2/photo/photo_c.h: 没有那个文件或目录 65 | #include "opencv2/photo/photo_c.h" | ^~~~~~~~~ compilation terminated. make[2]: [CMakeFiles/ORB_SLAM2.dir/build.make:160:CMakeFiles/ORB_SLAM2.dir/src/FrameDrawer.cc.o] 错误 1 In file included from /home/hy/Desktop/orb_slam2/include/ORBextractor.h:26, from /home/hy/Desktop/orb_slam2/include/Frame.h:31, from /home/hy/Desktop/orb_slam2/include/MapPoint.h:25, from /home/hy/Desktop/orb_slam2/include/KeyFrame.h:24, from /home/hy/Desktop/orb_slam2/src/KeyFrame.cc:21: /usr/local/include/opencv/cv.h:65:10: fatal error: opencv2/photo/photo_c.h: 没有那个文件或目录 65 | #include "opencv2/photo/photo_c.h" | ^~~~~~~~~ compilation terminated. make[2]: [CMakeFiles/ORB_SLAM2.dir/build.make:202:CMakeFiles/ORB_SLAM2.dir/src/KeyFrame.cc.o] 错误 1 make[2]: [CMakeFiles/ORB_SLAM2.dir/build.make:118:CMakeFiles/ORB_SLAM2.dir/src/LoopClosing.cc.o] 错误 1 In file included from /home/hy/Desktop/orb_slam2/include/ORBextractor.h:26, from /home/hy/Desktop/orb_slam2/src/ORBextractor.cc:63: /usr/local/include/opencv/cv.h:65:10: fatal error: opencv2/photo/photo_c.h: 没有那个文件或目录 65 | #include "opencv2/photo/photo_c.h" | ^~~~~~~~~ compilation terminated. In file included from /home/hy/Desktop/orb_slam2/include/ORBextractor.h:26, from /home/hy/Desktop/orb_slam2/include/KeyFrame.h:28, from /home/hy/Desktop/orb_slam2/include/MapPoint.h:24, from /home/hy/Desktop/orb_slam2/include/Map.h:24, from /home/hy/Desktop/orb_slam2/include/Optimizer.h:24, from /home/hy/Desktop/orb_slam2/src/Optimizer.cc:21: /usr/local/include/opencv/cv.h:65:10: fatal error: opencv2/photo/photo_c.h: 没有那个文件或目录 65 | #include "opencv2/photo/photo_c.h" | ^~~~~~~~~ compilation terminated. make[2]: [CMakeFiles/ORB_SLAM2.dir/build.make:132:CMakeFiles/ORB_SLAM2.dir/src/ORBextractor.cc.o] 错误 1 In file included from /home/hy/Desktop/orb_slam2/include/ORBextractor.h:26, from /home/hy/Desktop/orb_slam2/include/KeyFrame.h:28, from /home/hy/Desktop/orb_slam2/include/MapPoint.h:24, from /home/hy/Desktop/orb_slam2/include/FrameDrawer.h:25, from /home/hy/Desktop/orb_slam2/include/Viewer.h:25, from /home/hy/Desktop/orb_slam2/include/Tracking.h:28, from /home/hy/Desktop/orb_slam2/src/Tracking.cc:22: /usr/local/include/opencv/cv.h:65:10: fatal error: opencv2/photo/photo_c.h: 没有那个文件或目录 65 | #include "opencv2/photo/photo_c.h" | ^~~~~~~~~ compilation terminated. make[2]: [CMakeFiles/ORB_SLAM2.dir/build.make:244:CMakeFiles/ORB_SLAM2.dir/src/Optimizer.cc.o] 错误 1 make[2]: [CMakeFiles/ORB_SLAM2.dir/build.make:90:CMakeFiles/ORB_SLAM2.dir/src/Tracking.cc.o] 错误 1 In file included from /home/hy/Desktop/orb_slam2/include/ORBextractor.h:26, from /home/hy/Desktop/orb_slam2/include/KeyFrame.h:28, from /home/hy/Desktop/orb_slam2/include/MapPoint.h:24, from /home/hy/Desktop/orb_slam2/include/Map.h:24, from /home/hy/Desktop/orb_slam2/src/Map.cc:21: /usr/local/include/opencv/cv.h:65:10: fatal error: opencv2/photo/photo_c.h: 没有那个文件或目录 65 | #include "opencv2/photo/photo_c.h" | ^~~~~~~~~ compilation terminated. In file included from /home/hy/Desktop/orb_slam2/include/ORBextractor.h:26, from /home/hy/Desktop/orb_slam2/include/Frame.h:31, from /home/hy/Desktop/orb_slam2/include/MapPoint.h:25, from /home/hy/Desktop/orb_slam2/include/KeyFrame.h:24, from /home/hy/Desktop/orb_slam2/include/KeyFrameDatabase.h:28, from /home/hy/Desktop/orb_slam2/src/KeyFrameDatabase.cc:21: /usr/local/include/opencv/cv.h:65:10: fatal error: opencv2/photo/photo_c.h: 没有那个文件或目录 65 | #include "opencv2/photo/photo_c.h" | ^~~~~~~~~ compilation terminated. In file included from /home/hy/Desktop/orb_slam2/include/ORBextractor.h:26, from /home/hy/Desktop/orb_slam2/include/KeyFrame.h:28, from /home/hy/Desktop/orb_slam2/include/MapPoint.h:24, from /home/hy/Desktop/orb_slam2/include/Map.h:24, from /home/hy/Desktop/orb_slam2/include/Tracking.h:30, from /home/hy/Desktop/orb_slam2/include/FrameDrawer.h:24, from /home/hy/Desktop/orb_slam2/include/Viewer.h:25, from /home/hy/Desktop/orb_slam2/src/Viewer.cc:21: /usr/local/include/opencv/cv.h:65:10: fatal error: opencv2/photo/photo_c.h: 没有那个文件或目录 65 | #include "opencv2/photo/photo_c.h" | ^~~~~~~~~ make[2]: [CMakeFiles/ORB_SLAM2.dir/build.make:216:CMakeFiles/ORB_SLAM2.dir/src/Map.cc.o] 错误 1 compilation terminated. In file included from /home/hy/Desktop/orb_slam2/include/ORBextractor.h:26, from /home/hy/Desktop/orb_slam2/include/KeyFrame.h:28, from /home/hy/Desktop/orb_slam2/include/MapPoint.h:24, from /home/hy/Desktop/orb_slam2/include/PnPsolver.h:55, from /home/hy/Desktop/orb_slam2/src/PnPsolver.cc:53: /usr/local/include/opencv/cv.h:65:10: fatal error: opencv2/photo/photo_c.h: 没有那个文件或目录 65 | #include "opencv2/photo/photo_c.h" | ^~~~~~~~~ compilation terminated. make[2]: [CMakeFiles/ORB_SLAM2.dir/build.make:286:CMakeFiles/ORB_SLAM2.dir/src/KeyFrameDatabase.cc.o] 错误 1 make[2]: [CMakeFiles/ORB_SLAM2.dir/build.make:328:CMakeFiles/ORB_SLAM2.dir/src/Viewer.cc.o] 错误 1 make[2]: [CMakeFiles/ORB_SLAM2.dir/build.make:258:CMakeFiles/ORB_SLAM2.dir/src/PnPsolver.cc.o] 错误 1 In file included from /home/hy/Desktop/orb_slam2/include/ORBextractor.h:26, from /home/hy/Desktop/orb_slam2/include/KeyFrame.h:28, from /home/hy/Desktop/orb_slam2/include/MapPoint.h:24, from /home/hy/Desktop/orb_slam2/include/Frame.h:26, from /home/hy/Desktop/orb_slam2/src/Frame.cc:21: /usr/local/include/opencv/cv.h:65:10: fatal error: opencv2/photo/photo_c.h: 没有那个文件或目录 65 | #include "opencv2/photo/photo_c.h" | ^~~~~~~~~ compilation terminated. make[2]: [CMakeFiles/ORB_SLAM2.dir/build.make:272:CMakeFiles/ORB_SLAM2.dir/src/Frame.cc.o] 错误 1 In file included from /home/hy/Desktop/orb_slam2/include/ORBextractor.h:26, from /home/hy/Desktop/orb_slam2/include/KeyFrame.h:28, from /home/hy/Desktop/orb_slam2/include/MapPoint.h:24, from /home/hy/Desktop/orb_slam2/include/Frame.h:26, from /home/hy/Desktop/orb_slam2/include/Initializer.h:24, from /home/hy/Desktop/orb_slam2/src/Initializer.cc:21: /usr/local/include/opencv/cv.h:65:10: fatal error: opencv2/photo/photo_c.h: 没有那个文件或目录 65 | #include "opencv2/photo/photo_c.h" | ^~~~~~~~~ compilation terminated. In file included from /home/hy/Desktop/orb_slam2/include/ORBextractor.h:26, from /home/hy/Desktop/orb_slam2/include/Frame.h:31, from /home/hy/Desktop/orb_slam2/include/MapPoint.h:25, from /home/hy/Desktop/orb_slam2/include/KeyFrame.h:24, from /home/hy/Desktop/orb_slam2/include/Sim3Solver.h:28, from /home/hy/Desktop/orb_slam2/src/Sim3Solver.cc:22: /usr/local/include/opencv/cv.h:65:10: fatal error: opencv2/photo/photo_c.h: 没有那个文件或目录 65 | #include "opencv2/photo/photo_c.h" | ^~~~~~~~~ compilation terminated. make[2]: [CMakeFiles/ORB_SLAM2.dir/build.make:314:CMakeFiles/ORB_SLAM2.dir/src/Initializer.cc.o] 错误 1 make[2]: [CMakeFiles/ORB_SLAM2.dir/build.make:300:CMakeFiles/ORB_SLAM2.dir/src/Sim3Solver.cc.o] 错误 1 make[1]: [CMakeFiles/Makefile2:95:CMakeFiles/ORB_SLAM2.dir/all] 错误 2 make: [Makefile:91:all] 错误 2