cartographer安装catkin_make_isolated --install --use-ninja报错
cartographer安装报错,上一篇介绍了安装过程,不过在安装官网教程时出现了好多错误,下面贴出来:
安装出错主要是官网的安装有问题,具体安装参考上一篇,
安装前几步都没问题,一直到下面这一步.
src/cartographer/scripts/install_proto3.sh
这里请注意:对于已经安装过得ros的人来说可能会pc上已经自带proto 2.6.1,那就建议不要执行这一步,先继续执行下面几步.
具体怎么判断自己电脑上有没有安装proto,可以用:protoc --version,看看有没有,如果有会显示版本,如果没有就显示没有.同时再多说一句,可能会有人要更新自己proto,再给个命令: which protoc查看你安装的位置,看他不爽直接干掉......
执行脚本install_proto3.sh安装时可能会有错,如果有错建议打开脚本手动安装,(安装好几遍有直接过得,也有报错的所以自己参考)
下来就是catkin_make_isolated --install --use-ninja
这句安装时会和报错,我装了好几遍都报错,下面贴出报错过程,仅供参考:
libcartographer.a(normal_estimation_options_2d.pb.cc.o): In function `cartographer::mapping::proto::NormalEstimationOptions2D::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)':
normal_estimation_options_2d.pb.cc:(.text+0x9ea): undefined reference to `google::protobuf::io::CodedInputStream::ReadTagFallback(unsigned int)'
normal_estimation_options_2d.pb.cc:(.text+0xa36): undefined reference to `google::protobuf::io::CodedInputStream::ReadVarint32Fallback(unsigned int)'
libcartographer.a(normal_estimation_options_2d.pb.cc.o): In function `cartographer::mapping::proto::protobuf_cartographer_2fmapping_2fproto_2f2d_2fnormal_5festimation_5foptions_5f2d_2eproto::TableStruct::InitDefaultsImpl()':
normal_estimation_options_2d.pb.cc:(.text+0x760): undefined reference to `google::protobuf::internal::OnShutdownDestroyMessage(void const*)'
libcartographer.a(normal_estimation_options_2d.pb.cc.o): In function `void google::protobuf::Arena::Own<cartographer::mapping::proto::NormalEstimationOptions2D>(cartographer::mapping::proto::NormalEstimationOptions2D*)':
normal_estimation_options_2d.pb.cc:(.text._ZN6google8protobuf5Arena3OwnIN12cartographer7mapping5proto25NormalEstimationOptions2DEEEvPT_[_ZN6google8protobuf5Arena3OwnIN12cartographer7mapping5proto25NormalEstimationOptions2DEEEvPT_]+0xd): undefined reference to `google::protobuf::internal::ArenaImpl::AddCleanup(void*, void (*)(void*))'
libcartographer.a(normal_estimation_options_2d.pb.cc.o):(.data.rel.ro._ZTVN12cartographer7mapping5proto25NormalEstimationOptions2DE[_ZTVN12cartographer7mapping5proto25NormalEstimationOptions2DE]+0xb8): undefined reference to `google::protobuf::Message::SpaceUsedLong() const'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
<== Failed to process package 'cartographer':
Command '['/home/funstep/catkin_ws/install_isolated/env.sh', 'ninja', '-j4', '-l4']' returned non-zero exit status 1
Reproduce this error by running:
==> cd /home/funstep/catkin_ws/build_isolated/cartographer && /home/funstep/catkin_ws/install_isolated/env.sh ninja -j4 -l4
Command failed, exiting.
这个错误头疼了好久,最后才发现是proto版本导致错误,建议在安装时确定好proto版本,要不会出现各种错误,如果你安装好几遍proto版本,可能会导致检测或者依赖失败,就算查看版本显示正确还是会报错,这个时候建议最直接的办法清空重新搞一波或者重新装个系统(不建议,万不得已可以重新装).安装过程中我还遇到各种奇葩问题,就不一一贴出来了,如果有遇到其他问题的可以留言,如果有能力会帮你解决的..........
更多推荐
所有评论(0)