mdaiter / openMVG

openMVG with a LATCH descriptor, an ORB descriptor, DEEP descriptors from the cvpr15compare repo, PNNet/Torch loader and a GPU-based L2 matcher integrated

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build fails on Ubuntu 15.10

tzumby opened this issue · comments

commented

I'm trying to compile the project but I can't figure out what's missing. I included the outputs of CmakeError and the cmake. From what I can tell in the main output there's no required library missing.

Thanks in advance!

cmake -DCMAKE_BUILD_TYPE=RELEASE . ../openMVG/src/
-- Optimizing for the host architecture using -march=native
-- Checking for C++11 compiler
-- Checking for C++11 compiler - available
-- Did not find MOSEK header
-- Did not find MOSEK library
-- Could not find mosek library on this machine.
-- Eigen 3.2.8 found (include: /home/tzumby/openMVG/src/third_party/eigen)
-- Failed to find Ceres - Found Eigen dependency, but the version of Eigen found (3.2.8) does not exactly match the version of Eigen Ceres was compiled with (3.2.5). This can cause subtle bugs by triggering violations of the One Definition Rule. See the Wikipedia article http://en.wikipedia.org/wiki/One_Definition_Rule for more details
-- Flann 1.8.4 found (include: /home/tzumby/openMVG/src/third_party/flann/src/cpp/flann)
-- CoinUtils 2.9.3 found (include: /home/tzumby/openMVG/src/dependencies/osi_clp/CoinUtils/src)
-- Clp 1.15.11 found (include: /home/tzumby/openMVG/src/dependencies/osi_clp/Clp/src)
-- Osi 0.106.10 found (include: /home/tzumby/openMVG/src/dependencies/osi_clp/Osi/src/Osi)
-- Lemon 1.3 found (include: /home/tzumby/openMVG/src/third_party/lemon/lemon)
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
-- Could NOT find ILOG (missing:  ILOG_CPLEX_LIBRARY ILOG_CPLEX_INCLUDE_DIR) 
-- Could NOT find COIN (missing:  COIN_INCLUDE_DIR COIN_CBC_LIBRARY COIN_CBC_SOLVER_LIBRARY COIN_CGL_LIBRARY COIN_CLP_LIBRARY COIN_COIN_UTILS_LIBRARY COIN_OSI_LIBRARY COIN_OSI_CBC_LIBRARY COIN_OSI_CLP_LIBRARY) 
-- Could NOT find SOPLEX (missing:  SOPLEX_LIBRARY SOPLEX_INCLUDE_DIR) 
CMake Warning (dev) at third_party/ceres-solver/CMakeLists.txt:40 (project):
  Policy CMP0048 is not set: project() command manages VERSION variables.
  Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The following variable(s) would be set to empty:

    Ceres_VERSION
    Ceres_VERSION_MAJOR
    Ceres_VERSION_MINOR
    Ceres_VERSION_PATCH
    Ceres_VERSION_TWEAK
This warning is for project developers.  Use -Wno-dev to suppress it.


   ===============================================================
   Ceres-solver configuration.
   ===============================================================
-- Eigen 3.2.8 found (include: /home/tzumby/openMVG/src/third_party/eigen)
-- Found Eigen version 3.2.8: /home/tzumby/openMVG/src/third_party/eigen

   ===============================================================
   Disabling the use of Eigen as a sparse linear algebra library.
   This does not affect the covariance estimation algorithm 
   which can still use the EIGEN_SPARSE_QR algorithm.
   ===============================================================

