Compilation Error, Kubuntu 18, Cuda V9,

257 views
Skip to first unread message

gryph...@gmail.com

unread,
Jul 27, 2018, 6:59:06 AM7/27/18
to COLMAP
I'm having difficulty compiling Colmap, after several attempts.
I'm following the installation guide for Linux at https://colmap.github.io/install.html
I'm on Kubuntu 18 with an nvidia GT520MX compute level 2.1. I had previously installed & removed the snap colmap-mardy as well as the standard package colmap.
The dependencies installed OK. ceres-solver built & installed, probably using gcc/g++ vers 7

Attempt 1: Using nvidia-cuda-toolkit (NCV) vers 9
Compilation fails at 25% with this message:
       
nvcc fatal   : Unsupported gpu architecture 'compute_20'
       
CMake Error at pba_generated_ProgramCU.cu.o.Release.cmake:219 (message):
           
Error generating
           
/home/g/Projects/3D_Print_Model/PhotoGram/ColMap/Install/colmap/build/lib/PBA/CMakeFiles/pba.dir//./pba_generated_ProgramCU.cu.o


           
    After reading Ref. 1 below I added the nvcc dir to my path.The compilation then fails with:    
       
[ 25%] Building NVCC (Device) object lib/PBA/CMakeFiles/pba.dir/pba_generated_ProgramCU.cu.o
        nvcc fatal  
: Unsupported gpu architecture 'compute_20'
       
CMake Error at pba_generated_ProgramCU.cu.o.Release.cmake:219 (message):
           
Error generating
           
/home/g/Projects/3D_Print_Model/PhotoGram/ColMap/Install/colmap/build/lib/PBA/CMakeFiles/pba.dir//./pba_generated_ProgramCU.cu.o
           
            lib
/PBA/CMakeFiles/pba.dir/build.make:63: recipe for target 'lib/PBA/CMakeFiles/pba.dir/pba_generated_ProgramCU.cu.o' failed
            make
[2]: *** [lib/PBA/CMakeFiles/pba.dir/pba_generated_ProgramCU.cu.o] Error 1
           
CMakeFiles/Makefile2:485: recipe for target 'lib/PBA/CMakeFiles/pba.dir/all' failed
            make
[1]: *** [lib/PBA/CMakeFiles/pba.dir/all] Error 2
           
Makefile:129: recipe for target 'all' failed
            make
: *** [all] Error 2



    The references (for other applications) indicate that cuda vers. 9 does not support compute_20, and recommend to delete references to it. I'm slightly concerned that the snap may have made permanent changes. They are supposed to be self contained but given the snap''s size (650MB) it likely has it''s own version of Cuda (prob v 8) & may perhaps have made changes on the GPU. Does this indicate I should reinstall nvidia-cuda-toolkit?

I would prefer to install Colmap on this basis, removing references to compute_20. Is this possible?

Attempt 2:
I purged NCV vers 9 & installed vers 8
Compilation failed at 25% again with this message:

[25%] Building NVCC (Device) object lib/PBA/CMakeFiles/pba.dir/pba_generated_ProgramCU.cu.o
In file included from /usr/include/cuda_runtime.h:78:0,
                 
from <command-line>:0:
/usr/include/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 5 are not supported!
 
#error -- unsupported GNU version! gcc versions later than 5 are not supported!



Attempt 3:
In the install script I changed the line
   
CC=/usr/bin/gcc-6 CXX=/usr/bin/g++-6 cmake ..


to
   
CC=/usr/bin/gcc-5 CXX=/usr/bin/g++-5 cmake ..


Compilation proceeded to 100% then failed with this message:

[100%] Linking CXX executable colmap
../libcolmap.a(bitmap.cc.o): In function `char const* boost::re_detail_106501::re_is_set_member<char const*, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(char const*, char const*, boost::re_detail_106501::re_set_long<unsigned int> const*, boost::re_detail_106501::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool)':
bitmap.cc:(.text._ZN5boost16re_detail_10650116re_is_set_memberIPKccNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_S8_S8_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb[_ZN5boost16re_detail_10650116re_is_set_memberIPKccNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_S8_S8_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb]+0x163): undefined reference to `
boost::re_detail_106501::cpp_regex_traits_implementation<char>::transform_primary(char const*, char const*) const'
  • bitmap.cc:(.text._ZN5boost16re_detail_10650116re_is_set_memberIPKccNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_S8_S8_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb[_ZN5boost16re_detail_10650116re_is_set_memberIPKccNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_S8_S8_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb]+0x341): undefined reference to `boost::re_detail_106501::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const'
collect2: error: ld returned 1 exit status
src
/exe/CMakeFiles/colmap_exe.dir/build.make:143: recipe for target 'src/exe/colmap' failed
make
[2]: *** [src/exe/colmap] Error 1
CMakeFiles/Makefile2:1184: recipe for target 'src/exe/CMakeFiles/colmap_exe.dir/all' failed
make
[1]: *** [src/exe/CMakeFiles/colmap_exe.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make
: *** [all] Error 2





   I''m rapidly getting above my paygrade! What do you advise?

    References:
        1. https://github.com/colmap/colmap/issues/301
        2. https://github.com/BVLC/caffe/issues/5141
        3. https://stackoverflow.com/questions/48383846/nvcc-fatal-unsupported-gpu-architecture-compute-20-while-cuda-9-1caffeopen
        4. https://stackoverflow.com/questions/47129220/nvcc-fatal-unsupported-gpu-architecture-compute-20-while-cuda9-0-is-installe

Johannes Schönberger

unread,
Jul 27, 2018, 10:20:57 AM7/27/18
to col...@googlegroups.com
You need an older CUDA version than 9. Version 9 does not support compute capability 2.d anymore. CUDA 8 should work. Changing GCC does not work in case you are using the default boost libraries since they were probably compiled with an older GCC version which does not seem to be binary compatible due to the missing symbols during linking. 
--
You received this message because you are subscribed to the Google Groups "COLMAP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to colmap+un...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/colmap/b90a9f5a-5878-44a0-8c14-f92112b560b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andre

unread,
Jul 27, 2018, 11:16:26 AM7/27/18
to COLMAP
This worked for us:


The key is having the up-to-date Nvidia driver and gcc 6. 

Andrea
Reply all
Reply to author
Forward
0 new messages