Colmap installation error during "cmake .. -GNinja"

97 views Asked by At

I was trying to install COLMAP by following the instructions from this link: https://colmap.github.io/install.html#build-from-source. During the step cmake .. -GNinja, I encountered the error below.

I also tried installing the ceres manually, and it seems the same. What should I do?

Does anyone know how to resolve this?

-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.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
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components: filesystem 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
--   Includes : /usr/include
--   Libraries : /usr/lib/x86_64-linux-gnu/libglog.so
-- Found SQLite3: /usr/include (found version "3.31.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.25.1") 
-- Found METIS: /usr/include (found suitable version "5.1.0", minimum required is "5.1.0") 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- 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 (2020.1 / 11101). 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 "5.7.1", minimum required is "5.7.1") found components: AMD CAMD CCOLAMD CHOLMOD COLAMD SPQR Config 
-- Found CUDAToolkit: /usr/local/cuda/include (found suitable version "11.4.152", minimum required is "11.4.152") 
-- Found required Ceres dependency: Eigen version 3.4.0 in /usr/share/eigen3/cmake
CMake Error at /usr/local/lib/cmake/Ceres/FindGlog.cmake:349 (add_library):
  add_library cannot create imported target "glog::glog" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/lib/cmake/Ceres/CeresConfig.cmake:247 (find_package)
  cmake/FindDependencies.cmake:38 (find_package)
  CMakeLists.txt:85 (include)


-- Found required Ceres dependency: glog
-- Found required Ceres dependency: gflags
-- Found Ceres version: 2.2.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, SchurSpecializations]
-- Enabling OpenMP support
-- Using header-only CGAL
-- Targetting 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.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.48")  
-- 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 11.4.152
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Enabling CUDA support (version: 11.4.152, archs: native)
-- Found Qt
--   Module : /home/user/anaconda3/lib/cmake/Qt5Core
--   Module : /home/user/anaconda3/lib/cmake/Qt5OpenGL
--   Module : /home/user/anaconda3/lib/cmake/Qt5Widgets
-- Enabling GUI support
-- Enabling OpenGL support
-- Enabling GPU support
-- Build type not specified, using Release
-- Enabling SIMD support
-- Disabling interprocedural optimization
-- Disabling ccache support
-- Disabling profiling support
-- Configuring incomplete, errors occurred!
See also "/home/user/colmap/build/CMakeFiles/CMakeOutput.log".
See also "/home/user/colmap/build/CMakeFiles/CMakeError.log".
0

There are 0 answers