-- A library with BLAS API found.
-- Found LAPACK library: /usr/lib/liblapack.so;/usr/lib/libf77blas.so;/usr/lib/libatlas.so
-- Found BLAS library: /usr/lib/libf77blas.so;/usr/lib/libatlas.so
-- Building without SuiteSparse.
-- Found CXSparse in: ../cxsparse/Include, building with CXSparse.
-- Google Flags disabled; no tests or tools will be built!
-- Compiling minimal glog substitute into Ceres.
-- Using minimal glog substitute (include): internal/ceres/miniglog
-- Building with OpenMP.
-- Looking for C++ include unordered_map
-- Looking for C++ include unordered_map - found
-- Performing Test HAVE_UNORDERED_MAP_IN_STD_NAMESPACE
-- Performing Test HAVE_UNORDERED_MAP_IN_STD_NAMESPACE - Success
-- Found unordered_map/set in std namespace.
-- Looking for C++ include memory
-- Looking for C++ include memory - found
-- Performing Test HAVE_SHARED_PTR_IN_STD_NAMESPACE
-- Performing Test HAVE_SHARED_PTR_IN_STD_NAMESPACE - Success
-- Found shared_ptr in std namespace using <memory> header.
-- Building Ceres as a static library.
-- Enabling CERES_NO_SUITESPARSE in Ceres config.h
-- Enabling CERES_USE_OPENMP in Ceres config.h
-- Enabling CERES_HAVE_PTHREAD in Ceres config.h
-- Enabling CERES_HAVE_RWLOCK in Ceres config.h
-- Enabling CERES_STD_UNORDERED_MAP in Ceres config.h
-- Do not build any example.
   ===============================================================
   Ceres-solver configuration end.
   ===============================================================
-- 
-- Configured Eigen 3.2.8
-- 
CUDA_NVCC_FLAGS: -D_MWAITXINTRIN_H_INCLUDED -lineinfo -Xptxas -v -Xcompiler -fopenmp -use_fast_math -O3 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 --default-stream per-thread
CUDA_NVCC_FLAGS: -g -D_MWAITXINTRIN_H_INCLUDED -lineinfo -Xptxas -v -use_fast_math -O3 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35
-- Could NOT find Sphinx (missing:  SPHINX_EXECUTABLE) 
Sphinx need to be installed to generate the sphinx documentation
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
Doxygen need to be installed to generate the doxygen documentation


** OpenMVG version: 1.0.0
** Build Shared libs: OFF
** Build OpenMVG tests: OFF
** Build OpenMVG documentation: ON
** Build OpenMVG samples applications: ON
** Build OpenMVG openGL examples: OFF
** Enable code coverage generation: OFF
** Enable OpenMP parallelization: ON
** Build OpenCV+OpenMVG samples programs: OFF
** Use OpenCV SIFT features: OFF


-- EIGEN: 3.2.8 (internal)
-- CERES: 1.11.0 (internal)
-- FLANN: 1.8.4 (internal)
-- LIBTIFF: 4.0.3 (external)
-- LIBPNG: 1.2.51 (external)
-- LIBJPEG (external)
-- CLP: 1.15.11 (internal)
-- COINUTILS: 2.9.3 (internal)
-- OSI: 0.106.10 (internal)
-- LEMON: 1.3 (internal)


CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
HDF5_LIB
    linked by target "mih_cpu" in directory /home/tzumby/openMVG/src/openMVG/matching_image_collection/mih

-- Configuring incomplete, errors occurred!
See also "/home/tzumby/openMVG_build/CMakeFiles/CMakeOutput.log".
See also "/home/tzumby/openMVG_build/CMakeFiles/CMakeError.log".

CMakeError.log

Determining if the pthread_create exist failed with the following output:
Change Dir: /home/tzumby/openMVG_build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTryCompileExec120696853/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec120696853.dir/build.make CMakeFiles/cmTryCompileExec120696853.dir/build
make[1]: Entering directory '/home/tzumby/openMVG_build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/tzumby/openMVG_build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec120696853.dir/CheckSymbolExists.c.o
/usr/bin/cc   -march=native    -o CMakeFiles/cmTryCompileExec120696853.dir/CheckSymbolExists.c.o   -c /home/tzumby/openMVG_build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTryCompileExec120696853
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec120696853.dir/link.txt --verbose=1
/usr/bin/cc   -march=native     CMakeFiles/cmTryCompileExec120696853.dir/CheckSymbolExists.c.o  -o cmTryCompileExec120696853 -rdynamic 
CMakeFiles/cmTryCompileExec120696853.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x16): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTryCompileExec120696853.dir/build.make:88: recipe for target 'cmTryCompileExec120696853' failed
make[1]: *** [cmTryCompileExec120696853] Error 1
make[1]: Leaving directory '/home/tzumby/openMVG_build/CMakeFiles/CMakeTmp'
Makefile:117: recipe for target 'cmTryCompileExec120696853/fast' failed
make: *** [cmTryCompileExec120696853/fast] Error 2

File /home/tzumby/openMVG_build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/tzumby/openMVG_build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTryCompileExec105946427/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec105946427.dir/build.make CMakeFiles/cmTryCompileExec105946427.dir/build
make[1]: Entering directory '/home/tzumby/openMVG_build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/tzumby/openMVG_build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec105946427.dir/CheckFunctionExists.c.o
/usr/bin/cc   -march=native -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTryCompileExec105946427.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.2/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec105946427
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec105946427.dir/link.txt --verbose=1
/usr/bin/cc   -march=native -DCHECK_FUNCTION_EXISTS=pthread_create    CMakeFiles/cmTryCompileExec105946427.dir/CheckFunctionExists.c.o  -o cmTryCompileExec105946427 -rdynamic -lpthreads 
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTryCompileExec105946427.dir/build.make:88: recipe for target 'cmTryCompileExec105946427' failed
make[1]: *** [cmTryCompileExec105946427] Error 1
make[1]: Leaving directory '/home/tzumby/openMVG_build/CMakeFiles/CMakeTmp'
Makefile:117: recipe for target 'cmTryCompileExec105946427/fast' failed
make: *** [cmTryCompileExec105946427/fast] Error 2


Determining if the Q_WS_WIN exist failed with the following output:
Change Dir: /home/tzumby/openMVG_build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTryCompileExec1806688087/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec1806688087.dir/build.make CMakeFiles/cmTryCompileExec1806688087.dir/build
make[1]: Entering directory '/home/tzumby/openMVG_build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/tzumby/openMVG_build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building CXX object CMakeFiles/cmTryCompileExec1806688087.dir/CheckSymbolExists.cxx.o
/usr/bin/c++    -march=native --std=c++11 -fopenmp  -I/usr/include/qt4    -o CMakeFiles/cmTryCompileExec1806688087.dir/CheckSymbolExists.cxx.o -c /home/tzumby/openMVG_build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx
/home/tzumby/openMVG_build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx: In function ‘int main(int, char**)’:
/home/tzumby/openMVG_build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:8:19: error: ‘Q_WS_WIN’ was not declared in this scope
   return ((int*)(&Q_WS_WIN))[argc];
                   ^
CMakeFiles/cmTryCompileExec1806688087.dir/build.make:57: recipe for target 'CMakeFiles/cmTryCompileExec1806688087.dir/CheckSymbolExists.cxx.o' failed
make[1]: Leaving directory '/home/tzumby/openMVG_build/CMakeFiles/CMakeTmp'
make[1]: *** [CMakeFiles/cmTryCompileExec1806688087.dir/CheckSymbolExists.cxx.o] Error 1
Makefile:117: recipe for target 'cmTryCompileExec1806688087/fast' failed
make: *** [cmTryCompileExec1806688087/fast] Error 2

File /home/tzumby/openMVG_build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:
/* */
#include <QtCore/qglobal.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef Q_WS_WIN
  return ((int*)(&Q_WS_WIN))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the Q_WS_QWS exist failed with the following output:
Change Dir: /home/tzumby/openMVG_build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTryCompileExec1998543930/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec1998543930.dir/build.make CMakeFiles/cmTryCompileExec1998543930.dir/build
make[1]: Entering directory '/home/tzumby/openMVG_build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/tzumby/openMVG_build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building CXX object CMakeFiles/cmTryCompileExec1998543930.dir/CheckSymbolExists.cxx.o
/usr/bin/c++    -march=native --std=c++11 -fopenmp  -I/usr/include/qt4    -o CMakeFiles/cmTryCompileExec1998543930.dir/CheckSymbolExists.cxx.o -c /home/tzumby/openMVG_build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx
/home/tzumby/openMVG_build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx: In function ‘int main(int, char**)’:
/home/tzumby/openMVG_build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:8:19: error: ‘Q_WS_QWS’ was not declared in this scope
   return ((int*)(&Q_WS_QWS))[argc];
                   ^
CMakeFiles/cmTryCompileExec1998543930.dir/build.make:57: recipe for target 'CMakeFiles/cmTryCompileExec1998543930.dir/CheckSymbolExists.cxx.o' failed
make[1]: Leaving directory '/home/tzumby/openMVG_build/CMakeFiles/CMakeTmp'
make[1]: *** [CMakeFiles/cmTryCompileExec1998543930.dir/CheckSymbolExists.cxx.o] Error 1
Makefile:117: recipe for target 'cmTryCompileExec1998543930/fast' failed
make: *** [cmTryCompileExec1998543930/fast] Error 2

File /home/tzumby/openMVG_build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:
/* */
#include <QtCore/qglobal.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef Q_WS_QWS
  return ((int*)(&Q_WS_QWS))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the Q_WS_MAC exist failed with the following output:
Change Dir: /home/tzumby/openMVG_build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTryCompileExec929073952/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec929073952.dir/build.make CMakeFiles/cmTryCompileExec929073952.dir/build
make[1]: Entering directory '/home/tzumby/openMVG_build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/tzumby/openMVG_build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building CXX object CMakeFiles/cmTryCompileExec929073952.dir/CheckSymbolExists.cxx.o
/usr/bin/c++    -march=native --std=c++11 -fopenmp  -I/usr/include/qt4    -o CMakeFiles/cmTryCompileExec929073952.dir/CheckSymbolExists.cxx.o -c /home/tzumby/openMVG_build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx
/home/tzumby/openMVG_build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx: In function ‘int main(int, char**)’:
/home/tzumby/openMVG_build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:8:19: error: ‘Q_WS_MAC’ was not declared in this scope
   return ((int*)(&Q_WS_MAC))[argc];
                   ^
CMakeFiles/cmTryCompileExec929073952.dir/build.make:57: recipe for target 'CMakeFiles/cmTryCompileExec929073952.dir/CheckSymbolExists.cxx.o' failed
make[1]: Leaving directory '/home/tzumby/openMVG_build/CMakeFiles/CMakeTmp'
make[1]: *** [CMakeFiles/cmTryCompileExec929073952.dir/CheckSymbolExists.cxx.o] Error 1
Makefile:117: recipe for target 'cmTryCompileExec929073952/fast' failed
make: *** [cmTryCompileExec929073952/fast] Error 2

File /home/tzumby/openMVG_build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:
/* */
#include <QtCore/qglobal.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef Q_WS_MAC
  return ((int*)(&Q_WS_MAC))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Hey! Thanks for the error report.
Currently, there's a directory called mih (multi-index hashing) within src/openMVG/matching_image_collection containing code straight from the authors of mih. I was planning on integrating this, but haven't gotten around to it. I'll be making a push taking this directory out of the project for now. You can, however, install HDF5 on Ubuntu through apt-get, source your shell's home file, and re-run CMake. Afterwards, you should be able to make it.

Other requirements that I forgot to add (and thanks for posting this, I'll be adding these ASAP to the README):
CUDA >= 7.0 (for --default-stream=per-thread)
NVIDIA graphics card with a compute capability above or equal to 3.0 (Kepler)

@tzumby , I just updated the system and removed MIH. Could you please try recompiling?
Thanks.

commented

@Mditer, thanks for the fast response and update to the code! I successfully compiled in on a fresh 14.04 box with opencv and opencv_contrib builds. I will try 15.10 again soon and report back.

@tzumby Thanks so much!

commented

@mdaiter I think we can close this one since your commit fixed the problem. I'm running into issues running the ComputeFeatures call but I'll open a separate ticket for that.

@tzumby You can also test the original project https://github.com/openMVG/openMVG and later the @mdaiter fork if you need specific features.