Skip to content

Build fails: Unsupported gpu architecture 'compute_120' #212

@maximilian-hack

Description

@maximilian-hack

Thank you for taking the time to read this issue.

I was trying to build glomap from source on my laptop (Ubuntu 24.04).

This could very well be a configuration mistake on my side. In that case it would be very helpfull if you could point out what I did wrong.

I will continue to try to make it work somehow.

Again, thanks for taking the time to read my issue.
Have a good day!

Max

PS:
Here are the outputs from the commands cmake .. -GNinja and ninja:

…/Downloads/glomap-1.1.0/build 
❯ cmake .. -GNinja
-- The C compiler identification is GNU 13.3.0
-- The CXX compiler identification is GNU 13.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- SuiteSparse_config version: 7.6.1
-- SuiteSparse_config include: /usr/include/suitesparse
-- SuiteSparse_config library: /usr/lib/x86_64-linux-gnu/libsuitesparseconfig.so.7.6.1
-- SuiteSparse_config static:  /usr/lib/x86_64-linux-gnu/libsuitesparseconfig.a
-- AMD version: 3.3.1
-- AMD include: /usr/include/suitesparse
-- AMD library: /usr/lib/x86_64-linux-gnu/libamd.so.3.3.1
-- AMD static:  /usr/lib/x86_64-linux-gnu/libamd.a
-- COLAMD version: 3.3.2
-- COLAMD include: /usr/include/suitesparse
-- COLAMD library: /usr/lib/x86_64-linux-gnu/libcolamd.so.3.3.2
-- COLAMD static:  /usr/lib/x86_64-linux-gnu/libcolamd.a
-- CAMD version: 3.3.1
-- CAMD include: /usr/include/suitesparse
-- CAMD library: /usr/lib/x86_64-linux-gnu/libcamd.so.3.3.1
-- CAMD static:  /usr/lib/x86_64-linux-gnu/libcamd.a
-- CCOLAMD version: 3.3.2
-- CCOLAMD include: /usr/include/suitesparse
-- CCOLAMD library: /usr/lib/x86_64-linux-gnu/libccolamd.so.3.3.2
-- CCOLAMD static:  /usr/lib/x86_64-linux-gnu/libccolamd.a
-- CHOLMOD version: 5.2.0
-- CHOLMOD include: /usr/include/suitesparse
-- CHOLMOD library: /usr/lib/x86_64-linux-gnu/libcholmod.so.5.2.0
-- CHOLMOD static:  /usr/lib/x86_64-linux-gnu/libcholmod.a
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Found AMD headers in: /usr/include/suitesparse
-- Found AMD library: /usr/lib/x86_64-linux-gnu/libamd.so
-- Found CAMD headers in: /usr/include/suitesparse
-- Found CAMD library: /usr/lib/x86_64-linux-gnu/libcamd.so
-- Found CCOLAMD headers in: /usr/include/suitesparse
-- Found CCOLAMD library: /usr/lib/x86_64-linux-gnu/libccolamd.so
-- Found CHOLMOD headers in: /usr/include/suitesparse
-- Found CHOLMOD library: /usr/lib/x86_64-linux-gnu/libcholmod.so
-- Found COLAMD headers in: /usr/include/suitesparse
-- Found COLAMD library: /usr/lib/x86_64-linux-gnu/libcolamd.so
-- Found SPQR headers in: /usr/include/suitesparse
-- Found SPQR library: /usr/lib/x86_64-linux-gnu/libspqr.so
-- Found Config headers in: /usr/include/suitesparse
-- Found Config library: /usr/lib/x86_64-linux-gnu/libsuitesparseconfig.so
-- Found Intel Thread Building Blocks (TBB) library (2021.11 / ) include location: . Assuming SuiteSparseQR was compiled with TBB.
-- Looking for shm_open in rt
-- Looking for shm_open in rt - found
-- Adding librt to SuiteSparse_config libraries (required on Linux & Unix [not OSX] if SuiteSparse is compiled with timing).
-- Found METIS: /usr/include (found version "5.1.0") 
-- Looking for cholmod_metis
-- Looking for cholmod_metis - found
-- Found SuiteSparse: /usr/include/suitesparse (found suitable version "7.6.1", minimum required is "7.6.1") found components: AMD CAMD CCOLAMD CHOLMOD COLAMD SPQR Config 
-- Found required Ceres dependency: Eigen version 3.4.0 in /usr/share/eigen3/cmake
-- Found required Ceres dependency: glog
-- Found required Ceres dependency: gflags
-- Found Ceres version: 2.2.0 installed in: /usr with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, SchurSpecializations]
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.83.0/BoostConfig.cmake (found version "1.83.0")  
-- Configuring PoseLib...
-- BUILD_SHARED_LIBS: OFF
-- CMAKE_BUILD_TYPE: Release
-- CMAKE_GENERATOR: Single-config
-- CMAKE_GENERATOR: Ninja
-- CMAKE_REGISTRY_FOLDER: OFF
-- Configuring PoseLib... done
-- Configuring COLMAP...
-- Enabling LSD support
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.83.0/BoostConfig.cmake (found version "1.83.0") found components: graph program_options system 
-- Found FreeImage
--   Includes : /usr/include
--   Libraries : /usr/lib/x86_64-linux-gnu/libfreeimage.so
-- Found FLANN
--   Includes : /usr/include
--   Libraries : /usr/lib/x86_64-linux-gnu/libflann.so
-- Found LZ4
--   Includes : /usr/include
--   Libraries : /usr/lib/x86_64-linux-gnu/liblz4.so
-- Found Metis
--   Includes : /usr/include
--   Libraries : /usr/lib/x86_64-linux-gnu/libmetis.so
-- Found Glog
--   Target : glog::glog
-- Found SQLite3: /usr/include (found version "3.45.1") 
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so   
-- Found Glew
--   Includes : /usr/include
--   Libraries : /usr/lib/x86_64-linux-gnu/libGLEW.so
-- Found Git: /usr/bin/git (found version "2.43.0") 
-- Found required Ceres dependency: Eigen version 3.4.0 in /usr/share/eigen3/cmake
-- Found required Ceres dependency: glog
-- Found required Ceres dependency: gflags
-- Found Ceres version: 2.2.0 installed in: /usr with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, SchurSpecializations]
-- Enabling OpenMP support
-- Using header-only CGAL
-- Targeting Ninja
-- Using /usr/bin/c++ compiler.
-- Found GMP: /usr/lib/x86_64-linux-gnu/libgmp.so  
-- Found MPFR: /usr/lib/x86_64-linux-gnu/libmpfr.so  
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.83.0/BoostConfig.cmake (found suitable version "1.83.0", minimum required is "1.66")  
-- Boost include dirs: /usr/include
-- Boost libraries:    
-- Using gcc version 4 or later. Adding -frounding-math
-- Found CGAL
--   Includes : /usr/include
--   Libraries : CGAL
-- The CUDA compiler identification is NVIDIA 12.0.140
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Enabling CUDA support (version: 12.0.140, archs: native)
-- Found Qt
--   Module : /usr/lib/x86_64-linux-gnu/cmake/Qt5Core
--   Module : /usr/lib/x86_64-linux-gnu/cmake/Qt5OpenGL
--   Module : /usr/lib/x86_64-linux-gnu/cmake/Qt5Widgets
-- Enabling GUI support
-- Enabling OpenGL support
-- Enabling GPU support (OpenGL: ON, CUDA: ON)
-- Build type specified as Release
-- Enabling SIMD support
-- Disabling interprocedural optimization
-- Disabling ccache support
-- Disabling profiling support
-- Configuring PoseLib...
-- Configuring PoseLib... done
-- Configuring COLMAP... done
-- Enabling CUDA support (version: 12.0.140, archs: native)
-- Disabling ccache support
-- Configuring done (9.7s)
-- Generating done (0.0s)
-- Build files have been written to: /home/max/Downloads/glomap-1.1.0/build

