rgbdslam_v2编译过程中引起的needed by错误

Posted williamc17

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了rgbdslam_v2编译过程中引起的needed by错误相关的知识,希望对你有一定的参考价值。

Ubuntu16.04,ROS kinectic

 

报错信息为“

make[2]: *** No rule to make target ‘/home/william/slam/g2o/lib/libg2o_csparse_extension.so‘, needed by ‘/home/william/catkin_ws/devel/lib/rgbdslam/rgbdslam‘. Stop.
CMakeFiles/Makefile2:5881: recipe for target ‘rgbdslam_v2/CMakeFiles/rgbdslam.dir/all‘ failed
make[1]: *** [rgbdslam_v2/CMakeFiles/rgbdslam.dir/all] Error 2
Makefile:127: recipe for target ‘all‘ failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed

报错原因如下:

1. 先是按照https://github.com/felixendres/rgbdslam_v2上的README.md来安装

2. 出现G2O引起的bug,在编译安装g2o时通过,却在编译rgbdslam中报错,依照https://hubpages.com/technology/Instructions-for-compiling-rgbdslam-v2-on-a-fresh-Ubuntu-1604-install-ros-kinetic-in-virtualbox中的6,解决了

缺少依赖,执行sudo apt-get install libsuitesparse-dev(装依赖后再装G2O会好一点),在报错之后安装依赖,如果不行,就装完依赖后再安装g2o

我觉得本次主要讲的大bug就是从这里引起的

3. 遇到https://blog.csdn.net/zhuoyueljl/article/details/78536996?reload中,“required process[rgbdslam-2] has died”......Iinitiating down”问题,解决后,编译出现needed by错误

 

解决方法为:

工作空间(也有可能是编译G2O时才会出现)的cmake_modules中有个FindG2O.cmake的文件,将其移除掉就可以了,因为用3的方法,make install了G2O,因此不需要cmake_modules来找G2O的包

 

PS:反思几点

1 使用grep搜索文件中的文本信息,语法是

grep -rw PATTERN [file]

1. 在CMakeLists.txt中,设置找包的路径:

set(G2O ‘包的绝对路径’)

 






以上是关于rgbdslam_v2编译过程中引起的needed by错误的主要内容,如果未能解决你的问题,请参考以下文章

编译samba遇到need autoconf 2.53 or later to build samba from GIT

linux Ubuntu14.04 make编译文件报错:No rule to make target `/usr/lib/libpython2.7.so', needed by `pytho

oracle中“ORA-00060: 等待资源时检测到死锁” 或存储过程编译卡死 解决方法

rpm包安装过程中依赖问题“libc.so.6 is needed by XXX”解决方法

交叉编译出现提示 plugin needed to handle lto object

编译mcrypt时,报错:You need at least libmhash 0.8.15