weixin_39904268
weixin_39904268
2021-01-12 19:24

Build error, can not found protobuf which is already installed


[138/261] Building CXX object CMakeFiles/cartographer.mapping.intern...artographer/mapping/internal/trajectory_connectivity_state_test.cc.o
FAILED: cartographer_autogenerate_ground_truth 
: && /usr/bin/c++  -O3 -DNDEBUG  -rdynamic CMakeFiles/cartographer_autogenerate_ground_truth.dir/cartographer/ground_truth/autogenerate_ground_truth_main.cc.o  -o cartographer_autogenerate_ground_truth  -Wl,-rpath,/usr/local/lib: libcartographer.a /usr/local/lib/libceres.a -lglog /usr/lib/x86_64-linux-gnu/libgflags.so.2.2.1 -lspqr -ltbbmalloc -ltbb -lcholmod -lccolamd -lcamd -lcolamd -lamd -lopenblas -lsuitesparseconfig -lrt -lcxsparse -lopenblas -lsuitesparseconfig -lrt -lcxsparse -llua5.2 -lm -lboost_iostreams -lboost_regex -lglog /usr/lib/x86_64-linux-gnu/libgflags.so.2.2.1 -lpthread -lcairo /usr/local/lib/libprotobuf.so -lpthread && :
libcartographer.a(relations.pb.cc.o): In function `cartographer::ground_truth::proto::Relation::GetMetadata() const':
relations.pb.cc:(.text+0x81): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(relations.pb.cc.o): In function `cartographer::ground_truth::proto::Relation::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const':
relations.pb.cc:(.text+0x133): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(relations.pb.cc.o): In function `cartographer::ground_truth::proto::GroundTruth::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const':
relations.pb.cc:(.text+0x1eb): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(relations.pb.cc.o): In function `cartographer::ground_truth::proto::protobuf_cartographer_2fground_5ftruth_2fproto_2frelations_2eproto::(anonymous namespace)::protobuf_RegisterTypes(std::__cxx11::basic_string<char std::char_traits>, std::allocator<char> > const&)':
relations.pb.cc:(.text+0x261): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
relations.pb.cc:(.text+0x27a): undefined reference to `google::protobuf::internal::RegisterAllTypes(google::protobuf::Metadata const*, int)'
libcartographer.a(relations.pb.cc.o): In function `cartographer::ground_truth::proto::GroundTruth::GetMetadata() const':
relations.pb.cc:(.text+0x301): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(relations.pb.cc.o): In function `cartographer::ground_truth::proto::protobuf_cartographer_2fground_5ftruth_2fproto_2frelations_2eproto::InitDefaults()':
relations.pb.cc:(.text+0x3a1): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(relations.pb.cc.o): In function `cartographer::ground_truth::proto::protobuf_cartographer_2fground_5ftruth_2fproto_2frelations_2eproto::(anonymous namespace)::AddDescriptorsImpl()':
relations.pb.cc:(.text+0x409): undefined reference to `google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::__cxx11::basic_string<char std::char_traits>, std::allocator<char> > const&))'
libcartographer.a(relations.pb.cc.o): In function `cartographer::ground_truth::proto::protobuf_cartographer_2fground_5ftruth_2fproto_2frelations_2eproto::AddDescriptors()':
relations.pb.cc:(.text+0x471): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(relations.pb.cc.o): In function `cartographer::ground_truth::proto::protobuf_cartographer_2fground_5ftruth_2fproto_2frelations_2eproto::(anonymous namespace)::protobuf_AssignDescriptors()':
relations.pb.cc:(.text+0x58d): undefined reference to `google::protobuf::internal::AssignDescriptors(std::__cxx11::basic_string<char std::char_traits>, std::allocator<char> > const&, google::protobuf::internal::MigrationSchema const*, google::protobuf::Message const* const*, unsigned int const*, google::protobuf::MessageFactory*, google::protobuf::Metadata*, google::protobuf::EnumDescriptor const**, google::protobuf::ServiceDescriptor const**)'
libcartographer.a(relations.pb.cc.o): In function `cartographer::ground_truth::proto::Relation::descriptor()':
relations.pb.cc:(.text+0x701): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(relations.pb.cc.o): In function `cartographer::ground_truth::proto::GroundTruth::descriptor()':
relations.pb.cc:(.text+0x8f1): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(relations.pb.cc.o): In function `cartographer::ground_truth::proto::protobuf_cartographer_2fground_5ftruth_2fproto_2frelations_2eproto::TableStruct::InitDefaultsImpl()':
relations.pb.cc:(.text+0xa69): undefined reference to `google::protobuf::internal::OnShutdownDestroyMessage(void const*)'
relations.pb.cc:(.text+0xa80): undefined reference to `google::protobuf::internal::OnShutdownDestroyMessage(void const*)'
libcartographer.a(relations.pb.cc.o): In function `cartographer::ground_truth::proto::Relation::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const':
relations.pb.cc:(.text+0x1c41): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(relations.pb.cc.o): In function `cartographer::ground_truth::proto::GroundTruth::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const':
relations.pb.cc:(.text+0x1d1a): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(relations.pb.cc.o): In function `cartographer::ground_truth::proto::Relation::ByteSizeLong() const':
relations.pb.cc:(.text+0x1d58): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(relations.pb.cc.o): In function `cartographer::ground_truth::proto::GroundTruth::ByteSizeLong() const':
relations.pb.cc:(.text+0x1e2c): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(pose_graph.pb.cc.o): In function `cartographer::mapping::proto::SubmapId::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const':
pose_graph.pb.cc:(.text+0x93): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(pose_graph.pb.cc.o):pose_graph.pb.cc:(.text+0x113): more undefined references to `google::protobuf::internal::proto3_preserve_unknown_' follow
libcartographer.a(pose_graph.pb.cc.o): In function `cartographer::mapping::proto::PoseGraph_Constraint::GetMetadata() const':
pose_graph.pb.cc:(.text+0x671): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(pose_graph.pb.cc.o): In function `cartographer::mapping::proto::protobuf_cartographer_2fmapping_2fproto_2fpose_5fgraph_2eproto::(anonymous namespace)::protobuf_RegisterTypes(std::__cxx11::basic_string<char std::char_traits>, std::allocator<char> > const&)':
pose_graph.pb.cc:(.text+0x711): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
pose_graph.pb.cc:(.text+0x72a): undefined reference to `google::protobuf::internal::RegisterAllTypes(google::protobuf::Metadata const*, int)'
libcartographer.a(pose_graph.pb.cc.o): In function `cartographer::mapping::proto::PoseGraph_LandmarkPose::GetMetadata() const':
pose_graph.pb.cc:(.text+0x7b1): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(pose_graph.pb.cc.o): In function `cartographer::mapping::proto::NodeId::GetMetadata() const':
pose_graph.pb.cc:(.text+0x851): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(pose_graph.pb.cc.o): In function `cartographer::mapping::proto::SubmapId::GetMetadata() const':
pose_graph.pb.cc:(.text+0x8f1): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(pose_graph.pb.cc.o): In function `cartographer::mapping::proto::PoseGraph::GetMetadata() const':
pose_graph.pb.cc:(.text+0x991): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(pose_graph.pb.cc.o): In function `cartographer::mapping::proto::protobuf_cartographer_2fmapping_2fproto_2fpose_5fgraph_2eproto::InitDefaults()':
pose_graph.pb.cc:(.text+0xa31): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(pose_graph.pb.cc.o): In function `cartographer::mapping::proto::protobuf_cartographer_2fmapping_2fproto_2fpose_5fgraph_2eproto::(anonymous namespace)::AddDescriptorsImpl()':
pose_graph.pb.cc:(.text+0xa99): undefined reference to `google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::__cxx11::basic_string<char std::char_traits>, std::allocator<char> > const&))'
libcartographer.a(pose_graph.pb.cc.o): In function `cartographer::mapping::proto::protobuf_cartographer_2fmapping_2fproto_2fpose_5fgraph_2eproto::AddDescriptors()':
pose_graph.pb.cc:(.text+0xb01): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(pose_graph.pb.cc.o): In function `cartographer::mapping::proto::protobuf_cartographer_2fmapping_2fproto_2fpose_5fgraph_2eproto::(anonymous namespace)::protobuf_AssignDescriptors()':
pose_graph.pb.cc:(.text+0xc1c): undefined reference to `google::protobuf::internal::AssignDescriptors(std::__cxx11::basic_string<char std::char_traits>, std::allocator<char> > const&, google::protobuf::internal::MigrationSchema const*, google::protobuf::Message const* const*, unsigned int const*, google::protobuf::MessageFactory*, google::protobuf::Metadata*, google::protobuf::EnumDescriptor const**, google::protobuf::ServiceDescriptor const**)'
libcartographer.a(pose_graph.pb.cc.o): In function `cartographer::mapping::proto::PoseGraph_Constraint_Tag_descriptor()':
pose_graph.pb.cc:(.text+0xcc1): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(pose_graph.pb.cc.o): In function `cartographer::mapping::proto::SubmapId::descriptor()':
pose_graph.pb.cc:(.text+0xe01): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(pose_graph.pb.cc.o): In function `cartographer::mapping::proto::NodeId::descriptor()':
pose_graph.pb.cc:(.text+0xf51): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(pose_graph.pb.cc.o): In function `cartographer::mapping::proto::PoseGraph_Constraint::descriptor()':
pose_graph.pb.cc:(.text+0x1171): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(pose_graph.pb.cc.o): In function `cartographer::mapping::proto::PoseGraph_LandmarkPose::descriptor()':
pose_graph.pb.cc:(.text+0x1321): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(pose_graph.pb.cc.o):pose_graph.pb.cc:(.text+0x15e1): more undefined references to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)' follow
libcartographer.a(pose_graph.pb.cc.o): In function `cartographer::mapping::proto::protobuf_cartographer_2fmapping_2fproto_2fpose_5fgraph_2eproto::TableStruct::InitDefaultsImpl()':
pose_graph.pb.cc:(.text+0x18b0): undefined reference to `google::protobuf::internal::OnShutdownDestroyMessage(void const*)'
pose_graph.pb.cc:(.text+0x18c7): undefined reference to `google::protobuf::internal::OnShutdownDestroyMessage(void const*)'
pose_graph.pb.cc:(.text+0x18de): undefined reference to `google::protobuf::internal::OnShutdownDestroyMessage(void const*)'
pose_graph.pb.cc:(.text+0x18f5): undefined reference to `google::protobuf::internal::OnShutdownDestroyMessage(void const*)'
pose_graph.pb.cc:(.text+0x190c): undefined reference to `google::protobuf::internal::OnShutdownDestroyMessage(void const*)'
libcartographer.a(pose_graph.pb.cc.o): In function `cartographer::mapping::proto::PoseGraph_Constraint::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const':
pose_graph.pb.cc:(.text+0x3b7b): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(pose_graph.pb.cc.o): In function `cartographer::mapping::proto::PoseGraph_LandmarkPose::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const':
pose_graph.pb.cc:(.text+0x3c5b): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(pose_graph.pb.cc.o): In function `cartographer::mapping::proto::PoseGraph_Constraint::ByteSizeLong() const':
pose_graph.pb.cc:(.text+0x3cd8): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(pose_graph.pb.cc.o): In function `cartographer::mapping::proto::PoseGraph_LandmarkPose::ByteSizeLong() const':
pose_graph.pb.cc:(.text+0x3df8): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(pose_graph.pb.cc.o): In function `cartographer::mapping::proto::PoseGraph::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const':
pose_graph.pb.cc:(.text+0x46a8): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(pose_graph.pb.cc.o):pose_graph.pb.cc:(.text+0x46ec): more undefined references to `google::protobuf::internal::proto3_preserve_unknown_' follow
libcartographer.a(serialization.pb.cc.o): In function `cartographer::mapping::proto::SerializedData::GetMetadata() const':
serialization.pb.cc:(.text+0x871): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(serialization.pb.cc.o): In function `cartographer::mapping::proto::protobuf_cartographer_2fmapping_2fproto_2fserialization_2eproto::(anonymous namespace)::protobuf_RegisterTypes(std::__cxx11::basic_string<char std::char_traits>, std::allocator<char> > const&)':
serialization.pb.cc:(.text+0x911): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
serialization.pb.cc:(.text+0x92a): undefined reference to `google::protobuf::internal::RegisterAllTypes(google::protobuf::Metadata const*, int)'
libcartographer.a(serialization.pb.cc.o): In function `cartographer::mapping::proto::SerializationHeader::GetMetadata() const':
serialization.pb.cc:(.text+0x9b1): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(serialization.pb.cc.o): In function `cartographer::mapping::proto::LandmarkData::GetMetadata() const':
serialization.pb.cc:(.text+0xa51): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(serialization.pb.cc.o): In function `cartographer::mapping::proto::ImuData::GetMetadata() const':
serialization.pb.cc:(.text+0xaf1): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(serialization.pb.cc.o): In function `cartographer::mapping::proto::OdometryData::GetMetadata() const':
serialization.pb.cc:(.text+0xb91): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(serialization.pb.cc.o): In function `cartographer::mapping::proto::Node::GetMetadata() const':
serialization.pb.cc:(.text+0xc31): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(serialization.pb.cc.o):serialization.pb.cc:(.text+0xcd1): more undefined references to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)' follow
libcartographer.a(serialization.pb.cc.o): In function `cartographer::mapping::proto::protobuf_cartographer_2fmapping_2fproto_2fserialization_2eproto::(anonymous namespace)::AddDescriptorsImpl()':
serialization.pb.cc:(.text+0xfb9): undefined reference to `google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::__cxx11::basic_string<char std::char_traits>, std::allocator<char> > const&))'
libcartographer.a(serialization.pb.cc.o): In function `cartographer::mapping::proto::protobuf_cartographer_2fmapping_2fproto_2fserialization_2eproto::AddDescriptors()':
serialization.pb.cc:(.text+0x1031): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(serialization.pb.cc.o): In function `cartographer::mapping::proto::protobuf_cartographer_2fmapping_2fproto_2fserialization_2eproto::(anonymous namespace)::protobuf_AssignDescriptors()':
serialization.pb.cc:(.text+0x1149): undefined reference to `google::protobuf::internal::AssignDescriptors(std::__cxx11::basic_string<char std::char_traits>, std::allocator<char> > const&, google::protobuf::internal::MigrationSchema const*, google::protobuf::Message const* const*, unsigned int const*, google::protobuf::MessageFactory*, google::protobuf::Metadata*, google::protobuf::EnumDescriptor const**, google::protobuf::ServiceDescriptor const**)'
libcartographer.a(serialization.pb.cc.o): In function `cartographer::mapping::proto::Submap::descriptor()':
serialization.pb.cc:(.text+0x12d1): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(serialization.pb.cc.o): In function `cartographer::mapping::proto::Node::descriptor()':
serialization.pb.cc:(.text+0x1461): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(serialization.pb.cc.o): In function `cartographer::mapping::proto::ImuData::descriptor()':
serialization.pb.cc:(.text+0x15e1): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(serialization.pb.cc.o): In function `cartographer::mapping::proto::OdometryData::descriptor()':
serialization.pb.cc:(.text+0x1761): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(serialization.pb.cc.o): In function `cartographer::mapping::proto::FixedFramePoseData::descriptor()':
serialization.pb.cc:(.text+0x18e1): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(serialization.pb.cc.o):serialization.pb.cc:(.text+0x1a61): more undefined references to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)' follow
libcartographer.a(serialization.pb.cc.o): In function `cartographer::mapping::proto::protobuf_cartographer_2fmapping_2fproto_2fserialization_2eproto::TableStruct::InitDefaultsImpl()':
serialization.pb.cc:(.text+0x26fa): undefined reference to `google::protobuf::internal::OnShutdownDestroyMessage(void const*)'
serialization.pb.cc:(.text+0x2711): undefined reference to `google::protobuf::internal::OnShutdownDestroyMessage(void const*)'
serialization.pb.cc:(.text+0x2728): undefined reference to `google::protobuf::internal::OnShutdownDestroyMessage(void const*)'
serialization.pb.cc:(.text+0x273f): undefined reference to `google::protobuf::internal::OnShutdownDestroyMessage(void const*)'
serialization.pb.cc:(.text+0x2757): undefined reference to `google::protobuf::internal::OnShutdownDestroyMessage(void const*)'
libcartographer.a(serialization.pb.cc.o):serialization.pb.cc:(.text+0x276f): more undefined references to `google::protobuf::internal::OnShutdownDestroyMessage(void const*)' follow
libcartographer.a(serialization.pb.cc.o): In function `cartographer::mapping::proto::Submap::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const':
serialization.pb.cc:(.text+0x61d3): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(serialization.pb.cc.o): In function `cartographer::mapping::proto::Submap::ByteSizeLong() const':
serialization.pb.cc:(.text+0x6218): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(serialization.pb.cc.o): In function `cartographer::mapping::proto::Node::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const':
serialization.pb.cc:(.text+0x6933): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(serialization.pb.cc.o): In function `cartographer::mapping::proto::LocalSlamResultData::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const':
serialization.pb.cc:(.text+0x6a7b): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(serialization.pb.cc.o): In function `cartographer::mapping::proto::Node::ByteSizeLong() const':
serialization.pb.cc:(.text+0x6ac8): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(serialization.pb.cc.o):serialization.pb.cc:(.text+0x6b6c): more undefined references to `google::protobuf::internal::proto3_preserve_unknown_' follow
libcartographer.a(trajectory.pb.cc.o): In function `cartographer::mapping::proto::Trajectory_Node::GetMetadata() const':
trajectory.pb.cc:(.text+0x91): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(trajectory.pb.cc.o): In function `cartographer::mapping::proto::Trajectory_Node::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const':
trajectory.pb.cc:(.text+0x133): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(trajectory.pb.cc.o): In function `cartographer::mapping::proto::Trajectory_Submap::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const':
trajectory.pb.cc:(.text+0x1bb): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(trajectory.pb.cc.o): In function `cartographer::mapping::proto::Trajectory::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const':
trajectory.pb.cc:(.text+0x283): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(trajectory.pb.cc.o): In function `cartographer::mapping::proto::protobuf_cartographer_2fmapping_2fproto_2ftrajectory_2eproto::(anonymous namespace)::protobuf_RegisterTypes(std::__cxx11::basic_string<char std::char_traits>, std::allocator<char> > const&)':
trajectory.pb.cc:(.text+0x311): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
trajectory.pb.cc:(.text+0x32a): undefined reference to `google::protobuf::internal::RegisterAllTypes(google::protobuf::Metadata const*, int)'
libcartographer.a(trajectory.pb.cc.o): In function `cartographer::mapping::proto::Trajectory_Submap::GetMetadata() const':
trajectory.pb.cc:(.text+0x3b1): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(trajectory.pb.cc.o): In function `cartographer::mapping::proto::Trajectory::GetMetadata() const':
trajectory.pb.cc:(.text+0x451): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(trajectory.pb.cc.o): In function `cartographer::mapping::proto::protobuf_cartographer_2fmapping_2fproto_2ftrajectory_2eproto::InitDefaults()':
trajectory.pb.cc:(.text+0x4f1): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(trajectory.pb.cc.o): In function `cartographer::mapping::proto::protobuf_cartographer_2fmapping_2fproto_2ftrajectory_2eproto::(anonymous namespace)::AddDescriptorsImpl()':
trajectory.pb.cc:(.text+0x559): undefined reference to `google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::__cxx11::basic_string<char std::char_traits>, std::allocator<char> > const&))'
libcartographer.a(trajectory.pb.cc.o): In function `cartographer::mapping::proto::protobuf_cartographer_2fmapping_2fproto_2ftrajectory_2eproto::AddDescriptors()':
trajectory.pb.cc:(.text+0x5c1): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(trajectory.pb.cc.o): In function `cartographer::mapping::proto::protobuf_cartographer_2fmapping_2fproto_2ftrajectory_2eproto::(anonymous namespace)::protobuf_AssignDescriptors()':
trajectory.pb.cc:(.text+0x6d6): undefined reference to `google::protobuf::internal::AssignDescriptors(std::__cxx11::basic_string<char std::char_traits>, std::allocator<char> > const&, google::protobuf::internal::MigrationSchema const*, google::protobuf::Message const* const*, unsigned int const*, google::protobuf::MessageFactory*, google::protobuf::Metadata*, google::protobuf::EnumDescriptor const**, google::protobuf::ServiceDescriptor const**)'
libcartographer.a(trajectory.pb.cc.o): In function `cartographer::mapping::proto::Trajectory_Node::descriptor()':
trajectory.pb.cc:(.text+0x841): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(trajectory.pb.cc.o): In function `cartographer::mapping::proto::Trajectory_Submap::descriptor()':
trajectory.pb.cc:(.text+0x9c1): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(trajectory.pb.cc.o): In function `cartographer::mapping::proto::Trajectory::descriptor()':
trajectory.pb.cc:(.text+0xc31): undefined reference to `google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
libcartographer.a(trajectory.pb.cc.o): In function `cartographer::mapping::proto::protobuf_cartographer_2fmapping_2fproto_2ftrajectory_2eproto::TableStruct::InitDefaultsImpl()':
trajectory.pb.cc:(.text+0xe27): undefined reference to `google::protobuf::internal::OnShutdownDestroyMessage(void const*)'
trajectory.pb.cc:(.text+0xe3e): undefined reference to `google::protobuf::internal::OnShutdownDestroyMessage(void const*)'
trajectory.pb.cc:(.text+0xe55): undefined reference to `google::protobuf::internal::OnShutdownDestroyMessage(void const*)'
libcartographer.a(trajectory.pb.cc.o): In function `cartographer::mapping::proto::Trajectory_Node::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const':
trajectory.pb.cc:(.text+0x25a9): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(trajectory.pb.cc.o): In function `cartographer::mapping::proto::Trajectory_Submap::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const':
trajectory.pb.cc:(.text+0x2669): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(trajectory.pb.cc.o): In function `cartographer::mapping::proto::Trajectory::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const':
trajectory.pb.cc:(.text+0x27b2): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'
libcartographer.a(trajectory.pb.cc.o): In function `cartographer::mapping::proto::Trajectory_Node::ByteSizeLong() const':
trajectory.pb.cc:(.text+0x27f8): undefined reference to `google::protobuf::internal::proto3_preserve_unknown_'

</char></char></char></char></char></char></char></char></char></char></char></char></char></char></char></char></char></char></char></char></char></char></char></char>

I have already intalled protobuf 3.4.1, anything wrong? does your cmakelists file link that???????

该提问来源于开源项目:cartographer-project/cartographer

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

13条回答

  • weixin_39886841 weixin_39886841 4月前

    i meet the same question

    Has this problem been solved?

    点赞 评论 复制链接分享
  • weixin_39781209 weixin_39781209 4月前

    can you try commenting out the line find_package(Protobuf 3.0.0 CONFIG QUIET) in cartographer/CMakeLists.txt

    Edit: my short tests seem to have confirmed that Protobuf in CMake CONFIG mode is problematic if you have Protobuf 2 installed, opened #1529.

    点赞 评论 复制链接分享
  • weixin_39886841 weixin_39886841 4月前

    I got the solution . git the protobuf v3.4.1

    cd protobuf mkdir build cd build cmake -G Ninja \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ -DCMAKE_BUILD_TYPE=Release \ -Dprotobuf_BUILD_TESTS=OFF \ ../cmake ninja sudo ninja install

    then

    catkin_make_isolated --install --use-ninja

    点赞 评论 复制链接分享
  • weixin_39904268 weixin_39904268 4月前

    Why protobuf 3.6.1 does not work?

    点赞 评论 复制链接分享
  • weixin_39886841 weixin_39886841 4月前

    https://google-cartographer.readthedocs.io/en/latest/index.html#getting-started-without-ros

    you can try 3.6.1 but required on the official website is the vision 3.4.1

    点赞 评论 复制链接分享
  • weixin_39904268 weixin_39904268 4月前

    This error is protobuf 3.6.1 comes

    点赞 评论 复制链接分享
  • weixin_39886841 weixin_39886841 4月前

    Are you sure you make protobuf use the right way ?

    点赞 评论 复制链接分享
  • weixin_39678089 weixin_39678089 4月前

    thx I will try this weekends.

    点赞 评论 复制链接分享
  • weixin_39569076 weixin_39569076 4月前

    For anyone who is struggling, I managed to fix such an error as follows:

    Do not run $ src/cartographer/scripts/install_proto3.sh as mentioned in this link. Instead in file install_proto3.sh try to remove:

    
    mkdir build
    cd build
    cmake -G Ninja \
      -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
      -DCMAKE_BUILD_TYPE=Release \
      -Dprotobuf_BUILD_TESTS=OFF \
      ../cmake
    ninja
    sudo ninja install
    

    then run $ src/cartographer/scripts/install_proto3.sh in terminal. After that, go to protobuf folder and run the following commands in terminal one by one:

    
    $ ./autogen.sh
    $ ./configure --prefix=/usr/local/ CC=/usr/bin/gcc
    $ make
    $ make check
    $ sudo make install
    $ sudo ldconfig  # refresh shared library cache
    $ protoc --version # just to ensure you have libprotoc 3.4.0 installed.
    

    At last, instead of using catkin_make_isolated --install --use-ninja you can continue building a project with $ catkin build without problem as in the fact that you need to have python-catkin-tools installed on your machine.

    Detail of my system: $ lsb_release -a

    
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 16.04.6 LTS
    Release:    16.04
    Codename:   xenial
    
    点赞 评论 复制链接分享
  • weixin_39678089 weixin_39678089 4月前

    +1

    点赞 评论 复制链接分享
  • weixin_39817391 weixin_39817391 4月前

    rtographer.a(relations.pb.cc.o): In function cartographer::ground_truth::proto::Relation::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const': relations.pb.cc:(.text+0x133): undefined reference togoogle::protobuf::internal::proto3_preserve_unknown_' libcartographer.a(relations.pb.cc.o): In function cartographer::ground_truth::proto::GroundTruth::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const': relations.pb.cc:(.text+0x1eb): undefined reference togoogle::protobuf::internal::proto3_preserve_unknown_' libcartographer.a(relations.pb.cc.o): In function cartographer::ground_truth::proto::protobuf_cartographer_2fground_5ftruth_2fproto_2frelations_2eproto::(anonymous namespace)::protobuf_RegisterTypes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': relations.pb.cc:(.text+0x261): undefined reference togoogle::protobuf::GoogleOnceInitImpl(long, google::protobuf::Closure)' relations.pb.cc:(.text+0x27a): undefined reference to google::protobuf::internal::RegisterAllTypes(google::protobuf::Metadata const*, int)' libcartographer.a(relations.pb.cc.o): In functioncartographer::ground_truth::proto::GroundTruth::GetMetadata() const': relations.pb.cc:(.text+0x301): undefined reference to google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)' libcartographer.a(relations.pb.cc.o): In functioncartographer::ground_truth::proto::protobuf_cartographer_2fground_5ftruth_2fproto_2frelations_2eproto::InitDefaults()': relations.pb.cc:(.text+0x3a1): undefined reference to google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)' libcartographer.a(relations.pb.cc.o): In functioncartographer::ground_truth::proto::protobuf_cartographer_2fground_5ftruth_2fproto_2frelations_2eproto::(anonymous namespace)::AddDescriptorsImpl()': relations.pb.cc:(.text+0x409): undefined reference to google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&))' libcartographer.a(relations.pb.cc.o): In functioncartographer::ground_truth::proto::protobuf_cartographer_2fground_5ftruth_2fproto_2frelations_2eproto::AddDescriptors()': relations.pb.cc:(.text+0x471): undefined reference to google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)' libcartographer.a(relations.pb.cc.o): In functioncartographer::ground_truth::proto::protobuf_cartographer_2fground_5ftruth_2fproto_2frelations_2eproto::(anonymous namespace)::protobuf_AssignDescriptors()': relations.pb.cc:(.text+0x58d): undefined reference to google::protobuf::internal::AssignDescriptors(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::internal::MigrationSchema const*, google::protobuf::Message const* const*, unsigned int const*, google::protobuf::MessageFactory*, google::protobuf::Metadata*, google::protobuf::EnumDescriptor const**, google::protobuf::ServiceDescriptor const**)' libcartographer.a(relations.pb.cc.o): In functioncartographer::ground_truth::proto::Relation::descriptor()': relations.pb.cc:(.text+0x701): undefined reference to google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)' libcartographer.a(relations.pb.cc.o): In functioncartographer::ground_truth::proto::GroundTruth::descriptor()': relations.pb.cc:(.text+0x8f1): undefined reference to google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)' libcartographer.a(relations.pb.cc.o): In functioncartographer::ground_truth::proto::protobuf_cartographer_2fground_5ftruth_2fproto_2frelations_2eproto::TableStruct::InitDefaultsImpl()': relations.pb.cc:(.text+0xa69): undefined reference to google::protobuf::internal::OnShutdownDestroyMessage(void const*)' relations.pb.cc:(.text+0xa80): undefined reference togoogle::protobuf::internal::OnShutdownDestroyMessage(void const)' libcartographer.a(relations.pb.cc.o): In function `cartographer::ground_truth::proto::Relation::InternalSerializeWithCachedSizesToArray(bool, unsigned char) const': relations.pb.cc:(.text+0x1c41): undefined reference

    Hello, have you solved this problem? I have the same problem. Can you help me? Thank you.

    点赞 评论 复制链接分享
  • weixin_39775872 weixin_39775872 4月前

    This will probably be fixed by #1491

    点赞 评论 复制链接分享
  • weixin_39781209 weixin_39781209 4月前

    My guess would be that this is due to Protobuf 3 conflicting with system Protobuf 2 from Ubuntu 16.04 repositories. The proper way to prevent this from happening is to change Protobuf’s CMAKE_INSTALL_PREFIX (and CMAKE_PREFIX_PATH when building Cartographer) to e.g. something in /home or in /opt to prevent this from happening. Or simply use Ubuntu 18.04 which comes with Protobuf 3.

    点赞 评论 复制链接分享

相关推荐