Boost errors with ros/console.h

asked 2020-02-04 06:39:40 -0500

broomstick gravatar image

updated 2020-02-04 07:16:31 -0500

gvdhoorn gravatar image

I'm building a simple talker/listener demo and I'm trying to cross-compile to a real-time operating system called RTEMS.

During compilation, I get the following error associated with ros/console.h, included from ros/assert.h:

In file included from ../../../../ros/melodic_catkin_ws/install_isolated/include/ros/assert.h:35,
                 from ../../../boost_1_72_0/boost/assert.hpp:58,
                 from ../../../boost_1_72_0/boost/math/policies/policy.hpp:21,
                 from ../../../boost_1_72_0/boost/math/policies/error_handling.hpp:21,
                 from ../../../boost_1_72_0/boost/math/special_functions/round.hpp:14,
                 from ../../../../ros/melodic_catkin_ws/install_isolated/include/ros/time.h:58,
                 from ../../../../ros/melodic_catkin_ws/install_isolated/include/ros/ros.h:38,
                 from ../../ros/listener/listener.cpp:3:
../../../../ros/melodic_catkin_ws/install_isolated/include/ros/console.h:126:16: error: 'shared_ptr' in namespace 'boost' does not name a template type; did you mean 'shared_array'?
  126 | typedef boost::shared_ptr<Token> TokenPtr;
      |                ^~~~~~~~~~
      |                shared_array
../../../../ros/melodic_catkin_ws/install_isolated/include/ros/console.h:127:21: error: 'TokenPtr' was not declared in this scope; did you mean 'Token'?
  127 | typedef std::vector<TokenPtr> V_Token;
      |                     ^~~~~~~~
      |                     Token
../../../../ros/melodic_catkin_ws/install_isolated/include/ros/console.h:127:29: error: template argument 1 is invalid
  127 | typedef std::vector<TokenPtr> V_Token;
      |                             ^
../../../../ros/melodic_catkin_ws/install_isolated/include/ros/console.h:127:29: error: template argument 2 is invalid

I thought this might be a problem with using the Boost installed from my package manager, so I installed it from source. In any case, the Boost files appear to be the 'header-only' libraries, which don't require platform-specific compilation.

I've built this just fine when I'm not cross-compiling, so presumably it's not primarily a ROS problem, but I was hoping someone might be able to give me some hints as to what's happening so I can fix whatever's going on with my cross-compilation.

edit retag flag offensive close merge delete