ROSPlan icon indicating copy to clipboard operation
ROSPlan copied to clipboard

undefined reference to mongo::BSONObj::jsonString

Open ysl208 opened this issue 7 years ago • 2 comments

Hi,

When i run catkin build I get the following errors for both rosplan_interface_movebase and rosplan_interface_mapping

Errors     << rosplan_interface_mapping:make /home/user/catkin_ws/logs/rosplan_interface_mapping/build.make.006.log                
CMakeFiles/rpsimplemapServer.dir/src/RPSimpleMapServer.cpp.o: In function mongo::BSONObjBuilder::BSONObjBuilder(int)': RPSimpleMapServer.cpp:(.text._ZN5mongo14BSONObjBuilderC2Ei[_ZN5mongo14BSONObjBuilderC5Ei]+0x65): undefined reference to mongo::BSONObjBuilderValueStream::BSONObjBuilderValueStream(mongo::BSONObjBuilder*)' CMakeFiles/rpsimplemapServer.dir/src/RPSimpleMapServer.cpp.o: In function mongo::_BufBuilder<mongo::TrivialAllocator>::claimReservedBytes(int)': RPSimpleMapServer.cpp:(.text._ZN5mongo11_BufBuilderINS_16TrivialAllocatorEE18claimReservedBytesEi[_ZN5mongo11_BufBuilderINS_16TrivialAllocatorEE18claimReservedBytesEi]+0x34): undefined reference to mongo::invariantFailed(char const*, char const*, unsigned int)' CMakeFiles/rpsimplemapServer.dir/src/RPSimpleMapServer.cpp.o: In function std::string mongodb_store::MessageStoreProxy::insertNamed<geometry_msgs::PoseStamped_<std::allocator<void> > >(std::string const&, geometry_msgs::PoseStamped_<std::allocator<void> > const&, mongo::BSONObj const&, bool)': RPSimpleMapServer.cpp:(.text._ZN13mongodb_store17MessageStoreProxy11insertNamedIN13geometry_msgs12PoseStamped_ISaIvEEEEESsRKSsRKT_RKN5mongo7BSONObjEb[_ZN13mongodb_store17MessageStoreProxy11insertNamedIN13geometry_msgs12PoseStamped_ISaIvEEEEESsRKSsRKT_RKN5mongo7BSONObjEb]+0x74): undefined reference to mongo::BSONObjBuilder::appendElements(mongo::BSONObj)' CMakeFiles/rpsimplemapServer.dir/src/RPSimpleMapServer.cpp.o: In function std::string mongodb_store::MessageStoreProxy::insert<geometry_msgs::PoseStamped_<std::allocator<void> > >(geometry_msgs::PoseStamped_<std::allocator<void> > const&, std::string const&, std::string const&, mongo::BSONObj const&, bool)': RPSimpleMapServer.cpp:(.text._ZN13mongodb_store17MessageStoreProxy6insertIN13geometry_msgs12PoseStamped_ISaIvEEEEESsRKT_RKSsSA_RKN5mongo7BSONObjEb[_ZN13mongodb_store17MessageStoreProxy6insertIN13geometry_msgs12PoseStamped_ISaIvEEEEESsRKT_RKSsSA_RKN5mongo7BSONObjEb]+0xbd): undefined reference to mongo::BSONObj::jsonString(mongo::JsonStringFormat, int, bool) const' RPSimpleMapServer.cpp:(.text._ZN13mongodb_store17MessageStoreProxy6insertIN13geometry_msgs12PoseStamped_ISaIvEEEEESsRKT_RKSsSA_RKN5mongo7BSONObjEb[_ZN13mongodb_store17MessageStoreProxy6insertIN13geometry_msgs12PoseStamped_ISaIvEEEEESsRKT_RKSsSA_RKN5mongo7BSONObjEb]+0x1d6): undefined reference to mongo::BSONObj::jsonString(mongo::JsonStringFormat, int, bool) const' collect2: error: ld returned 1 exit status make[2]: *** [/home/ying/catkin_ws/devel/.private/rosplan_interface_mapping/lib/rosplan_interface_mapping/rpsimplemapServer] Error 1 make[1]: *** [CMakeFiles/rpsimplemapServer.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... CMakeFiles/rproadmapServer.dir/src/RPRoadmapServer.cpp.o: In function mongo::BSONObjBuilder::BSONObjBuilder(int)': RPRoadmapServer.cpp:(.text._ZN5mongo14BSONObjBuilderC2Ei[_ZN5mongo14BSONObjBuilderC5Ei]+0x65): undefined reference to mongo::BSONObjBuilderValueStream::BSONObjBuilderValueStream(mongo::BSONObjBuilder*)' CMakeFiles/rproadmapServer.dir/src/RPRoadmapServer.cpp.o: In function mongo::_BufBuildermongo::TrivialAllocator::claimReservedBytes(int)': RPRoadmapServer.cpp:(.text.ZN5mongo11_BufBuilderINS_16TrivialAllocatorEE18claimReservedBytesEi[ZN5mongo11_BufBuilderINS_16TrivialAllocatorEE18claimReservedBytesEi]+0x34): undefined reference to mongo::invariantFailed(char const*, char const*, unsigned int)' CMakeFiles/rproadmapServer.dir/src/RPRoadmapServer.cpp.o: In function std::string mongodb_store::MessageStoreProxy::insertNamed<geometry_msgs::PoseStamped<std::allocator > >(std::string const&, geometry_msgs::PoseStamped<std::allocator > const&, mongo::BSONObj const&, bool)': RPRoadmapServer.cpp:(.text.ZN13mongodb_store17MessageStoreProxy11insertNamedIN13geometry_msgs12PoseStamped_ISaIvEEEEESsRKSsRKT_RKN5mongo7BSONObjEb[ZN13mongodb_store17MessageStoreProxy11insertNamedIN13geometry_msgs12PoseStamped_ISaIvEEEEESsRKSsRKT_RKN5mongo7BSONObjEb]+0x74): undefined reference to mongo::BSONObjBuilder::appendElements(mongo::BSONObj)' CMakeFiles/rproadmapServer.dir/src/RPRoadmapServer.cpp.o: In function std::string mongodb_store::MessageStoreProxy::insert<geometry_msgs::PoseStamped<std::allocator > >(geometry_msgs::PoseStamped<std::allocator > const&, std::string const&, std::string const&, mongo::BSONObj const&, bool)': RPRoadmapServer.cpp:(.text._ZN13mongodb_store17MessageStoreProxy6insertIN13geometry_msgs12PoseStamped_ISaIvEEEEESsRKT_RKSsSA_RKN5mongo7BSONObjEb[_ZN13mongodb_store17MessageStoreProxy6insertIN13geometry_msgs12PoseStamped_ISaIvEEEEESsRKT_RKSsSA_RKN5mongo7BSONObjEb]+0xbd): undefined reference to mongo::BSONObj::jsonString(mongo::JsonStringFormat, int, bool) const' RPRoadmapServer.cpp:(.text._ZN13mongodb_store17MessageStoreProxy6insertIN13geometry_msgs12PoseStamped_ISaIvEEEEESsRKT_RKSsSA_RKN5mongo7BSONObjEb[_ZN13mongodb_store17MessageStoreProxy6insertIN13geometry_msgs12PoseStamped_ISaIvEEEEESsRKT_RKSsSA_RKN5mongo7BSONObjEb]+0x1d6): undefined reference to mongo::BSONObj::jsonString(mongo::JsonStringFormat, int, bool) const' collect2: error: ld returned 1 exit status make[2]: ***

I have mongodb_store installed.

ros-indigo-mongodb-store/trusty,now 0.4.2-0trusty-20180603-233334-0800 amd64 [installed]

So not sure what the cause is. I appreciate your help.

ysl208 avatar Jul 13 '18 16:07 ysl208

Is there any more information in the error message? (e.g. which line is causing the error)

Michael

m312z avatar Jul 17 '18 12:07 m312z

Hi Michael, thanks for getting back at me. Added the entire error message. in the original post

ysl208 avatar Jul 17 '18 13:07 ysl208