sweeneychris / TheiaSfM

An open source library for multiview geometry and structure from motion
Other
898 stars 280 forks source link

Error compiling Theia (files not found) #130

Closed jwingnut closed 5 years ago

jwingnut commented 7 years ago

I'm compiling on Ubuntu 16.04.

Following the instructions I get here and it fails:

make -j4
[  1%] Building CXX object CMakeFiles/theia.dir/image/descriptor/sift_descriptor.o
[  1%] Building CXX object CMakeFiles/theia.dir/image/descriptor/akaze_descriptor.o
[  2%] Building CXX object CMakeFiles/theia.dir/image/descriptor/descriptor_extractor.o
[  3%] Building CXX object CMakeFiles/theia.dir/image/descriptor/create_descriptor_extractor.o
/media/jw/46119b5d-08bd-4486-8e48-7410918034c8/github/new/TheiaSfM/src/theia/image/descriptor/akaze_descriptor.cc:35:53: fatal error: theia/image/descriptor/akaze_descriptor.h: No such file or directory
compilation terminated.
CMakeFiles/theia.dir/build.make:62: recipe for target 'CMakeFiles/theia.dir/image/descriptor/akaze_descriptor.o' failed
make[2]: *** [CMakeFiles/theia.dir/image/descriptor/akaze_descriptor.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/media/jw/46119b5d-08bd-4486-8e48-7410918034c8/github/new/TheiaSfM/src/theia/image/descriptor/sift_descriptor.cc:35:52: fatal error: theia/image/descriptor/sift_descriptor.h: No such file or directory
compilation terminated.
/media/jw/46119b5d-08bd-4486-8e48-7410918034c8/github/new/TheiaSfM/src/theia/image/descriptor/descriptor_extractor.cc:35:57: fatal error: theia/image/descriptor/descriptor_extractor.h: No such file or directory
compilation terminated.
CMakeFiles/theia.dir/build.make:134: recipe for target 'CMakeFiles/theia.dir/image/descriptor/sift_descriptor.o' failed
make[2]: *** [CMakeFiles/theia.dir/image/descriptor/sift_descriptor.o] Error 1
CMakeFiles/theia.dir/build.make:110: recipe for target 'CMakeFiles/theia.dir/image/descriptor/descriptor_extractor.o' failed
make[2]: *** [CMakeFiles/theia.dir/image/descriptor/descriptor_extractor.o] Error 1
/media/jw/46119b5d-08bd-4486-8e48-7410918034c8/github/new/TheiaSfM/src/theia/image/descriptor/create_descriptor_extractor.cc:35:64: fatal error: theia/image/descriptor/create_descriptor_extractor.h: No such file or directory
compilation terminated.
CMakeFiles/theia.dir/build.make:86: recipe for target 'CMakeFiles/theia.dir/image/descriptor/create_descriptor_extractor.o' failed
make[2]: *** [CMakeFiles/theia.dir/image/descriptor/create_descriptor_extractor.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/theia.dir/all' failed
make[1]: *** [CMakeFiles/theia.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

I checked and the files are there...

Not sure what I'm missing, maybe something simple. Ideas?

sweeneychris commented 7 years ago

Are you following the build instructions here: http://theia-sfm.org/building.html ?

jwingnut commented 7 years ago

Yes I'm following those instructions. Now I get to here:


[ 27%] Building CXX object src/theia/CMakeFiles/theia.dir/sfm/pose/four_point_relative_pose_partial_rotation.cc.o
/media/ssdu/Seagate_4TB_USB/github/TheiaSfM/src/theia/sfm/pose/four_point_relative_pose_partial_rotation.cc: In function ‘void theia::FourPointRelativePosePartialRotation(const Vector3d&, const Vector3d*, const Vector3d*, const Vector3d*, const Vector3d*, std::vector<Eigen::Quaternion<double>, std::allocator<Eigen::Quaternion<double> > >*, std::vector<Eigen::Matrix<double, 3, 1> >*)’:
/media/ssdu/Seagate_4TB_USB/github/TheiaSfM/src/theia/sfm/pose/four_point_relative_pose_partial_rotation.cc:151:42: error: ‘CHECK_DOUBLE_EQ’ was not declared in this scope
   CHECK_DOUBLE_EQ(axis.squaredNorm(), 1.0);
                                          ^
[ 27%] Building CXX object src/theia/CMakeFiles/theia.dir/sfm/pose/fundamental_matrix_util.cc.o
[ 27%] Building CXX object src/theia/CMakeFiles/theia.dir/sfm/pose/perspective_three_point.cc.o
[ 28%] Building CXX object src/theia/CMakeFiles/theia.dir/sfm/pose/seven_point_fundamental_matrix.cc.o
src/theia/CMakeFiles/theia.dir/build.make:2294: recipe for target 'src/theia/CMakeFiles/theia.dir/sfm/pose/four_point_relative_pose_partial_rotation.cc.o' failed
make[2]: *** [src/theia/CMakeFiles/theia.dir/sfm/pose/four_point_relative_pose_partial_rotation.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:2309: recipe for target 'src/theia/CMakeFiles/theia.dir/all' failed
make[1]: *** [src/theia/CMakeFiles/theia.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
jwingnut commented 7 years ago

After compiling ceres with glog theia compiles but fails one test: 35/93 Test #35: estimate_relative_pose_test ...........................***Failed 0.08 sec

jwingnut commented 7 years ago

After reading this comment I figured it might be something to do with the Eigen version (3.2.10), so I compiled and installed the latest (3.3.90), recompiled ceres to use the new eigen version.

However now theia won't compile, and I get this:


[  8%] Building CXX object libraries/statx/CMakeFiles/statx.dir/statx/distributions/evd/gpd_ceres.cc.o
/media/ssdu/Seagate_4TB_USB/github/TheiaSfM/libraries/akaze/src/nldiffusion_functions.cpp: In function ‘void libAKAZE::halfsample_image(const RowMatrixXf&, libAKAZE::RowMatrixXf&)’:
/media/ssdu/Seagate_4TB_USB/github/TheiaSfM/libraries/akaze/src/nldiffusion_functions.cpp:256:45: error: no match for ‘operator-=’ (operand types are ‘Eigen::internal::enable_if<true, Eigen::IndexedView<Eigen::Matrix<float, 1, -1>, Eigen::internal::SingleRange, double> >::type {aka Eigen::IndexedView<Eigen::Matrix<float, 1, -1>, Eigen::internal::SingleRange, double>}’ and ‘double’)
     y_kernel_mul(y_kernel_clamped_size - 1) -=
                                             ^
In file included from /usr/local/include/eigen3/Eigen/Core:438:0,
                 from /usr/local/include/eigen3/Eigen/Dense:1,
                 from /media/ssdu/Seagate_4TB_USB/github/TheiaSfM/libraries/akaze/src/convolution.h:38,
                 from /media/ssdu/Seagate_4TB_USB/github/TheiaSfM/libraries/akaze/src/nldiffusion_functions.cpp:28:
/usr/local/include/eigen3/Eigen/src/Core/MatrixBase.h:161:14: note: candidate: template<class OtherDerived> Derived& Eigen::MatrixBase<Derived>::operator-=(const Eigen::MatrixBase<OtherDerived>&) [with OtherDerived = OtherDerived; Derived = Eigen::IndexedView<Eigen::Matrix<float, 1, -1>, Eigen::internal::SingleRange, double>]
     Derived& operator-=(const MatrixBase<OtherDerived>& other);
              ^
/usr/local/include/eigen3/Eigen/src/Core/MatrixBase.h:161:14: note:   template argument deduction/substitution failed:
/media/ssdu/Seagate_4TB_USB/github/TheiaSfM/libraries/akaze/src/nldiffusion_functions.cpp:256:45: note:   mismatched types ‘const Eigen::MatrixBase<Derived>’ and ‘double’
     y_kernel_mul(y_kernel_clamped_size - 1) -=
                                             ^
In file included from /usr/local/include/eigen3/Eigen/Core:438:0,
                 from /usr/local/include/eigen3/Eigen/Dense:1,
                 from /media/ssdu/Seagate_4TB_USB/github/TheiaSfM/libraries/akaze/src/convolution.h:38,
                 from /media/ssdu/Seagate_4TB_USB/github/TheiaSfM/libraries/akaze/src/nldiffusion_functions.cpp:28:
/usr/local/include/eigen3/Eigen/src/Core/MatrixBase.h:479:46: note: candidate: template<class OtherDerived> Derived& Eigen::MatrixBase<Derived>::operator-=(const Eigen::ArrayBase<OtherDerived>&) [with OtherDerived = OtherDerived; Derived = Eigen::IndexedView<Eigen::Matrix<float, 1, -1>, Eigen::internal::SingleRange, double>]
     template<typename OtherDerived> Derived& operator-=(const ArrayBase<OtherDerived>& )
                                              ^
/usr/local/include/eigen3/Eigen/src/Core/MatrixBase.h:479:46: note:   template argument deduction/substitution failed:
/media/ssdu/Seagate_4TB_USB/github/TheiaSfM/libraries/akaze/src/nldiffusion_functions.cpp:256:45: note:   mismatched types ‘const Eigen::ArrayBase<Derived>’ and ‘double’
     y_kernel_mul(y_kernel_clamped_size - 1) -=
                                             ^
In file included from /usr/local/include/eigen3/Eigen/Core:437:0,
                 from /usr/local/include/eigen3/Eigen/Dense:1,
                 from /media/ssdu/Seagate_4TB_USB/github/TheiaSfM/libraries/akaze/src/convolution.h:38,
                 from /media/ssdu/Seagate_4TB_USB/github/TheiaSfM/libraries/akaze/src/nldiffusion_functions.cpp:28:
/usr/local/include/eigen3/Eigen/src/Core/DenseBase.h:293:14: note: candidate: template<class OtherDerived> Derived& Eigen::DenseBase<Derived>::operator-=(const Eigen::EigenBase<OtherDerived>&) [with OtherDerived = OtherDerived; Derived = Eigen::IndexedView<Eigen::Matrix<float, 1, -1>, Eigen::internal::SingleRange, double>]
     Derived& operator-=(const EigenBase<OtherDerived> &other);
              ^
/usr/local/include/eigen3/Eigen/src/Core/DenseBase.h:293:14: note:   template argument deduction/substitution failed:
/media/ssdu/Seagate_4TB_USB/github/TheiaSfM/libraries/akaze/src/nldiffusion_functions.cpp:256:45: note:   mismatched types ‘const Eigen::EigenBase<Derived>’ and ‘double’
     y_kernel_mul(y_kernel_clamped_size - 1) -=
                                             ^
/media/ssdu/Seagate_4TB_USB/github/TheiaSfM/libraries/akaze/src/nldiffusion_functions.cpp:267:47: error: no match for ‘operator-=’ (operand types are ‘Eigen::internal::enable_if<true, Eigen::IndexedView<Eigen::Matrix<float, 1, -1>, Eigen::internal::SingleRange, double> >::type {aka Eigen::IndexedView<Eigen::Matrix<float, 1, -1>, Eigen::internal::SingleRange, double>}’ and ‘double’)
       x_kernel_mul(x_kernel_clamped_size - 1) -=
                                               ^
In file included from /usr/local/include/eigen3/Eigen/Core:438:0,
                 from /usr/local/include/eigen3/Eigen/Dense:1,
                 from /media/ssdu/Seagate_4TB_USB/github/TheiaSfM/libraries/akaze/src/convolution.h:38,
                 from /media/ssdu/Seagate_4TB_USB/github/TheiaSfM/libraries/akaze/src/nldiffusion_functions.cpp:28:
/usr/local/include/eigen3/Eigen/src/Core/MatrixBase.h:161:14: note: candidate: template<class OtherDerived> Derived& Eigen::MatrixBase<Derived>::operator-=(const Eigen::MatrixBase<OtherDerived>&) [with OtherDerived = OtherDerived; Derived = Eigen::IndexedView<Eigen::Matrix<float, 1, -1>, Eigen::internal::SingleRange, double>]
     Derived& operator-=(const MatrixBase<OtherDerived>& other);
              ^
/usr/local/include/eigen3/Eigen/src/Core/MatrixBase.h:161:14: note:   template argument deduction/substitution failed:
/media/ssdu/Seagate_4TB_USB/github/TheiaSfM/libraries/akaze/src/nldiffusion_functions.cpp:267:47: note:   mismatched types ‘const Eigen::MatrixBase<Derived>’ and ‘double’
       x_kernel_mul(x_kernel_clamped_size - 1) -=
                                               ^
In file included from /usr/local/include/eigen3/Eigen/Core:438:0,
                 from /usr/local/include/eigen3/Eigen/Dense:1,
                 from /media/ssdu/Seagate_4TB_USB/github/TheiaSfM/libraries/akaze/src/convolution.h:38,
                 from /media/ssdu/Seagate_4TB_USB/github/TheiaSfM/libraries/akaze/src/nldiffusion_functions.cpp:28:
/usr/local/include/eigen3/Eigen/src/Core/MatrixBase.h:479:46: note: candidate: template<class OtherDerived> Derived& Eigen::MatrixBase<Derived>::operator-=(const Eigen::ArrayBase<OtherDerived>&) [with OtherDerived = OtherDerived; Derived = Eigen::IndexedView<Eigen::Matrix<float, 1, -1>, Eigen::internal::SingleRange, double>]
     template<typename OtherDerived> Derived& operator-=(const ArrayBase<OtherDerived>& )
                                              ^
/usr/local/include/eigen3/Eigen/src/Core/MatrixBase.h:479:46: note:   template argument deduction/substitution failed:
/media/ssdu/Seagate_4TB_USB/github/TheiaSfM/libraries/akaze/src/nldiffusion_functions.cpp:267:47: note:   mismatched types ‘const Eigen::ArrayBase<Derived>’ and ‘double’
       x_kernel_mul(x_kernel_clamped_size - 1) -=
                                               ^
In file included from /usr/local/include/eigen3/Eigen/Core:437:0,
                 from /usr/local/include/eigen3/Eigen/Dense:1,
                 from /media/ssdu/Seagate_4TB_USB/github/TheiaSfM/libraries/akaze/src/convolution.h:38,
                 from /media/ssdu/Seagate_4TB_USB/github/TheiaSfM/libraries/akaze/src/nldiffusion_functions.cpp:28:
/usr/local/include/eigen3/Eigen/src/Core/DenseBase.h:293:14: note: candidate: template<class OtherDerived> Derived& Eigen::DenseBase<Derived>::operator-=(const Eigen::EigenBase<OtherDerived>&) [with OtherDerived = OtherDerived; Derived = Eigen::IndexedView<Eigen::Matrix<float, 1, -1>, Eigen::internal::SingleRange, double>]
     Derived& operator-=(const EigenBase<OtherDerived> &other);
              ^
/usr/local/include/eigen3/Eigen/src/Core/DenseBase.h:293:14: note:   template argument deduction/substitution failed:
/media/ssdu/Seagate_4TB_USB/github/TheiaSfM/libraries/akaze/src/nldiffusion_functions.cpp:267:47: note:   mismatched types ‘const Eigen::EigenBase<Derived>’ and ‘double’
       x_kernel_mul(x_kernel_clamped_size - 1) -=
                                               ^
libraries/akaze/CMakeFiles/akaze.dir/build.make:134: recipe for target 'libraries/akaze/CMakeFiles/akaze.dir/src/nldiffusion_functions.cpp.o' failed
make[2]: *** [libraries/akaze/CMakeFiles/akaze.dir/src/nldiffusion_functions.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[  8%] Linking CXX static library ../../lib/libstatx.a
[  8%] Built target statx
CMakeFiles/Makefile2:333: recipe for target 'libraries/akaze/CMakeFiles/akaze.dir/all' failed
make[1]: *** [libraries/akaze/CMakeFiles/akaze.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
jwingnut commented 7 years ago

I'll try Eigen 3.2.8 based on this comment. However this leads to the same error during the make test command. Specifically error #35 estimate_relative_pose_test.

Is there an Eigen version that works?

sweeneychris commented 7 years ago

I think something is terribly wrong with your setup -- it seems that your build is not finding the include directories properly. This line tells a lot:

four_point_relative_pose_partial_rotation.cc:151:42: error: ‘CHECK_DOUBLE_EQ’ was not declared in this scope CHECK_DOUBLE_EQ(axis.squaredNorm(), 1.0);

The command for that line is provided in glog/logging.h which is clearly included at the top of the file. When you run cmake do you have any errors or does it output a success?

Any version of Eigen > 3.2 works with Theia. It has been extensively tested on linux and mac on several different machines.

jwingnut commented 7 years ago

The only things that seem off are that some cmake configuration files were not found, are they needed? I have compiled most of the dependencies in their own directories below the theia source directory, eg. github/gflags/build.

However, like I mentioned, theia compiles fine when I don't use the latest version of eigen. So far eigen 3.2.8 and 3.2.10 both allow theia to compile completely, but both induce an error in make test: estimate_relative_pose_test.

The output of gcc include path is:

echo | gcc -E -Wp,-v -
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/5/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-linux-gnu/5/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "<stdin>"

cmake output is below:

cmake ..
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- 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/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Eigen: /usr/local/include/eigen3 (found suitable version "3.2.8", minimum required is "3.2.0") 
-- Found Eigen version 3.2.8: /usr/local/include/eigen3
-- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
-- Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
-- Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
-- Performing Test GFLAGS_IN_GOOGLE_NAMESPACE
-- Performing Test GFLAGS_IN_GOOGLE_NAMESPACE - Success
-- Found Gflags: /usr/include  
-- Found Google Flags: /usr/include in namespace: google
-- Check for Google Log
-- Found Glog: /usr/local/include  
-- Found Google Logging: /usr/local/include
-- Check for Ceres
-- Found required Ceres dependency: Eigen version 3.2.8 in /usr/local/include/eigen3
-- Found required Ceres dependency: glog
-- Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
-- Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
-- Found required Ceres dependency: gflags
-- Found Ceres version: 1.12.0 installed in: /usr/local with components: [LAPACK, SuiteSparse, SparseLinearAlgebraLibrary, SchurSpecializations, OpenMP]
-- Found Ceres: /usr/local/include;/usr/local/include/eigen3;/usr/local/include;/usr/include
-- Check for OpenImageIO
-- Found OpenImageIO: /usr/local/include  
-- Found OpenImageIO: /usr/local/include
-- Found Threads: TRUE  
-- A library with BLAS API found.
-- Found AMD library: /usr/lib/x86_64-linux-gnu/libamd.so
-- Found AMD header in: /usr/include/suitesparse
-- Found CAMD library: /usr/lib/x86_64-linux-gnu/libcamd.so
-- Found CAMD header in: /usr/include/suitesparse
-- Found COLAMD library: /usr/lib/x86_64-linux-gnu/libcolamd.so
-- Found COLAMD header in: /usr/include/suitesparse
-- Found CCOLAMD library: /usr/lib/x86_64-linux-gnu/libccolamd.so
-- Found CCOLAMD header in: /usr/include/suitesparse
-- Found CHOLMOD library: /usr/lib/x86_64-linux-gnu/libcholmod.so
-- Found CHOLMOD header in: /usr/include/suitesparse
-- Found SuiteSparseQR library: /usr/lib/x86_64-linux-gnu/libspqr.so
-- Found SuiteSparseQR header in: /usr/include/suitesparse
-- Did not find Intel TBB library, assuming SuiteSparseQR was not compiled with TBB.
-- Found SuiteSparse_config library: /usr/lib/x86_64-linux-gnu/libsuitesparseconfig.so
-- Found SuiteSparse_config header in: /usr/include/suitesparse
-- Adding librt: /usr/lib/x86_64-linux-gnu/librt.so to SuiteSparse_config libraries (required on Linux & Unix [not OSX] if SuiteSparse is compiled with timing).
-- Did not find METIS library (optional SuiteSparse dependency)
-- Found SuiteSparse: TRUE (found version "4.4.6") 
-- Found SuiteSparse 4.4.6
-- Found PythonInterp: /usr/bin/python (found version "2.7.12") 
-- Found Eigen: /usr/local/include/eigen3 (found version "3.2.8") 
-- Found Eigen version 3.2.8: /usr/local/include/eigen3
-- Building with OpenMP.
-- Found JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so  
-- Building without OpenMP.
-- No build type specified; defaulting to CMAKE_BUILD_TYPE=Release.
-- Performing Test COMPILER_HAS_CXX11_FLAG
-- Performing Test COMPILER_HAS_CXX11_FLAG - Success
-- Found HDF5: /usr/lib/x86_64-linux-gnu/hdf5/serial/lib/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "1.8.16") 
-- Found GTest: /usr/lib/libgtest.a  
-- Found OpenMP: -fopenmp  
-- Install prefix: /usr/local
-- Build type: Release
-- Building C bindings: OFF
-- Building examples: OFF
-- Building tests: OFF
-- Building documentation: OFF
-- Building python bindings: OFF
-- Building matlab bindings: OFF
-- Building CUDA library: OFF
-- Using OpenMP support: ON
-- Using MPI support: OFF
-- CMAKE_CXX_FLAGS:  -std=c++11
-- Found Eigen version 3.2.8: /usr/local/include/eigen3
-- CMAKE_CXX_FLAGS:  -std=c++11
-- Default Install prefix: /usr/local/
-- Found Eigen version 3.2.8: /usr/local/include/eigen3
-- Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
-- Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
-- Check for Google ceres-solver
-- Found required Ceres dependency: Eigen version 3.2.8 in /usr/local/include/eigen3
-- Found required Ceres dependency: glog
-- Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
-- Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
-- Found required Ceres dependency: gflags
-- Found Ceres version: 1.12.0 installed in: /usr/local with components: [LAPACK, SuiteSparse, SparseLinearAlgebraLibrary, SchurSpecializations, OpenMP]
-- Found Ceres headers in: /usr/local/include;/usr/local/include/eigen3;/usr/local/include;/usr/include;/usr/local/include;/usr/local/include/eigen3;/usr/local/include;/usr/include;/usr/include
-- A library with BLAS API found.
-- A library with BLAS API found.
-- A library with LAPACK API found.
-- Check for Optimo
-- Found optimo headers: /media/ssdu/Seagate_4TB_USB/github/TheiaSfM/libraries/optimo
-- Performing Test THEIA_HAVE_THREAD_LOCAL_STORAGE
-- Performing Test THEIA_HAVE_THREAD_LOCAL_STORAGE - Success
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so  
-- Found GLUT: /usr/lib/x86_64-linux-gnu/libglut.so  
-- Found GLUT: /usr/include
-- Configuring done
-- Generating done
-- Build files have been written to: /media/ssdu/Seagate_4TB_USB/github/TheiaSfM/theia-build
sweeneychris commented 7 years ago

The Cmake output looks fine. Perhaps the unit test is getting unlucky with a bad random number. Could you provide the output of running:

./bin/estimate_relative_pose_test --logtostderr --v=2

This should spit out a bunch of logs indicating what part of the unit test is failing. If the values are close to the thresholds then you're probably fine to run things. But if they're wildly off or some nan/segfaults are occuring then there is something more significant going on.

jwingnut commented 7 years ago

Sure thing, output is below:

./bin/estimate_relative_pose_test --logtostderr --v=2
I0405 12:04:13.997215  8670 test_main.cc:48] Running tests with logs enabled.
[==========] Running 4 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 4 tests from EstimateRelativePose
[ RUN      ] EstimateRelativePose.AllInliersNoNoise
/media/ssdu/Seagate_4TB_USB/github/TheiaSfM/src/theia/sfm/estimators/estimate_relative_pose_test.cc:133: Failure
Expected: (RadToDeg(rotation_loop.angle())) < (tolerance_degrees), actual: 0.14771 vs 0.0001
[  FAILED  ] EstimateRelativePose.AllInliersNoNoise (23 ms)
[ RUN      ] EstimateRelativePose.AllInliersWithNoise
[       OK ] EstimateRelativePose.AllInliersWithNoise (23 ms)
[ RUN      ] EstimateRelativePose.OutliersNoNoise
[       OK ] EstimateRelativePose.OutliersNoNoise (15 ms)
[ RUN      ] EstimateRelativePose.OutliersWithNoise
[       OK ] EstimateRelativePose.OutliersWithNoise (14 ms)
[----------] 4 tests from EstimateRelativePose (75 ms total)

[----------] Global test environment tear-down
[==========] 4 tests from 1 test case ran. (75 ms total)
[  PASSED  ] 3 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] EstimateRelativePose.AllInliersNoNoise

 1 FAILED TEST
jwingnut commented 7 years ago

Doesn't it seem odd that when I use the latest eigen (3.3.90) theia fails to compile?

At that point is when I get this error:


four_point_relative_pose_partial_rotation.cc:151:42: error: ‘CHECK_DOUBLE_EQ’ was not declared in this scope
CHECK_DOUBLE_EQ(axis.squaredNorm(), 1.0);

Does glog need to be recompiled after I update eigen? So far I have only tried to recompile the ceres dependency after eigen. Maybe I should try compiling eigen first and recompiling the rest of the dependencies and only then compiling theia?

sweeneychris commented 7 years ago

Is 3.3.90 the latest stable release or the master branch of Eigen? I would recommend using the latest stable.

This is very bizarre that this line is failing. Of Theia's external dependencies only Ceres requires Eigen, so you're doing exactly the correct thing.

My best guess is that one of the Eigen files that is #include must invalidate this glog command somehow. But it's not obvious to me why that would be the case...

jwingnut commented 7 years ago

I think it's just the master branch. I'll check how it goes with the latest stable version and let you know what happens.

On Apr 5, 2017, at 3:44 PM, Chris Sweeney notifications@github.com wrote:

Is 3.3.90 the latest stable release or the master branch of Eigen? I would recommend using the latest stable.

This is very bizarre that this line is failing. Of Theia's external dependencies only Ceres requires Eigen, so you're doing exactly the correct thing.

My best guess is that one of the Eigen files that is #include must invalidate this glog command somehow. But it's not obvious to me why that would be the case...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

jwingnut commented 7 years ago

Using this line: hg clone https://bitbucket.org/eigen/eigen#3.3 Gave me version 3.3.3 which ended up fixing the problem. Thanks for the help figuring that out.

goetzmoritz commented 7 years ago

But it did not fix it for me. I cloned the latest eigen (3.3.3) and built ceres with that but I still get that very same build-error on ubuntu 16.04

sweeneychris commented 7 years ago

@goetzmoritz is it only the CHECK_DOUBLE_EQ lines that are causing issue? If you comment them out will the library build?

goetzmoritz commented 7 years ago

I was able to get past that error by commenting CHECK_DOUBLE_EQ out. It popped up in another two occurances which I commented out, too.

Then this appeared: /home/ubuntu/TheiaSfM/src/theia/sfm/view_graph/view_graph.cc: In member function ‘void theia::ViewGraph::AddEdge(theia::ViewId, theia::ViewId, const theia::TwoViewInfo&)’: /home/ubuntu/TheiaSfM/src/theia/sfm/view_graph/view_graph.cc:114:53: error: ‘DLOG_IF’ was not declared in this scope DLOGIF(WARNING, ContainsKey(edges, view_id_pair)) ^ src/theia/CMakeFiles/theia.dir/build.make:2990: recipe for target 'src/theia/CMakeFiles/theia.dir/sfm/view_graph/view_graph.cc.o' failed make[2]: [src/theia/CMakeFiles/theia.dir/sfm/view_graph/view_graph.cc.o] Error 1 make[2]: Waiting for unfinished jobs.... CMakeFiles/Makefile2:2309: recipe for target 'src/theia/CMakeFiles/theia.dir/all' failed make[1]: [src/theia/CMakeFiles/theia.dir/all] Error 2 Makefile:160: recipe for target 'all' failed make: [all] Error 2

Which comes probably from the google-logging-thing? I installed it with apt-get and did not compile it myself.

jwingnut commented 7 years ago

Yeah I ran into that too. I recall that there are instructions on how to compile glog from the -dev installed by apt. You compile and then link to your library or include folder.

On Apr 9, 2017, at 12:30 PM, goetz notifications@github.com wrote:

I was able to get past that error by commenting CHECK_DOUBLE_EQ out. It popped up in another two occurances which I commented out, too.

Then this appeared: /home/ubuntu/TheiaSfM/src/theia/sfm/view_graph/view_graph.cc: In member function ‘void theia::ViewGraph::AddEdge(theia::ViewId, theia::ViewId, const theia::TwoViewInfo&)’: /home/ubuntu/TheiaSfM/src/theia/sfm/view_graph/view_graph.cc:114:53: error: ‘DLOG_IF’ was not declared in this scope DLOGIF(WARNING, ContainsKey(edges, view_id_pair)) ^ src/theia/CMakeFiles/theia.dir/build.make:2990: recipe for target 'src/theia/CMakeFiles/theia.dir/sfm/view_graph/view_graph.cc.o' failed make[2]: [src/theia/CMakeFiles/theia.dir/sfm/view_graph/view_graph.cc.o] Error 1 make[2]: Waiting for unfinished jobs.... CMakeFiles/Makefile2:2309: recipe for target 'src/theia/CMakeFiles/theia.dir/all' failed make[1]: [src/theia/CMakeFiles/theia.dir/all] Error 2 Makefile:160: recipe for target 'all' failed make: [all] Error 2

Which comes probably from the google-logging-thing? I installed it with apt-get and did not compile it myself.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.

sweeneychris commented 5 years ago

closing due to inactivity