ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

utm_odometry_node fails to build

asked 2011-08-22 16:29:36 -0600

PKG gravatar image

updated 2011-08-22 16:31:29 -0600

On a fresh checkout of gps_common , my utm_odometry_node fails to build, citing the error:

Linking CXX executable ../bin/utm_odometry_node CMakeFiles/utm_odometry_node.dir/src/utm_odometry_node.o: In function `ros::serialization::Stream::advance(unsigned int)':

/opt/ros/diamondback/ros/core/roslib/include/ros/serialization.h:675: undefined reference to `ros::serialization::throwStreamOverrun()'

/opt/ros/diamondback/ros/core/roslib/include/ros/serialization.h:675: undefined reference to `ros::serialization::throwStreamOverrun()'

/opt/ros/diamondback/ros/core/roslib/include/ros/serialization.h:675: undefined reference to `ros::serialization::throwStreamOverrun()'

/opt/ros/diamondback/ros/core/roslib/include/ros/serialization.h:675: undefined reference to `ros::serialization::throwStreamOverrun()'

/opt/ros/diamondback/ros/core/roslib/include/ros/serialization.h:675: undefined reference to `ros::serialization::throwStreamOverrun()'

CMakeFiles/utm_odometry_node.dir/src/utm_odometry_node.o:/opt/ros/diamondback/ros/core/roslib/include/ros/serialization.h:675: more undefined references to `ros::serialization::throwStreamOverrun()' follow collect2: ld returned 1 exit status

The issue seems to be that throwStreamOverrun() alone is not defined in serialization.h; it's defined in serialization.cpp. I'm running ROS diamondback on Lucid.

Is there a simple workaround?

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
0

answered 2011-08-27 15:53:11 -0600

PKG gravatar image

There was an unmet dependency of roscpp_serialization in this package.

edit flag offensive delete link more
1

answered 2013-11-10 22:39:50 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I had the same problem, one of my friends told me I was missing some linker dependencies to ros::serialization::throwStreamOverrun().

And also that I needed to add the package that contains ros::serialization to the build_dependencies and the run_dependencies in the package.xml and also to the CMakeLists.txt.

In the CMake-file the build_dependencies are in the line that starts with find_package(catkin REQUIRED COMPONENTS and the run_dependencies usually are in the catkin_package( ... block. Also, in the line target_link_libraries(your_executable ${catkin_LIBRARIES}) that belongs to your executable you might need to add the ${catkin_LIBRARIES} if it is not already there.

For me that worked and hope for you also.

edit flag offensive delete link more
0

answered 2011-11-22 01:25:36 -0600

ela_es gravatar image

Hi, I have the same problem, could you tell how did you exactly solve it?? thanks

edit flag offensive delete link more

Comments

Probably just add roscpp_serialization to the dependencies in manifest.xml.
dornhege gravatar image dornhege  ( 2011-11-22 01:28:36 -0600 )edit
Exactly , as said
PKG gravatar image PKG  ( 2011-11-24 10:14:28 -0600 )edit
I added roscpp_serialization dependency in manifest.xml of my package, but its still not working. Im using electric instead of diamondback.
ela_es gravatar image ela_es  ( 2011-11-27 23:29:49 -0600 )edit
0

answered 2011-11-27 23:34:17 -0600

ela_es gravatar image

updated 2011-11-27 23:38:29 -0600

Here is the error
CMakeFiles/creaimagen.dir/src/creaimagen.o: In function `ros::serialization::Stream::advance(unsigned int)':

/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_serialization/include/ros/serialization.h:678: undefined reference to `ros::serialization::throwStreamOverrun()'

/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_serialization/include/ros/serialization.h:678: undefined reference to `ros::serialization::throwStreamOverrun()'

/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_serialization/include/ros/serialization.h:678: undefined reference to `ros::serialization::throwStreamOverrun()'

/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_serialization/include/ros/serialization.h:678: undefined reference to `ros::serialization::throwStreamOverrun()'

/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_serialization/include/ros/serialization.h:678: undefined reference to `ros::serialization

CMakeFiles/creaimagen.dir/src/creaimagen.o:/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_serialization/include/ros/serialization.h:678: more undefined references to `ros::serialization::throwStreamOverrun()' follow collect2: ld returned 1 exit status

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-08-22 16:29:36 -0600

Seen: 2,297 times

Last updated: Nov 10 '13