Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colmap compile failure #1078

Closed
jiadingfang opened this issue Dec 16, 2020 · 3 comments
Closed

Colmap compile failure #1078

jiadingfang opened this issue Dec 16, 2020 · 3 comments

Comments

@jiadingfang
Copy link

jiadingfang commented Dec 16, 2020

Describe the bug
I followed the instructions on https://colmap.github.io/install.html#linux. Everything goes fine until the 'Configure and compile COLMAP' step where I first use CC=/usr/bin/gcc-7 CXX=/usr/bin/g++-7 cmake .. and then do make -j. However the following error occurs,

-- Found required Ceres dependency: Eigen version 3.3.7 in /usr/include/eigen3
-- Found required Ceres dependency: glog
-- Found required Ceres dependency: gflags
-- Found Ceres version: 2.0.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, SchurSpecializations, Multithreading]
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components: program_options filesystem graph system unit_test_framework
-- Found Eigen
-- Includes : /usr/include/eigen3
-- Found FreeImage
-- Includes : /usr/include
-- Libraries : /usr/lib/x86_64-linux-gnu/libfreeimage.so
-- Found Glog
-- Includes : /usr/include
-- Libraries : /usr/lib/x86_64-linux-gnu/libglog.so
-- Found Glew
-- Includes : /usr/include
-- Libraries : /usr/lib/x86_64-linux-gnu/libGLEW.so
-- Using header-only CGAL
-- Targetting Unix Makefiles
-- Using /usr/bin/g++-7 compiler.
-- 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 Qt
-- Module : /home/kudo/anaconda3/lib/cmake/Qt5Core
-- Module : /home/kudo/anaconda3/lib/cmake/Qt5OpenGL
-- Module : /home/kudo/anaconda3/lib/cmake/Qt5Widgets
-- Found CGAL
-- Includes : /usr/include
-- Libraries : CGAL
-- Build type not specified, using Release
-- Enabling SIMD support
-- Enabling OpenMP support
-- Disabling interprocedural optimization
-- Automatic GPU detection failed. Building for common architectures.
-- Autodetected CUDA architecture(s): 3.5;5.0;3.0;5.2;6.0;6.1;7.0;7.5;7.5+PTX
-- Enabling CUDA support (version: 10.1, archs: sm_35 sm_50 sm_30 sm_52 sm_60 sm_61 sm_70 sm_75 compute_75)
-- Enabling OpenGL support
-- Disabling profiling support
-- Enabling CGAL support
-- Configuring done
CMake Warning at cmake/CMakeHelper.cmake:150 (add_executable):
Cannot generate a safe runtime search path for target colmap_exe because
files in some directories may conflict with libraries in implicit
directories:

runtime library [libmpfr.so.6] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /home/kudo/anaconda3/lib
runtime library [libgmp.so.10] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /home/kudo/anaconda3/lib

Some of these libraries may not be found correctly.
Call Stack (most recent call first):
src/exe/CMakeLists.txt:38 (COLMAP_ADD_EXECUTABLE)

-- Generating done
-- Build files have been written to: /home/kudo/devs/colmap/build
[ 2%] Built target sqlite3
[ 4%] Built target lsd
[ 4%] Built target flann
[ 6%] Built target poisson_recon
[ 20%] Built target vlfeat
[ 42%] Built target graclus
[ 42%] Linking CXX static library libsift_gpu.a
[ 42%] Linking CXX static library libpba.a
[ 46%] Built target pba
[ 52%] Built target sift_gpu
[ 96%] Built target colmap
[ 98%] Linking CXX static library libcolmap_cuda.a
[100%] Built target colmap_cuda
[100%] Linking CXX executable colmap
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFTileRowSize@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFReadDirectory@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFFieldTag@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFCurrentDirectory@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFIsTiled@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFIsByteSwapped@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFDefaultStripSize@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFComputeStrip@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFReadTile@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFWriteScanline@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFGetField@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFScanlineSize@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFFieldWithTag@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFTileSize@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFWriteDirectory@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFFieldName@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFFieldReadCount@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFGetTagListEntry@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFClose@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFClientOpen@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFSetTagExtender@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFGetTagListCount@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFGetFieldDefaulted@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFSwabArrayOfLong@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFFieldPassCount@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFSetSubDirectory@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFStripSize@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFFieldDataType@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to _TIFFDataSize@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFReadRGBAImage@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFReadEncodedStrip@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFSetField@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFMergeFieldInfo@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFDataWidth@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFSetDirectory@LIBTIFF_4.0' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to TIFFReadEXIFDirectory@LIBTIFF_4.0'
collect2: error: ld returned 1 exit status
make[2]: *** [src/exe/CMakeFiles/colmap_exe.dir/build.make:131: src/exe/colmap] Error 1
make[1]: *** [CMakeFiles/Makefile2:874: src/exe/CMakeFiles/colmap_exe.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Desktop (please complete the following information):

  • OS: Ubuntu 20.04.1 LTS
  • CUDA: 10.0
  • gcc 7, g++ 7
@jiadingfang
Copy link
Author

problem solved, see #188 (comment)

@jiadingfang
Copy link
Author

After using the conda uninstalling libtiff suggestion, the compile can go through. But the colmap gui still cannot work and always shows a black screen and showing error messages in the terminal as

QOpenGLWidget: Failed to create context
QOpenGLWidget: Failed to create context
qt.qpa.backingstore: composeAndFlush: QOpenGLContext creation failed
qt.qpa.backingstore: composeAndFlush: makeCurrent() failed

@jiadingfang jiadingfang reopened this Dec 16, 2020
@jiadingfang
Copy link
Author

install the correct Nvidia driver and restart should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant