引入
最近重新安装了Kimera-Multi,发现又有一些新的问题(累)。
在看这篇文章之前,先参考之前的踩坑:[Kimera-Multi]ubuntu部署过程
前面的话
由于原仓库修改了 Kimera-VIO-ROS的分支为 master
,故Kimera-VIO如果保持原来的分支,最后跑程序就会报段错误(私以为C++最恐怖的报错),因此 Kimera-VIO
需要修改分支为 master
分支,以下均为修改后的编译过程。
新的报错
1 OpenCL
Could NOT find OpenCL (missing: OpenCL_LIBRARY OpenCL_INCLUDE_DIR)
(Required is at least version "2")
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.16/Modules/FindOpenCL.cmake:150 (find_package_handle_standard_args)
CMakeLists.txt:22 (find_package)
按照kimi的方法,安装依赖:
sudo apt-get install opencl-headers ocl-icd-opencl-dev
2 gflags_*
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/gflags/gflags-nonamespace-targets.cmake:37 (message):
Some (but not all) targets in this export set were already defined.
Targets Defined: gflags_shared;gflags_nothreads_shared
Targets not yet defined: gflags_static;gflags_nothreads_static
修改 /usr/local/lib/cmake/Ceres/CeresConfig.cmake
里面的243行附近的为:
if (GFLAGS_WAS_BUILT_WITH_CMAKE)
# set(gflags_DIR /usr/lib/x86_64-linux-gnu/cmake/gflags)
set(GFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION TRUE)
github
fatal: unable to access 'https://github.com/yuluntian/ROPTLIB.git/': Failed to connect to github.com port 443: Connection timed out
CMake Error at /path/to/your/work/space/kimera_multi_ws/build/dpgo/roptlib-download/roptlib-prefix/tmp/roptlib-gitupdate.cmake:55 (message):
Failed to fetch repository 'https://github.com/yuluntian/ROPTLIB.git'
make[3]: *** [CMakeFiles/roptlib.dir/build.make:97: roptlib-prefix/src/roptlib-stamp/roptlib-update] Error 1
make[2]: *** [CMakeFiles/Makefile2:76: CMakeFiles/roptlib.dir/all] Error 2
make[1]: *** [Makefile:84: all] Error 2
fatal: unable to access 'https://github.com/google/googletest.git/': Failed to connect to github.com port 443: Connection timed out
CMake Error at /path/to/your/work/space/kimera_multi_ws/build/dpgo/googletest-download/googletest-prefix/tmp/googletest-gitupdate.cmake:55 (message):
Failed to fetch repository 'https://github.com/google/googletest.git'
make[3]: *** [CMakeFiles/googletest.dir/build.make:97: googletest-prefix/src/googletest-stamp/googletest-update] Error 1
make[2]: *** [CMakeFiles/Makefile2:76: CMakeFiles/googletest.dir/all] Error 2
make[1]: *** [Makefile:84: all] Error 2
CMake Error at /path/to/your/work/space/kimera_multi_ws/src/dpgo/CMakeLists.txt:142 (message):
Build step for googletest failed: 2
网络问题,多试几遍,或者分别进入 ./src/dpgo/cmake/roptlib.cmake
和 ./src/dpgo/cmake/gtest.cmake
,修改github网址为 ssh
克隆地址:git@github.com:
,即:
GIT_REPOSITORY https://github.com/google/googletest.git
改为:
GIT_REPOSITORY git@github.com:google/googletest.git
另一个也类似。
最后顺利编译通过。
希望大家也都能顺利部署完成~