额,在ubuntu16.04上安装ceres,结果出现了下面的报错,搞了好久没有搞定,非常生气!
不过总之问题最后还是解决了~
简而言之就是这样的
出现问题的原因: gcc和g++的版本太低了()!
解决的方法:
1.把gcc和g++的版本同时设置成为5.0以上的,然后设置gcc切换的方法剧可以参考这个:gcc/g++多版本切换使用
2.再build的文件里输入make clean
或者直接把build文件删掉重新建一个
3.再依次执行:cmake ..
make
sudo make install
然后就成功啦!
这里吐槽一下gcc版本的问题,很多时候需要老版本,很多时候又需要新一点的版本,不知道新版本就不能向前把兼容性做的好一点吗?
cmake..之后的错误“
Did not find METIS library (optional SuiteSparse dependency)
-- Found SuiteSparse: TRUE (found version "4.4.6")
-- Found SuiteSparse 4.4.6, building with SuiteSparse.
-- Found CXSparse: /usr/include/suitesparse (found version "3.1.4")
-- Found CXSparse version: 3.1.4, building with CXSparse.
-- Building without Apple's Accelerate sparse support.
-- 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 header in: /usr/include, in namespace: google
-- No preference for use of exported glog CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported glog CMake configuration if available.
-- Failed to find installed glog CMake configuration, searching for glog build directories exported with CMake.
-- Failed to find an installed/exported CMake configuration for glog, will perform search for installed glog components.
-- Found Glog: /usr/include
-- Found Google Log (glog). Assuming glog was built with gflags support as gflags was found. This will make gflags a public dependency of Ceres.
-- Using Ceres threading model: CXX11_THREADS
-- Failed to find Google benchmark library, disabling build of benchmarks.
-- Building Ceres as a static library.
-- No