Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding boost/bind/bind.hpp includes to files missing them and replacing <boost/bind.hpp> with <boost/bind/bind.hpp> #3

Closed
wants to merge 1 commit into from

Conversation

lucasw
Copy link

@lucasw lucasw commented Aug 2, 2024

I was getting many of these warning messages until I made these changes, building on Ubuntu 24.04:

In file included from /usr/include/boost/smart_ptr/detail/requires_cxx11.hpp:9,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:17,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /home/lucasw/ros/ros1/install/underlay_ws/src/ros_comm/clients/roscpp/include/ros/forwards.h:37,
                 from /home/lucasw/ros/ros1/install/underlay_ws/devel/.private/roscpp/include/ros/common.h:37,
                 from /home/lucasw/ros/ros1/install/underlay_ws/src/ros_comm/clients/roscpp/include/ros/subscriber_link.h:31,
                 from /home/lucasw/ros/ros1/install/underlay_ws/src/ros_comm/clients/roscpp/include/ros/intraprocess_subscriber_link.h:30,
                 from /home/lucasw/ros/ros1/install/underlay_ws/src/ros_comm/clients/roscpp/src/libros/intraprocess_subscriber_link.cpp:29:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~

…ost bind, and changing all includes to use the longer path as called for by the pragma warning message 'Please use <boost/bind/bind.hpp>'
@lucasw
Copy link
Author

lucasw commented Aug 2, 2024

@v4hn
Copy link
Member

v4hn commented Aug 6, 2024

The reason why I did not push this patch here before is that some repositories still transitively use boost's _1 from these headers without including <boost/bind.hpp> and these start failing when the headers are changed.
The number shrunk a lot though since we started ros-o.

I absolutely agree that the warnings are problematic though and hinder debugging of real issues. I started going through my stack of repos again, fixing the remaining issues here. I found two hand full so far which I already fixed in ros-o or upstream where I have access.

** -- Edit --**

It's a pretty large hand full still, let's see how long I need to get through them...

v4hn added a commit to PR2/pr2_common_actions that referenced this pull request Aug 6, 2024
this relied on an implicit include of `boost/bind.hpp` from the ros_comm
headers and ROS-O changes this include due to countless downstream warnings.
ros-o/ros_comm#3
v4hn added a commit to PR2/pr2_gripper_sensor that referenced this pull request Aug 6, 2024
this relied on an implicit include of `boost/bind.hpp` from the ros_comm
headers and ROS-O changes this include due to countless downstream warnings.
ros-o/ros_comm#3
v4hn added a commit to TAMS-Group/robotiq that referenced this pull request Aug 6, 2024
these relied on an implicit include of `boost/bind.hpp` from the ros_comm
headers and ROS-O changes this include due to countless downstream warnings.

ros-o/ros_comm#3
v4hn added a commit to TAMS-Group/tams_pr2 that referenced this pull request Aug 6, 2024
this relied on an implicit include of `boost/bind.hpp` from the ros_comm
headers and ROS-O changes this include due to countless downstream warnings.
ros-o/ros_comm#3
v4hn added a commit to ros-o/sr-ros-interface-ethercat that referenced this pull request Aug 6, 2024
The symbols have always been used through implicit includes from
ros_comm, but ROS-O considers changing these includes right now because
of excessive deprecation warnings building all of ROS.
ros-o/ros_comm#3
v4hn added a commit to ros-o/sr_core that referenced this pull request Aug 6, 2024
The symbols have always been used through implicit includes from
ros_comm, but ROS-O considers changing these includes right now because
of excessive deprecation warnings building all of ROS.
ros-o/ros_comm#3
v4hn added a commit to ros-o/sr-ros-interface-ethercat that referenced this pull request Aug 6, 2024
The symbols have always been used through implicit includes from
ros_comm, but ROS-O considers changing these includes right now because
of excessive deprecation warnings building all of ROS.
ros-o/ros_comm#3

