【glomap】glomap install tutorial
- 1. install step by office
- 2. install step
- 3. reason
- 方法1:修改目标GPU架构
- 方法2:更新CUDA工具包
- 方法3:在CMake中手动设置CUDA编译选项
- 4 reference
1. install step by office
mkdir build
cd build
cmake .. -GNinja
ninja && ninja install
error like this:
/glomap/build$ make -j20
[ 2%] Building C object _deps/colmap-build/src/thirdparty/VLFeat/CMakeFiles/colmap_vlfeat.dir/array.c.o
[ 2%] Building C object _deps/colmap-build/src/thirdparty/VLFeat/CMakeFiles/colmap_vlfeat.dir/aib.c.o
[ 2%] Building C object _deps/colmap-build/src/thirdparty/VLFeat/CMakeFiles/colmap_vlfeat.dir/covdet.c.o
[ 2%] Building C object _deps/colmap-build/src/thirdparty/VLFeat/CMakeFiles/colmap_vlfeat.dir/dsift.c.o
[ 2%] Building C object _deps/colmap-build/src/thirdparty/VLFeat/CMakeFiles/colmap_vlfeat.dir/fisher.c.o
[ 2%] Building C object _deps/colmap-build/src/thirdparty/VLFeat/CMakeFiles/colmap_vlfeat.dir/generic.c.o
[ 2%] Building CXX object _deps/poselib-build/PoseLib/CMakeFiles/PoseLib.dir/solvers/gp3p.cc.o
[ 4%] Building CXX object _deps/poselib-build/PoseLib/CMakeFiles/PoseLib.dir/solvers/gp4ps.cc.o
[ 4%] Building C object _deps/colmap-build/src/thirdparty/VLFeat/CMakeFiles/colmap_vlfeat.dir/getopt_long.c.o
[ 4%] Building C object _deps/colmap-build/src/thirdparty/VLFeat/CMakeFiles/colmap_vlfeat.dir/gmm.c.o
[ 4%] Building CXX object _deps/colmap-build/src/colmap/util/CMakeFiles/colmap_util.dir/base_controller.cc.o
[ 4%] Building CXX object _deps/poselib-build/PoseLib/CMakeFiles/PoseLib.dir/solvers/p1p2ll.cc.o
[ 4%] Building C object _deps/colmap-build/src/thirdparty/VLFeat/CMakeFiles/colmap_vlfeat.dir/hikmeans.c.o
[ 4%] Building C object _deps/colmap-build/src/thirdparty/LSD/CMakeFiles/colmap_lsd.dir/lsd.c.o
[ 4%] Building CXX object _deps/poselib-build/PoseLib/CMakeFiles/PoseLib.dir/solvers/p2p1ll.cc.o
[ 4%] Building CXX object _deps/poselib-build/PoseLib/CMakeFiles/PoseLib.dir/solvers/p2p2pl.cc.o
[ 4%] Building C object _deps/colmap-build/src/thirdparty/VLFeat/CMakeFiles/colmap_vlfeat.dir/hog.c.o
[ 4%] Building CXX object _deps/colmap-build/src/colmap/util/CMakeFiles/colmap_util.dir/logging.cc.o
[ 4%] Building CXX object _deps/colmap-build/src/thirdparty/SiftGPU/CMakeFiles/colmap_sift_gpu.dir/FrameBufferObject.cpp.o
[ 4%] Building CXX object _deps/colmap-build/src/thirdparty/PoissonRecon/CMakeFiles/colmap_poisson_recon.dir/CmdLineParser.cpp.o
[ 6%] Building CXX object _deps/colmap-build/src/thirdparty/SiftGPU/CMakeFiles/colmap_sift_gpu.dir/GlobalUtil.cpp.o
[ 6%] Building CXX object _deps/colmap-build/src/thirdparty/PoissonRecon/CMakeFiles/colmap_poisson_recon.dir/Factor.cpp.o
[ 6%] Building CXX object _deps/colmap-build/src/thirdparty/PoissonRecon/CMakeFiles/colmap_poisson_recon.dir/Geometry.cpp.o
[ 6%] Building CXX object _deps/colmap-build/src/colmap/util/CMakeFiles/colmap_util.dir/opengl_utils.cc.o
[ 8%] Building CXX object _deps/colmap-build/src/colmap/util/CMakeFiles/colmap_util.dir/misc.cc.o
[ 10%] Building CXX object _deps/colmap-build/src/thirdparty/PoissonRecon/CMakeFiles/colmap_poisson_recon.dir/MarchingCubes.cpp.o
[ 10%] Building C object _deps/colmap-build/src/thirdparty/VLFeat/CMakeFiles/colmap_vlfeat.dir/homkermap.c.o
[ 10%] Building CXX object _deps/colmap-build/src/colmap/util/CMakeFiles/colmap_util.dir/ply.cc.o
[ 10%] Building CXX object _deps/colmap-build/src/colmap/util/CMakeFiles/colmap_util.dir/string.cc.o
[ 10%] Building CXX object _deps/colmap-build/src/colmap/util/CMakeFiles/colmap_util.dir/threading.cc.o
[ 12%] Building CXX object _deps/poselib-build/PoseLib/CMakeFiles/PoseLib.dir/solvers/p3ll.cc.o
[ 12%] Building CXX object _deps/colmap-build/src/colmap/util/CMakeFiles/colmap_util.dir/timer.cc.o
[ 12%] Building CXX object _deps/poselib-build/PoseLib/CMakeFiles/PoseLib.dir/solvers/p3p.cc.o
[ 12%] Linking C static library libcolmap_lsd.a
[ 12%] Built target colmap_lsd
[ 12%] Building CXX object _deps/poselib-build/PoseLib/CMakeFiles/PoseLib.dir/solvers/p3p_ding.cc.o
[ 12%] Building CXX object _deps/colmap-build/src/thirdparty/SiftGPU/CMakeFiles/colmap_sift_gpu.dir/GLTexImage.cpp.o
[ 12%] Building CXX object _deps/colmap-build/src/thirdparty/SiftGPU/CMakeFiles/colmap_sift_gpu.dir/ProgramGLSL.cpp.o
[ 14%] Building CXX object _deps/colmap-build/src/colmap/util/CMakeFiles/colmap_util.dir/version.cc.o
[ 16%] Building C object _deps/colmap-build/src/thirdparty/VLFeat/CMakeFiles/colmap_vlfeat.dir/host.c.o
[ 16%] Building C object _deps/colmap-build/src/thirdparty/VLFeat/CMakeFiles/colmap_vlfeat.dir/ikmeans.c.o
[ 16%] Building CXX object _deps/colmap-build/src/thirdparty/SiftGPU/CMakeFiles/colmap_sift_gpu.dir/PyramidGL.cpp.o
[ 16%] Building CXX object _deps/colmap-build/src/thirdparty/PoissonRecon/CMakeFiles/colmap_poisson_recon.dir/PlyFile.cpp.o
[ 16%] Building C object _deps/colmap-build/src/thirdparty/VLFeat/CMakeFiles/colmap_vlfeat.dir/imopv.c.o
[ 16%] Building CXX object _deps/colmap-build/src/thirdparty/SiftGPU/CMakeFiles/colmap_sift_gpu.dir/ShaderMan.cpp.o
[ 18%] Building CXX object _deps/colmap-build/src/thirdparty/SiftGPU/CMakeFiles/colmap_sift_gpu.dir/SiftMatch.cpp.o
[ 18%] Building CXX object _deps/colmap-build/src/thirdparty/SiftGPU/CMakeFiles/colmap_sift_gpu.dir/SiftGPU.cpp.o
[ 18%] Building CXX object _deps/colmap-build/src/thirdparty/SiftGPU/CMakeFiles/colmap_sift_gpu.dir/SiftPyramid.cpp.o
[ 18%] Building C object _deps/colmap-build/src/thirdparty/VLFeat/CMakeFiles/colmap_vlfeat.dir/kdtree.c.o
[ 18%] Building CXX object _deps/colmap-build/src/thirdparty/PoissonRecon/CMakeFiles/colmap_poisson_recon.dir/PoissonRecon.cpp.o
[ 18%] Building CXX object _deps/colmap-build/src/thirdparty/PoissonRecon/CMakeFiles/colmap_poisson_recon.dir/SurfaceTrimmer.cpp.o
[ 18%] Building CXX object _deps/poselib-build/PoseLib/CMakeFiles/PoseLib.dir/solvers/p4pf.cc.o
[ 18%] Building CXX object _deps/poselib-build/PoseLib/CMakeFiles/PoseLib.dir/solvers/p5lp_radial.cc.o
[ 18%] Building C object _deps/colmap-build/src/thirdparty/VLFeat/CMakeFiles/colmap_vlfeat.dir/kmeans.c.o
[ 18%] Building CXX object _deps/colmap-build/src/thirdparty/SiftGPU/CMakeFiles/colmap_sift_gpu.dir/CuTexImage.cpp.o
[ 18%] Building C object _deps/colmap-build/src/thirdparty/VLFeat/CMakeFiles/colmap_vlfeat.dir/lbp.c.o
[ 20%] Building C object _deps/colmap-build/src/thirdparty/VLFeat/CMakeFiles/colmap_vlfeat.dir/liop.c.o
[ 20%] Building CUDA object _deps/colmap-build/src/thirdparty/SiftGPU/CMakeFiles/colmap_sift_gpu.dir/ProgramCU.cu.o
nvcc fatal : Unsupported gpu architecture 'compute_89'
make[2]: *** [_deps/colmap-build/src/thirdparty/SiftGPU/CMakeFiles/colmap_sift_gpu.dir/build.make:216: _deps/colmap-build/src/thirdparty/SiftGPU/CMakeFiles/colmap_sift_gpu.dir/ProgramCU.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 20%] Building CXX object _deps/poselib-build/PoseLib/CMakeFiles/PoseLib.dir/solvers/p6lp.cc.o
[ 20%] Building C object _deps/colmap-build/src/thirdparty/VLFeat/CMakeFiles/colmap_vlfeat.dir/mathop.c.o
[ 20%] Building C object _deps/colmap-build/src/thirdparty/VLFeat/CMakeFiles/colmap_vlfeat.dir/mser.c.o
[ 20%] Building C object _deps/colmap-build/src/thirdparty/VLFeat/CMakeFiles/colmap_vlfeat.dir/pgm.c.o
[ 22%] Building CXX object _deps/poselib-build/PoseLib/CMakeFiles/PoseLib.dir/solvers/ugp2p.cc.o
[ 22%] Building CXX object _deps/poselib-build/PoseLib/CMakeFiles/PoseLib.dir/solvers/ugp3ps.cc.o
make[1]: *** [CMakeFiles/Makefile2:1314: _deps/colmap-build/src/thirdparty/SiftGPU/CMakeFiles/colmap_sift_gpu.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
why and how to fix ,answer in chinese
2. install step
cmake .. -DCMAKE_CUDA_ARCHITECTURES="75"
make -j20
3. reason
这个错误提示 nvcc fatal : Unsupported gpu architecture 'compute_89'
,表明你的CUDA编译器不支持目标GPU架构compute_89
。可能的原因是你的CUDA版本较旧,不支持最新的GPU架构。
要解决这个问题,你可以尝试以下方法:
方法1:修改目标GPU架构
修改CMakeLists.txt
文件,将不支持的GPU架构移除或替换为你的CUDA版本支持的架构。
-
打开涉及CUDA编译选项的
CMakeLists.txt
文件。 -
查找设置
CUDA_ARCHITECTURES
或类似选项的部分,通常看起来像这样:set(CUDA_ARCHITECTURES "compute_89")
-
修改为你的CUDA版本支持的架构,例如
compute_75
(适用于NVIDIA Turing架构的GPU):set(CUDA_ARCHITECTURES "compute_75")
方法2:更新CUDA工具包
确保你使用的是最新版本的CUDA工具包。新的版本可能支持最新的GPU架构。
-
移除现有的CUDA工具包:
sudo apt-get remove --purge cuda sudo apt-get autoremove
-
下载并安装最新版本的CUDA工具包:
从NVIDIA的CUDA下载页面下载并安装适合你的系统的最新版本。 -
重启并验证CUDA版本:
nvcc --version
方法3:在CMake中手动设置CUDA编译选项
在调用CMake时手动设置CUDA编译选项以匹配你的GPU架构。
-
进入你的构建目录:
cd /home/sun/3d/glomap/build
-
运行CMake命令并指定支持的CUDA架构:
cmake .. -DCMAKE_CUDA_ARCHITECTURES="75"
通过这些步骤,你应该能够解决compute_89
架构不支持的问题并成功编译项目。如果问题仍然存在,请提供进一步的错误信息,以便更好地帮助你解决问题。
4 reference
- ceres-solver
- colmap
- glomap