'boost::placeholders' has not been declared (Ubuntu 20.04/ROS Noetic)

asked 2021-02-19 02:47:20 -0600

tobiasfriden gravatar image

Hello,

I am trying to run ROS noetic on Ubuntu 20.04 but I am getting compilation issues in the core ROS libraries. My kernel and distro versions:

dji@manifold2:~/catkin_ws$ uname -r
5.4.0-65-generic
dji@manifold2:~/catkin_ws$ lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:        20.04
Codename:       focal

I have done a fresh install of ROS Noetic by following the instructions at http://wiki.ros.org/noetic/Installati.... However, when trying to compile my package I am getting compile errors like this:

In file included from /opt/ros/noetic/include/ros/ros.h:55,
             from /home/dji/catkin_ws/src/node_example/include/node_example/talker.h:5,
             from /home/dji/catkin_ws/src/node_example/src/nodes/talker_node.cpp:1:
/opt/ros/noetic/include/ros/topic.h: In function ‘boost::shared_ptr<const M> ros::topic::waitForMessage(const string&,  ros::NodeHandle&, ros::Duration)’:
/opt/ros/noetic/include/ros/topic.h:90:93: error: ‘boost::placeholders’ has not been declared
   90 |   ops.template init<M>(topic, 1, boost::bind(&SubscribeHelper<M>::callback, &helper, boost::placeholders::_1));

To check if my package was the issue (I was previously using ROS Kinetic) I tried compiling this package: https://github.com/tdenewiler/node_ex..., but I get the same issue.

Any help much appreciated.

edit retag flag offensive close merge delete

Comments

I got the same error in my PC which has ROS Noetic and Ubuntu 20.04. But then I checked into my another PC which has the same setup and no error was coming. So I guess you should try onto some other PC. I am sorry that I am not giving you a technical answer.

gaurav07 gravatar image gaurav07  ( 2021-06-06 15:41:27 -0600 )edit