0
$\begingroup$

Rosanswers logo

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?


Originally posted by PKG on ROS Answers with karma: 365 on 2011-08-22

Post score: 1

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

There was an unmet dependency of roscpp_serialization in this package.


Originally posted by PKG with karma: 365 on 2011-08-27

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$
0
$\begingroup$

Rosanswers logo

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.


Originally posted by lizyazpin with karma: 1 on 2013-11-10

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.