Ask Your Question
0

Cross compiling ROS from source for QNX throws linker error for C 11

asked 2017-06-22 13:06:34 -0500

mhariharasudan gravatar image

updated 2017-06-22 14:29:00 -0500

I cross compiled all the third party dependent software for ROS for QNX 7.0 ArmV7. While cross compiling ROS, the linker throws an error linking against the standard c++11 features in the rospack package.

I also tried editing the CMakeLists.txt of rospack to support C++11 but that didnt help

/opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so/opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: warning: : The 'tmpnam' function is dangerous. Use 'mkstemp' instead.warning: The 'tmpnam' function is dangerous. Use 'mkstemp' instead. /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.sowarning: : The 'tempnam' function is dangerous. Use 'mkstemp' instead.warning: The 'tempnam' function is dangerous. Use 'mkstemp' instead. /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: undefined reference to /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.sostd::basic_ios<char, std::char_traits<char> >::init(std::basic_streambuf<char, std::char_traits<char> >*): undefined reference to' std::basic_ios<char, std::char_traits<char=""> >::init(std::basic_streambuf<char, std::char_traits<char=""> >)' /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace_aux(unsigned int, unsigned int, unsigned int, char)' /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: undefined reference tostd::__cxx11::basic_string<char, std::char_traits<char="">, std::allocator<char> >::_M_replace_aux(unsigned int, unsigned int, unsigned int, char)' /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: undefined reference to std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_M_create(unsigned int&, unsigned int)' /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: undefined reference to/opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.sostd::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t="">, std::allocator<wchar_t> >::_M_create(unsigned int&, unsigned int): undefined reference to ' std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)' /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: undefined reference tostd::__cxx11::basic_string<char, std::char_traits<char="">, std::allocator<char> >::_M_append(char const, unsigned int)' /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: undefined reference to std::_Rb_tree_decrement(std::_Rb_tree_node_base*)' /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: undefined reference tostd::ios_base::~ios_base()/opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so' : undefined reference to std::_Rb_tree_decrement(std::_Rb_tree_node_base*)' /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: undefined reference to/opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: undefined reference to std::ios_base::~ios_base()std::_Rb_tree_increment(std::_Rb_tree_node_base*)' ' /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: undefined reference to/opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.sostd::__cxx11::basic_string<char, std::char_traits<char="">, std::allocator<char> >::compare(std::__cxx11::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&) const: undefined reference to ' std::_Rb_tree_increment(std::_Rb_tree_node_base*)' /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: undefined reference tostd::__cxx11::basic_string<char, std::char_traits<char="">, std::allocator<char> >::compare(std::__cxx11::basic_string<char, std::char_traits<char="">, std::allocator ...

(more)
edit retag flag offensive close merge delete

Comments

Can you share the CMAKE_TOOLCHAIN_FILE you're using for QNX?

cdtdoug gravatar image cdtdoug  ( 2017-06-22 13:58:30 -0500 )edit

I have added the toolchain file for your reference

mhariharasudan gravatar image mhariharasudan  ( 2017-06-22 14:29:18 -0500 )edit

@mhariharasudan: in the future: please use the Preformatted Text button (the one with 101010 on it) instead of the block quote for console and code copy-pastes. It works much better.

Thanks.

gvdhoorn gravatar image gvdhoorn  ( 2017-06-22 15:02:22 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-06-27 11:52:08 -0500

mhariharasudan gravatar image

I did not get this error when I compiled my boost libraries as dynamic instead of static

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-06-22 13:06:34 -0500

Seen: 321 times

Last updated: Jun 27 '17