Compilation Error on latest version of RCLCPP
When I try to build the latest version of RCLCPP using Colcon, I get an error saying that a function was not declared in this scope:
~/ros2_ws$ colcon build --symlink-install --merge-install --packages-select rclcpp --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo
Starting >>> rclcpp
--- stderr: rclcpp
/home/jhassold/ros2_ws/src/ros2/rclcpp/rclcpp/src/rclcpp/publisher.cpp: In member function ‘rmw_qos_profile_t rclcpp::PublisherBase::get_actual_qos() const’:
/home/jhassold/ros2_ws/src/ros2/rclcpp/rclcpp/src/rclcpp/publisher.cpp:202:35: error: ‘rcl_publisher_get_actual_qos’ was not declared in this scope
const rmw_qos_profile_t * qos = rcl_publisher_get_actual_qos(&publisher_handle_);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jhassold/ros2_ws/src/ros2/rclcpp/rclcpp/src/rclcpp/publisher.cpp:202:35: note: suggested alternative: ‘rcl_publisher_get_options’
const rmw_qos_profile_t * qos = rcl_publisher_get_actual_qos(&publisher_handle_);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
rcl_publisher_get_options
make[2]: *** [CMakeFiles/rclcpp.dir/src/rclcpp/publisher.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/rclcpp.dir/all] Error 2
make: *** [all] Error 2
---
Failed <<< rclcpp [ Exited with code 2 ]
Summary: 0 packages finished [21.2s]
1 package failed: rclcpp
1 package had stderr output: rclcpp
I have tried backing up through the master branch, and the error consistently occurs at this commit: https://github.com/ros2/rclcpp/commit... . Any commits before that on the master branch will build just fine, whereas that one and all future ones will fail (always with the exact same error). The error continues to occur even if I delete my build and install folders, and try to have colcon reconstruct everything.
HOWEVER I'm not sure that it's actually that commit's fault - my colleague is able to build rclcpp just fine. Which leads me to think that something got messed up in my environment. However, I don't really know where to start looking.
Has anyone else run into this sort of an issue before? Was it an environment error? And if so, what should I do to make sure that this doesn't happen in future? I'm hoping that I can fix this without having to completely reinstall ROS2...