compilation fails (Linux)

482 views
Skip to first unread message

LegoVogeL

unread,
Feb 26, 2017, 12:13:30 PM2/26/17
to COLMAP
I have all dependencies installed: cmake boost freeimage google-glog gflags glew freeglut qt5-base libxmu libxi ceres-solver cuda base-devel

'cmake' returns no error but after 'make' it stops:

Scanning dependencies of target util

Scanning dependencies of target estimators

Scanning dependencies of target base

[  0%] Building CXX object src/util/CMakeFiles/util.dir/camera_specs.cc.o

[  0%] Building CXX object src/estimators/CMakeFiles/estimators.dir/coordinate_frame.cc.o

[  0%] Building CXX object src/base/CMakeFiles/base.dir/camera.cc.o

[  0%] Building CXX object src/util/CMakeFiles/util.dir/math.cc.o

[  1%] Building CXX object src/util/CMakeFiles/util.dir/misc.cc.o

[  1%] Building CXX object src/base/CMakeFiles/base.dir/camera_database.cc.o

[  1%] Building CXX object src/util/CMakeFiles/util.dir/option_manager.cc.o

[  1%] Building CXX object src/base/CMakeFiles/base.dir/camera_models.cc.o

[  1%] Building CXX object src/estimators/CMakeFiles/estimators.dir/epnp.cc.o

[  1%] Building CXX object src/base/CMakeFiles/base.dir/camera_rig.cc.o

[  1%] Building CXX object src/base/CMakeFiles/base.dir/database.cc.o

[  3%] Building CXX object src/base/CMakeFiles/base.dir/database_cache.cc.o

/home/alexander/Dokumente/colmap/src/colmap/src/base/database_cache.cc: In Elementfunktion »void colmap::DatabaseCac
he
::Load(const colmap::Database&, size_t, bool, const std::set<std::__cxx11::basic_string<char> >&)«:

/home/alexander/Dokumente/colmap/src/colmap/src/base/database_cache.cc:55:16: Warnung: types may not be defined in a
 
