Can't compile moveit_ros, getting linking errors. What can be the cause?
Linking CXX shared library /Users/sk/ros_workspace/moveit/devel/lib/libmoveit_depth_image_octomap_updater_core.dylib
[ 57%] Built target moveit_pointcloud_octomap_updater
Undefined symbols for architecture x86_64:
"occupancy_map_monitor::OccupancyMapMonitor::setMapFrame(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
occupancy_map_monitor::DepthImageOctomapUpdater::depthImageCallback(boost::shared_ptr<sensor_msgs::Image_<std::__1::allocator<void> > const> const&, boost::shared_ptr<sensor_msgs::CameraInfo_<std::__1::allocator<void> > const> const&) in depth_image_octomap_updater.cpp.o
"occupancy_map_monitor::OccupancyMapUpdater::readXmlParam(XmlRpc::XmlRpcValue&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, double*)", referenced from:
occupancy_map_monitor::DepthImageOctomapUpdater::setParams(XmlRpc::XmlRpcValue&) in depth_image_octomap_updater.cpp.o
"occupancy_map_monitor::OccupancyMapUpdater::readXmlParam(XmlRpc::XmlRpcValue&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int*)", referenced from:
occupancy_map_monitor::DepthImageOctomapUpdater::setParams(XmlRpc::XmlRpcValue&) in depth_image_octomap_updater.cpp.o
"occupancy_map_monitor::OccupancyMapUpdater::updateTransformCache(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, ros::Time const&)", referenced from:
occupancy_map_monitor::DepthImageOctomapUpdater::depthImageCallback(boost::shared_ptr<sensor_msgs::Image_<std::__1::allocator<void> > const> const&, boost::shared_ptr<sensor_msgs::CameraInfo_<std::__1::allocator<void> > const> const&) in depth_image_octomap_updater.cpp.o
"occupancy_map_monitor::OccupancyMapUpdater::OccupancyMapUpdater(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
occupancy_map_monitor::DepthImageOctomapUpdater::DepthImageOctomapUpdater() in depth_image_octomap_updater.cpp.o
"occupancy_map_monitor::OccupancyMapUpdater::~OccupancyMapUpdater()", referenced from:
occupancy_map_monitor::DepthImageOctomapUpdater::DepthImageOctomapUpdater() in depth_image_octomap_updater.cpp.o
occupancy_map_monitor::DepthImageOctomapUpdater::~DepthImageOctomapUpdater() in depth_image_octomap_updater.cpp.o
"typeinfo for occupancy_map_monitor::OccupancyMapUpdater", referenced from:
typeinfo for occupancy_map_monitor::DepthImageOctomapUpdater in depth_image_octomap_updater.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [/Users/sk/ros_workspace/moveit/devel/lib/libmoveit_depth_image_octomap_updater_core.dylib] Error 1
make[1]: *** [moveit_ros/perception/depth_image_octomap_updater/CMakeFiles/moveit_depth_image_octomap_updater_core.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 57%] Building CXX object moveit_ros/perception/semantic_world/CMakeFiles/moveit_semantic_world.dir/src/semantic_world.cpp.o
Linking CXX shared library /Users/sk/ros_workspace/moveit/devel/lib/libmoveit_semantic_world.dylib
[ 57%] Built target moveit_semantic_world
make: *** [all] Error 2
Update:
it can be fixed by adding moveit_occupancy_map_monitor to target_link_libraries of depth_image_octomap_updater
target_link_libraries(${MOVEIT_LIB_NAME}_core moveit_occupancy_map_monitor moveit_mesh_filter ${catkin_LIBRARIES} ${Boost_LIBRARIES})
but i'm not sure if it was removed in indigo-devel intentionally, and if it should be put back
Originally posted by sk2009 on ROS Answers with karma: 3 on 2014-09-18
Post score: 0