(copyright updates required by Shadow CI)
v4hn added a commit to ros-o/sr_core that referenced this pull request Aug 6, 2024
The symbols have always been used through implicit includes from
ros_comm, but ROS-O considers changing these includes right now because
of excessive deprecation warnings building all of ROS.
ros-o/ros_comm#3

(copyright updates are enforced by Shadow's CI)
v4hn added a commit to ros-o/laser_proc that referenced this pull request Aug 11, 2024
The symbols have always been used through implicit includes from
ros_comm, but ROS-O considers changing these includes right now because
of excessive deprecation warnings building all of ROS.

ros-o/ros_comm#3
v4hn added a commit to ros-o/urg_node that referenced this pull request Aug 13, 2024
These were implicitly included through ros_comm
and [ROS-O] will likely change that include soon
ros-o/ros_comm#3
due to an excessive amount of warnings.
v4hn added a commit to ros-o/openni_camera that referenced this pull request Aug 14, 2024
The symbol was included through ros_comm,
but ROS-O plans to change that include due to excessive deprecation warnings:
ros-o/ros_comm#3

Lambdas should be preferred over bind these days.
v4hn added a commit to ros-o/sr-ros-interface-ethercat that referenced this pull request Aug 19, 2024
The symbols have always been used through implicit includes from
ros_comm, but ROS-O considers changing these includes right now because
of excessive deprecation warnings building all of ROS.
ros-o/ros_comm#3

(copyright updates required by Shadow CI)
v4hn added a commit to ros-o/sr_core that referenced this pull request Aug 19, 2024
The symbols have always been used through implicit includes from
ros_comm, but ROS-O considers changing these includes right now because
of excessive deprecation warnings building all of ROS.
ros-o/ros_comm#3

(copyright updates are enforced by Shadow's CI)
@v4hn
Copy link
Member

v4hn commented Aug 19, 2024

@lucasw was there a reason why you did not migrate message_filters as well?

v4hn added a commit to ros-o/sr-ros-interface-ethercat that referenced this pull request Aug 19, 2024
The symbols have always been used through implicit includes from
ros_comm, but ROS-O considers changing these includes right now because
of excessive deprecation warnings building all of ROS.
ros-o/ros_comm#3

(copyright updates required by Shadow CI)
@lucasw
Copy link
Author

lucasw commented Aug 19, 2024

@lucasw was there a reason why you did not migrate message_filters as well?

No I must have missed that

v4hn added a commit to ros-o/sr_core that referenced this pull request Aug 19, 2024
The symbols have always been used through implicit includes from
ros_comm, but ROS-O considers changing these includes right now because
of excessive deprecation warnings building all of ROS.
ros-o/ros_comm#3

(copyright updates are enforced by Shadow's CI)
v4hn added a commit to ros-o/slam_gmapping that referenced this pull request Aug 20, 2024
using a lambda is encouraged from c++11.

This breaks with a recent [ROS-O] proposal to adapt a ros_comm
header include API. ros-o/ros_comm#3
v4hn added a commit to ros-o/slam_karto that referenced this pull request Aug 20, 2024
lambdas should be preferred.
This implicit use breaks with a recently proposed API change
for ros_comm in ROS-O. ros-o/ros_comm#3
v4hn added a commit to ros-o/fetch_ros that referenced this pull request Aug 20, 2024
Lambdas are preferred since c++11.
The transitively included use of _1 starts failing with a recently
proposed change to adapt the boost-bind include API in ros_comm.
ros-o/ros_comm#3
@v4hn
Copy link
Member

v4hn commented Aug 27, 2024

I have everything on my side that built before building with the patches as well now.
See here and the various patches referenced in this PR.

Multiple unconsidered packages will still require an additional patch due to this change, but as this is integrated in at least two other build types for some time already (Debian and your work @lucasw) and it removes a huge amount of bloat from the build logs, I will go ahead and merge.

@v4hn v4hn closed this in 445ea8a Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants