I'm having trouble building on a freshly-built CentOS 7 box.
I installed "eigen3-devel" and "glog" and "gflags" and "suitesparse-devel" and "atlas-devel" from RPMs.
Sadly, even if I try to tell it where the GFlags installation is located, I get errors:
[root@brew build]# /usr/local/cmake3/bin/cmake -DCXSPARSE=OFF -DGFLAGS_LIBRARY=/usr/lib64/libgflags.so -DGFLAGS_INCLUDE_DIR=/usr/include/ ../ceres-solver/
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /bin/cc
-- Check for working C compiler: /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: /bin/c++
-- Check for working CXX compiler: /bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detected Ceres version: 1.12.0 from /tmp/ceres-solver/include/ceres/version.h
-- Found Eigen: /usr/include/eigen3 (found version "3.2.5")
-- Found Eigen version 3.2.5: /usr/include/eigen3
===============================================================
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.
===============================================================
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- 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
-- A library with BLAS API found.
-- Found LAPACK library: /lib64/liblapack.so;/lib64/libblas.so
-- Found BLAS library: /lib64/libblas.so
-- A library with BLAS API found.
-- Found AMD library: /lib64/libamd.so
-- Found AMD header in: /usr/include/suitesparse
-- Found CAMD library: /lib64/libcamd.so
-- Found CAMD header in: /usr/include/suitesparse
-- Found COLAMD library: /lib64/libcolamd.so
-- Found COLAMD header in: /usr/include/suitesparse
-- Found CCOLAMD library: /lib64/libccolamd.so
-- Found CCOLAMD header in: /usr/include/suitesparse
-- Found CHOLMOD library: /lib64/libcholmod.so
-- Found CHOLMOD header in: /usr/include/suitesparse
-- Found SuiteSparseQR library: /lib64/libspqr.so
-- Found SuiteSparseQR header in: /usr/include/suitesparse
-- Found Intel Thread Building Blocks (TBB) library: /lib64/libtbb.so, assuming SuiteSparseQR was compiled with TBB.
-- Found Intel Thread Building Blocks (TBB) Malloc library: /lib64/libtbbmalloc.so
-- Found SuiteSparse_config library: /lib64/libsuitesparseconfig.so
-- Found SuiteSparse_config header in: /usr/include/suitesparse
-- Adding librt: /lib64/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.0.2")
-- Found SuiteSparse 4.0.2, building with SuiteSparse.
-- Building without CXSparse.
-- 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.
-- Found installed version of gflags: /lib64/cmake/gflags
-- Detected broken gflags install in: /lib64/cmake/gflags, version: 2.1.1 <= 2.1.2 which defines gflags_LIBRARIES = gflags which is not an imported CMake target, see: https://github.com/gflags/gflags/issues/110. Attempting to fix by detecting correct gflags target. -- Found valid gflags target: gflags-shared, updating gflags_LIBRARIES.
-- Detected gflags version: 2.1.1
-- Failed to find gflags - Could not find file: //include/gflags/gflags.h containing namespace information in gflags install located at: //include.
CMake Error at cmake/FindGflags.cmake:219 (file):
file failed to open for reading (No such file or directory):
//include/gflags/gflags.h
Call Stack (most recent call first):
cmake/FindGflags.cmake:397 (gflags_check_gflags_namespace_using_regex)
CMakeLists.txt:321 (find_package)
-- Failed to find gflags - Failed to determine gflags namespace using regex for gflags version: 2.1.1 exported here: /lib64/cmake/gflags using CMake.
-- Performing Test GFLAGS_IN_GOOGLE_NAMESPACE
-- Performing Test GFLAGS_IN_GOOGLE_NAMESPACE - Failed
-- Performing Test GFLAGS_IN_GFLAGS_NAMESPACE
-- Performing Test GFLAGS_IN_GFLAGS_NAMESPACE - Success
-- Found Gflags: /usr/include
-- Found Google Flags header in: /usr/include, in namespace: gflags
-- Found Glog: /usr/include
-- Found Google Log header in: /usr/include
-- Building with OpenMP.
-- Performing Test COMPILER_HAS_CXX11_FLAG
-- Performing Test COMPILER_HAS_CXX11_FLAG - Success
-- Looking for C++ include unordered_map
-- Looking for C++ include unordered_map - not found
-- Looking for C++ include tr1/unordered_map
-- Looking for C++ include tr1/unordered_map - found
-- Found tr1/unordered_map/set in std::tr1 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 - Failed
-- Performing Test HAVE_SHARED_PTR_IN_TR1_NAMESPACE
-- Performing Test HAVE_SHARED_PTR_IN_TR1_NAMESPACE - Failed
-- Looking for C++ include tr1/memory
-- Looking for C++ include tr1/memory - found
-- Performing Test HAVE_SHARED_PTR_IN_TR1_NAMESPACE_FROM_TR1_MEMORY_HEADER
-- Performing Test HAVE_SHARED_PTR_IN_TR1_NAMESPACE_FROM_TR1_MEMORY_HEADER - Success
-- Found shared_ptr in std::tr1 namespace using <tr1/memory> header.
-- Building Ceres as a static library.
-- No build type specified; defaulting to CMAKE_BUILD_TYPE=Release.
-- Creating configured Ceres config.h output directory: /tmp/build/config/ceres/internal
-- Enabling CERES_NO_CXSPARSE 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_TR1_UNORDERED_MAP in Ceres config.h
-- Enabling CERES_TR1_MEMORY_HEADER in Ceres config.h
-- Enabling CERES_TR1_SHARED_PTR in Ceres config.h
-- Build the examples.
-- Configuring incomplete, errors occurred!
See also "/tmp/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/build/CMakeFiles/CMakeError.log".
[root@brew build]#
Thank you.