…/Downloads/glomap-1.1.0/build via △ v3.28.3 took 9s
❯ ninja 
[87/290] Building CUDA object _deps/co.../colmap_mvs_cuda.dir/gpu_mat_prng.cu.o
FAILED: _deps/colmap-build/src/colmap/mvs/CMakeFiles/colmap_mvs_cuda.dir/gpu_mat_prng.cu.o 
/usr/bin/nvcc -forward-unknown-to-host-compiler -DBOOST_GRAPH_DYN_LINK -DBOOST_GRAPH_NO_LIB -DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DCOLMAP_CGAL_ENABLED -DCOLMAP_CUDA_ENABLED -DCOLMAP_GPU_ENABLED -DCOLMAP_GUI_ENABLED -DCOLMAP_LSD_ENABLED -DCOLMAP_OPENGL_ENABLED -DCOLMAP_OPENMP_ENABLED -DGFLAGS_IS_A_DLL=0 -DGLOG_CUSTOM_PREFIX_SUPPORT -DGLOG_VERSION_MAJOR=0 -DGLOG_VERSION_MINOR=6 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -I/home/max/Downloads/glomap-1.1.0/build/_deps/colmap-src/src -isystem /usr/include/eigen3 -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt5/QtOpenGL -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -Wno-deprecated-gpu-targets --compiler-options -fPIC --use_fast_math --default-stream per-thread -Xptxas=-suppress-stack-size-warning -O3 -DNDEBUG -std=c++14 -arch=native -Xcompiler=-fPIC -MD -MT _deps/colmap-build/src/colmap/mvs/CMakeFiles/colmap_mvs_cuda.dir/gpu_mat_prng.cu.o -MF _deps/colmap-build/src/colmap/mvs/CMakeFiles/colmap_mvs_cuda.dir/gpu_mat_prng.cu.o.d -x cu -c /home/max/Downloads/glomap-1.1.0/build/_deps/colmap-src/src/colmap/mvs/gpu_mat_prng.cu -o _deps/colmap-build/src/colmap/mvs/CMakeFiles/colmap_mvs_cuda.dir/gpu_mat_prng.cu.o
nvcc fatal   : Unsupported gpu architecture 'compute_120'
[104/290] Building CXX object _deps/po...keFiles/PoseLib.dir/robust/bundle.cc.o
ninja: build stopped: subcommand failed.

…/Downloads/glomap-1.1.0/build via △ v3.28.3 took 50s
❯ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions