I did a "local" install today (1.8.0) usingbut I still ran into a couple issues when trying to use CMake to build my project:
- --prefix during the gflags and glog installs
- -DGLOG_INCLUDE_DIR_HINTS, -DGLOG_LIBRARY_DIR_HINTS, -DGFLAGS_INCLUDE_DIR_HINTS, -DGFLAGS_LIBRARY_INCLUDE_HINTS, and -DCMAKE_INSTALL_PREFIX during the Ceres Solver install
- Unless I made ceres-bin/ a subdirectory of ceres-solver-1.8.0/, CMake couldn't find Eigen
- Unless I used -DGLOG_INCLUDE_DIR and -DGLOG_LIBRARY, CMake couldn't find glog
I'm pretty new to CMake, so my question is: are either of these issues avoidable? For 1, the build instructions (docs/html/building.html) don't seem to indicate that ceres-bin/ should be a subdirectory of ceres-solver-1.8.0/. For 2, it shouldn't (or, couldn't) the Ceres install process take care of pointing CMake to my local gflags and glog installs?
--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/58a34958-4266-4fce-8195-ddead9ecff78%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
On Wed, Nov 13, 2013 at 11:55 AM, Garrett Warnell <warn...@gmail.com> wrote:
I did a "local" install today (1.8.0) usingbut I still ran into a couple issues when trying to use CMake to build my project:
- --prefix during the gflags and glog installs
- -DGLOG_INCLUDE_DIR_HINTS, -DGLOG_LIBRARY_DIR_HINTS, -DGFLAGS_INCLUDE_DIR_HINTS, -DGFLAGS_LIBRARY_INCLUDE_HINTS, and -DCMAKE_INSTALL_PREFIX during the Ceres Solver install
- Unless I made ceres-bin/ a subdirectory of ceres-solver-1.8.0/, CMake couldn't find Eigen
that is odd.
- Unless I used -DGLOG_INCLUDE_DIR and -DGLOG_LIBRARY, CMake couldn't find glog
this looks like a bug.
-- The C compiler identification is GNU 4.7.3
-- The CXX compiler identification is GNU 4.7.3
-- 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
-- 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
CMake Error at /home/warnellg/.local/ceres-bin/CeresConfig.cmake:70 (MESSAGE):
Failed to find Ceres - Ceres install root: /home/warnellg, determined from
relative path from CeresConfg.cmake install location:
/home/warnellg/.local/ceres-bin, does not contain Ceres headers. Either
the install directory was deleted, or the install tree was only partially
relocated outside of CMake after Ceres was built.
Call Stack (most recent call first):
/home/warnellg/.local/ceres-bin/CeresConfig.cmake:113 (CERES_REPORT_NOT_FOUND)
CMakeLists.txt:5 (FIND_PACKAGE)
warnellg@warnellg-u410:~/.local/ceres-bin$ cmake -DGLOG_INCLUDE_DIR_HINTS=/home/warnellg/.local/include -DGLOG_LIBRARY_DIR_HINTS=/home/warnellg/.local/lib -DGFLAGS_INCLUDE_DIR_HINTS=/home/warnellg/.local/include -DGFLAGS_LIBRARY_DIR_HINTS=/home/warnellg/.local/lib -DCMAKE_INSTALL_PREFIX=/home/warnellg/.local ../ceres-solver/
-- Found Eigen version 3.1.2: /usr/include/eigen3
-- A library with BLAS API found.
-- Found LAPACK library: /usr/lib/liblapack.so;/usr/lib/libblas.so
-- Found BLAS library: /usr/lib/libblas.so
-- A library with BLAS API found.
-- Found AMD library: /usr/lib/libamd.so
-- Found AMD header in: /usr/include/suitesparse
-- Found CAMD library: /usr/lib/libcamd.so
-- Found CAMD header in: /usr/include/suitesparse
-- Found COLAMD library: /usr/lib/libcolamd.so
-- Found COLAMD header in: /usr/include/suitesparse
-- Found CCOLAMD library: /usr/lib/libccolamd.so
-- Found CCOLAMD header in: /usr/include/suitesparse
-- Found CHOLMOD library: /usr/lib/libcholmod.so
-- Found CHOLMOD header in: /usr/include/suitesparse
-- Found SuiteSparseQR library: /usr/lib/libspqr.a
-- Found SuiteSparseQR header in: /usr/include/suitesparse
-- Did not find Intel TBB library, assuming SuiteSparseQR was not compiled with TBB.
-- Found UFconfig header in: /usr/include/suitesparse
-- Did not find METIS library (optional SuiteSparse dependency)
-- Found system install of SuiteSparse 3.4.0 running on Ubuntu, which has a known bug preventing linking of shared libraries (static linking unaffected).
-- Found SuiteSparse 3.4.0, building with SuiteSparse.
-- Building without CXSparse.
-- Found Google Flags header in: /home/warnellg/.local/include
-- Found Google Log header in: /home/warnellg/.local/include
-- Building with OpenMP.
-- Building Ceres as a static library.
-- Build the examples.
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
GFLAGS_INCLUDE_DIR_HINTS
GFLAGS_LIBRARY_DIR_HINTS
-- Build files have been written to: /home/warnellg/.local/ceres-bin
CMake Error at /home/warnellg/.local/ceres-bin/CeresConfig.cmake:70 (MESSAGE):
Failed to find Ceres - Ceres install root: /home/warnellg, determined from
relative path from CeresConfg.cmake install location:
/home/warnellg/.local/ceres-bin, does not contain Ceres headers. Either
the install directory was deleted, or the install tree was only partially
relocated outside of CMake after Ceres was built.
/home/warnellg/.local/ceres-bin/CeresConfig.cmake
FIND_PACKAGE(Ceres REQUIRED PATH "/home/warnellg/.local/share/Ceres")
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(autocal_bundleadjustment)
FIND_PACKAGE(Ceres REQUIRED PATHS "/home/warnellg/.local/share/Ceres")
INCLUDE_DIRECTORIES(${CERES_INCLUDE_DIRS})
#autocal_bundleadjustment
ADD_EXECUTABLE(autocal_bundleadjustment autocal_bundleadjustment.cpp)
TARGET_LINK_LIBRARIES(autocal_bundleadjustment ${CERES_LIBRARIES})
warnellg@warnellg-u410:~/scratch/calibration/ceres/build$ make
Scanning dependencies of target autocal_bundleadjustment
[100%] Building CXX object CMakeFiles/autocal_bundleadjustment.dir/autocal_bundleadjustment.cpp.o
Linking CXX executable autocal_bundleadjustment
/usr/bin/ld: /home/warnellg/.local/lib/libceres.a(evaluator.cc.o): undefined reference to symbol 'pthread_rwlock_wrlock@@GLIBC_2.2.5'
/usr/bin/ld: note: 'pthread_rwlock_wrlock@@GLIBC_2.2.5' is defined in DSO /lib/x86_64-linux-gnu/libpthread.so.0 so try adding it to the linker command line
/lib/x86_64-linux-gnu/libpthread.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [autocal_bundleadjustment] Error 1
make[1]: *** [CMakeFiles/autocal_bundleadjustment.dir/all] Error 2
make: *** [all] Error 2
FIND_PACKAGE(Threads)
TARGET_LINK_LIBRARIES(autocal_bundleadjustment ${CERES_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/744f809e-84a8-46b2-9527-13ef8022ea58%40googlegroups.com.