for-range-declaration

     
for (const class Camera& camera : cameras) {

               
^~~~~

/home/alexander/Dokumente/colmap/src/colmap/src/base/database_cache.cc:130:16: Warnung: types may not be defined in
a
for-range-declaration

     
for (const class Image& image : images) {

               
^~~~~

[  3%] Building CXX object src/base/CMakeFiles/base.dir/essential_matrix.cc.o

[  3%] Building CXX object src/util/CMakeFiles/util.dir/bitmap.cc.o

[  3%] Building CXX object src/util/CMakeFiles/util.dir/random.cc.o

[  3%] Building CXX object src/util/CMakeFiles/util.dir/string.cc.o

[  3%] Building CXX object src/util/CMakeFiles/util.dir/timer.cc.o

[  3%] Building CXX object src/base/CMakeFiles/base.dir/feature.cc.o

[  5%] Building CXX object src/util/CMakeFiles/util.dir/threading.cc.o

[  5%] Building CXX object src/util/CMakeFiles/util.dir/opengl_utils.cc.o

[  5%] Building CXX object src/base/CMakeFiles/base.dir/feature_extraction.cc.o

[  5%] Building CXX object src/util/CMakeFiles/util.dir/logging.cc.o

[  5%] Linking CXX static library libutil.a

[  5%] Built target util

Scanning dependencies of target flann

[  5%] Building CXX object src/ext/FLANN/CMakeFiles/flann.dir/flann.cpp.o

[  5%] Building C object src/ext/FLANN/CMakeFiles/flann.dir/ext/lz4.c.o

[  6%] Building C object src/ext/FLANN/CMakeFiles/flann.dir/ext/lz4hc.c.o

[  6%] Linking CXX static library libflann.a

[  6%] Built target flann

Scanning dependencies of target lsd

[  6%] Building C object src/ext/LSD/CMakeFiles/lsd.dir/lsd.c.o

[  6%] Linking C static library liblsd.a

[  6%] Built target lsd

[  8%] Building CXX object src/estimators/CMakeFiles/estimators.dir/essential_matrix.cc.o

[ 10%] Building NVCC (Device) object src/ext/PBA/CMakeFiles/pba.dir/pba_generated_ProgramCU.cu.o

[ 10%] Building CXX object src/base/CMakeFiles/base.dir/feature_matching.cc.o

CMake Warning (dev) at pba_generated_ProgramCU.cu.o.RelWithDebInfo.cmake:81:

 
Syntax Warning in cmake code at column 52

 
Argument not separated from preceding token by whitespace.

This warning is for project developers.  Use -Wno-dev to suppress it.

nvcc fatal  
: Stray '"' character

CMake Error at pba_generated_ProgramCU.cu.o.RelWithDebInfo.cmake:222 (message):

 
Error generating

 
/home/alexander/Dokumente/colmap/src/colmap/build/src/ext/PBA/CMakeFiles/pba.dir//./pba_generated_ProgramCU.cu.o

make
[2]: *** [src/ext/PBA/CMakeFiles/pba.dir/build.make:65: src/ext/PBA/CMakeFiles/pba.dir/pba_generated_ProgramCU.c
u
.o] Fehler 1

make
[1]: *** [CMakeFiles/Makefile2:3757: src/ext/PBA/CMakeFiles/pba.dir/all] Fehler 2

make
[1]: *** Es wird auf noch nicht beendete Prozesse gewartet....

[ 10%] Building CXX object src/estimators/CMakeFiles/estimators.dir/fundamental_matrix.cc.o

In file included from /home/alexander/Dokumente/colmap/src/colmap/src/./ext/FLANN/util/params.h:33:0,

                 
from /home/alexander/Dokumente/colmap/src/colmap/src/./ext/FLANN/flann.hpp:42,

                 
from /home/alexander/Dokumente/colmap/src/colmap/src/./retrieval/visual_index.h:23,

                 
from /home/alexander/Dokumente/colmap/src/colmap/src/base/feature_matching.cc:32:

/home/alexander/Dokumente/colmap/src/colmap/src/./ext/FLANN/util/any.h: In Elementfunktion »virtual void flann::anyi
mpl
::big_any_policy<T>::static_delete(void**)«:

/home/alexander/Dokumente/colmap/src/colmap/src/./ext/FLANN/util/any.h:81:9: Warnung: this »if« clause does not guar
d
... [-Wmisleading-indentation]

         
if (* x) delete (* reinterpret_cast<T**>(x)); *x = NULL;

         
^~

/home/alexander/Dokumente/colmap/src/colmap/src/./ext/FLANN/util/any.h:81:55: Anmerkung: ...this statement, but the
latter
is misleadingly indented as if it is guarded by the »if«

         
if (* x) delete (* reinterpret_cast<T**>(x)); *x = NULL;

                                                       
^

[ 10%] Building CXX object src/base/CMakeFiles/base.dir/gps.cc.o

[ 11%] Building CXX object src/base/CMakeFiles/base.dir/homography_matrix.cc.o

[ 11%] Building CXX object src/base/CMakeFiles/base.dir/image.cc.o

[ 11%] Building CXX object src/base/CMakeFiles/base.dir/line.cc.o

[ 11%] Building CXX object src/estimators/CMakeFiles/estimators.dir/gp3p.cc.o

[ 11%] Building CXX object src/base/CMakeFiles/base.dir/point2d.cc.o

[ 11%] Building CXX object src/estimators/CMakeFiles/estimators.dir/homography_matrix.cc.o

[ 11%] Building CXX object src/base/CMakeFiles/base.dir/point3d.cc.o

[ 11%] Building CXX object src/base/CMakeFiles/base.dir/polynomial.cc.o

[ 13%] Building CXX object src/base/CMakeFiles/base.dir/pose.cc.o

[ 13%] Building CXX object src/base/CMakeFiles/base.dir/projection.cc.o

[ 13%] Building CXX object src/estimators/CMakeFiles/estimators.dir/p3p.cc.o

[ 13%] Building CXX object src/base/CMakeFiles/base.dir/reconstruction.cc.o

[ 13%] Building CXX object src/base/CMakeFiles/base.dir/reconstruction_manager.cc.o

[ 13%] Building CXX object src/estimators/CMakeFiles/estimators.dir/pose.cc.o

[ 13%] Building CXX object src/base/CMakeFiles/base.dir/scene_graph.cc.o

[ 13%] Building CXX object src/base/CMakeFiles/base.dir/similarity_transform.cc.o

[ 15%] Building CXX object src/base/CMakeFiles/base.dir/track.cc.o

[ 16%] Building CXX object src/estimators/CMakeFiles/estimators.dir/triangulation.cc.o

[ 16%] Building CXX object src/base/CMakeFiles/base.dir/triangulation.cc.o

[ 16%] Building CXX object src/base/CMakeFiles/base.dir/undistortion.cc.o

[ 16%] Building CXX object src/estimators/CMakeFiles/estimators.dir/two_view_geometry.cc.o

[ 16%] Building CXX object src/base/CMakeFiles/base.dir/visibility_pyramid.cc.o

[ 16%] Building CXX object src/base/CMakeFiles/base.dir/warp.cc.o

[ 16%] Building CXX object src/estimators/CMakeFiles/estimators.dir/utils.cc.o

[ 16%] Linking CXX static library libbase.a

[ 16%] Linking CXX static library libestimators.a

[ 16%] Built target base

[ 16%] Built target estimators

make
: *** [Makefile:139: all] Error 2



CMakeError.log

LegoVogeL

unread,
Feb 26, 2017, 12:18:28 PM2/26/17
to COLMAP
I have cloned the master git branch

git clone https://github.com/colmap/colmap


Johannes Schönberger

unread,
Feb 26, 2017, 2:03:07 PM2/26/17
to col...@googlegroups.com
Which CMake and CUDA version?

> On Feb 26, 2017, at 6:18 PM, LegoVogeL <alexande...@gmail.com> wrote:
>
> I have cloned the master git branch
>
> git clone https://github.com/colmap/colmap
>
>
>
> --
> 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/d701269e-3283-4910-b8c7-e0efcc8341c2%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

LegoVogeL

unread,
Feb 26, 2017, 2:09:07 PM2/26/17
to COLMAP
CMake 3.7.2
CUDA 8.0.44

Johannes Schönberger

unread,
Feb 27, 2017, 3:47:01 AM2/27/17
to col...@googlegroups.com
Can you downgrade to CMake 3.6.x?

If this works, could you please also send the entire output of ``make VERBOSE=1`` (for CMake 3.7.x and 3.6.x)

Thanks in advance!

> On Feb 26, 2017, at 8:09 PM, LegoVogeL <alexande...@gmail.com> wrote:
>
> CMake 3.7.2
> CUDA 8.0.44
>
> --
> 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/02f9a2ce-5cab-4f53-947f-0bc636b3ac79%40googlegroups.com.

LegoVogeL

unread,
Feb 27, 2017, 11:03:49 AM2/27/17
to COLMAP


Am Montag, 27. Februar 2017 09:47:01 UTC+1 schrieb Johannes Schönberger:
Can you downgrade to CMake 3.6.x?

If this works, could you please also send the entire output of ``make VERBOSE=1`` (for CMake 3.7.x and 3.6.x)

Thanks in advance!

I found the problem, I had to disable cuda. Without it cmake 3.6.x and cmake 3.7 works.
My problem was that cmake uses gcc 6.x compiler as default and cuda only works with gcc 5.x.

The only problem is now that cmake don't accepts gcc 5.

cmake .. -DCMAKE_CXX_COMPILER=/usr/bin/g++-5 -DCMAKE_CC_COMPILER=/usr/bin/gcc-5       # I type this in the terminal


-- The C compiler identification is GNU 6.3.1                                         # cmake will still use gcc6 for C files and that's what I don't want

-- The CXX compiler identification is GNU 5.4.0                                       # but accepts gcc5 for C++ files

-- Check for working C compiler: /usr/bin/cc

-- Check for working C compiler: /usr/bin/cc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Detecting C compile features

-- Detecting C compile features - done

-- Check for working CXX compiler: /usr/bin/g++-5

-- Check for working CXX compiler: /usr/bin/g++-5 -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done




LegoVogeL

unread,
Feb 27, 2017, 12:54:22 PM2/27/17
to COLMAP
I had success now to compile cuda with gcc 5 but it gcc5 fails at some boost libraries.

What works:
cmake 3.6.x + gcc6 without cuda
cmake 3.7.x + gcc6 without cuda

What dosn't work:
cmake 3.6.x + gcc6 with cuda
cmake 3.7.x + gcc6 with cuda
cmake 3.6.x + gcc5 fails on boost
cmake 3.7.x + gcc5 with cuda
cmake3.6+gcc5 log
cmake3.7+gcc5 log

LegoVogeL

unread,
Feb 28, 2017, 2:53:34 PM2/28/17
to COLMAP
I got a new record with cuda enabled 78%
And I found out that cmake 3.7 don't likes cuda and compiling only works with cmake 3.6
i set my compilers to:
export CXX=/usr/bin/g++      # C++ code with gcc6
export CC=/usr/bin/gcc-5     # C code with gcc5

I there any possible way to compile colmap with cuda on linux?
cmake3.6+gcc5+g++6+cudaEnabled make log
CMakeError.log
CMakeOutput.log

LegoVogeL

unread,
Feb 28, 2017, 3:02:48 PM2/28/17
to COLMAP
The logs with cmake 3.7
cmake3.7+gcc5+g++6+cudaEnabled make log
CMakeError.log
CMakeOutput.log

Johannes Schönberger

unread,
Mar 21, 2017, 12:41:48 PM3/21/17
to col...@googlegroups.com
This should be fixed in the latest commit. Thanks for reporting.

Cheers,
Johannes

> On Feb 28, 2017, at 9:02 PM, LegoVogeL <alexande...@gmail.com> wrote:
>
> The logs with cmake 3.7
>
> --
> 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/d161ce38-caa5-45d4-9d40-67c10aed657f%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> <cmake3.7+gcc5+g++6+cudaEnabled make log><CMakeError.log><CMakeOutput.log>

LegoVogeL

unread,
Mar 25, 2017, 11:08:47 AM3/25/17
to COLMAP
I hadn't real success with the new patch.

I get still the same error just a bit later in the compiling process.
It seems it doesn't matter any more if I use cmake 3.6 or 3.7 because the output of both versions looks identical.
I updated cuda also recently to 8.0.61.
cmake3.6 with cuda enabled.log.txt
Reply all
Reply to author
Forward
0 new messages