Unable to link ROS libraries using Lunar

asked 2017-11-07 00:37:43 -0500

stridera gravatar image

updated 2017-11-07 00:54:54 -0500

Hey guys, hopefully you can help me out with this. I'm trying to make the dataspeed DBW package. However, when I do, I keep getting errors that it can't link ros libraries.

dbc_node.cpp:(.text+0x13a): undefined reference to `ros::init(int&, char**, std::string const&, unsigned int)'
dbc_node.cpp:(.text+0x196): undefined reference to `ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)'
dbc_node.cpp:(.text+0x21b): undefined reference to `ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)'
dbc_node.cpp:(.text+0x2a1): undefined reference to `ros::NodeHandle::getParam(std::string const&, std::string&) const'
dbc_node.cpp:(.text+0x338): undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
dbc_node.cpp:(.text+0x447): undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'

They don't explicitly say they support lunar, but it doesn't seem like it's something that should be causing a problem. Does lunar require a different way of being linked or is there some other steps I can take. (Short of uninstalling lunar and going back to indigo or kinetic)

Thanks guys

edit retag flag offensive close merge delete

Comments

Please add links to the packages that you are referring to.

gvdhoorn gravatar image gvdhoorn  ( 2017-11-07 00:40:41 -0500 )edit

Apologies: https://bitbucket.org/DataspeedInc/db...

(I had it there, but after signing in I had to rewrite the post. Guess I forgot it then.)

stridera gravatar image stridera  ( 2017-11-07 00:54:18 -0500 )edit

I've checked the repository, but at least in the default branch I cannot find a file named dbc_node.cpp. Can you check that is the correct repository?

gvdhoorn gravatar image gvdhoorn  ( 2017-11-07 01:11:02 -0500 )edit

It's under src/dataspeed_can/dataspeed_can_tools/src/

stridera@fluttershy:~/dbw$ find . | grep dbc_node.cpp
./src/dataspeed_can/dataspeed_can_tools/src/dbc_node.cpp
./build/dataspeed_can/dataspeed_can_tools/CMakeFiles/dbc_node.dir/src/dbc_node.cpp.o
stridera gravatar image stridera  ( 2017-11-07 01:20:49 -0500 )edit

It's under src/dataspeed_can/dataspeed_can_tools/src/

Which is not part of the repository you linked to, but of another, different repository.

gvdhoorn gravatar image gvdhoorn  ( 2017-11-07 01:23:16 -0500 )edit

I think this would be something to report over at DataspeedInc/dataspeed_can/issues, as this is a build error, not a usage problem.

It might be that they were depending on one of the libs transitively brining in the symbols that are mising.

gvdhoorn gravatar image gvdhoorn  ( 2017-11-07 01:26:45 -0500 )edit

Yeah, I was going to do that but figured I would ask first to make sure it wasn't an issue with my setup. Thanks for your help!

stridera gravatar image stridera  ( 2017-11-07 01:32:43 -0500 )edit

I don't know whether it is an issue with your setup, but I would still report it over there.

If/when you open an issue, please post a link to the issue here on ROS Answers, so we keep things connected.

gvdhoorn gravatar image gvdhoorn  ( 2017-11-07 01:43:55 -0500 )edit