【glomap】glomap install tutorial

【glomap】glomap install tutorial

1. install step by office

python 复制代码
mkdir build
cd build
cmake .. -GNinja
ninja && ninja install

error like this:

python 复制代码
/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

cpp 复制代码
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版本支持的架构。

  1. 打开涉及CUDA编译选项的CMakeLists.txt文件。

  2. 查找设置CUDA_ARCHITECTURES或类似选项的部分,通常看起来像这样:

    cmake 复制代码
    set(CUDA_ARCHITECTURES "compute_89")
  3. 修改为你的CUDA版本支持的架构,例如compute_75(适用于NVIDIA Turing架构的GPU):

    cmake 复制代码
    set(CUDA_ARCHITECTURES "compute_75")
方法2:更新CUDA工具包

确保你使用的是最新版本的CUDA工具包。新的版本可能支持最新的GPU架构。

  1. 移除现有的CUDA工具包

    bash 复制代码
    sudo apt-get remove --purge cuda
    sudo apt-get autoremove
  2. 下载并安装最新版本的CUDA工具包

    NVIDIA的CUDA下载页面下载并安装适合你的系统的最新版本。

  3. 重启并验证CUDA版本

    bash 复制代码
    nvcc --version
方法3:在CMake中手动设置CUDA编译选项

在调用CMake时手动设置CUDA编译选项以匹配你的GPU架构。

  1. 进入你的构建目录

    bash 复制代码
    cd /home/sun/3d/glomap/build
  2. 运行CMake命令并指定支持的CUDA架构

    bash 复制代码
    cmake .. -DCMAKE_CUDA_ARCHITECTURES="75"

通过这些步骤,你应该能够解决compute_89架构不支持的问题并成功编译项目。如果问题仍然存在,请提供进一步的错误信息,以便更好地帮助你解决问题。

4 reference

  1. ceres-solver
  2. colmap
  3. glomap
相关推荐
pk_xz12345637 分钟前
Shell 脚本中变量和字符串的入门介绍
linux·运维·服务器
小珑也要变强39 分钟前
Linux之sed命令详解
linux·运维·服务器
海绵波波1071 小时前
Webserver(4.3)TCP通信实现
服务器·网络·tcp/ip
九河云3 小时前
AWS账号注册费用详解:新用户是否需要付费?
服务器·云计算·aws
Lary_Rock3 小时前
RK3576 LINUX RKNN SDK 测试
linux·运维·服务器
幺零九零零4 小时前
【计算机网络】TCP协议面试常考(一)
服务器·tcp/ip·计算机网络
云飞云共享云桌面5 小时前
8位机械工程师如何共享一台图形工作站算力?
linux·服务器·网络
一坨阿亮6 小时前
Linux 使用中的问题
linux·运维
幺零九零零8 小时前
【C++】socket套接字编程
linux·服务器·网络·c++
wclass-zhengge8 小时前
Docker篇(Docker Compose)
运维·docker·容器