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

[ros2] trim boost dependencies #583

Merged

Conversation

mikaelarguedas
Copy link
Contributor

@mikaelarguedas mikaelarguedas commented Aug 1, 2020

In an ongoing effort to reduce the footprint on the target systems, it is preferred to declare specific dependencies instead of generic ones.

This PR gets rid of the runtime dependency on boost completely and trims down the build dependencies to only the boost headers and no the boost libraries, the part of boost being used in this package being a header only lib.


@SteveMacenski I see #579 added a build, build_export and exec dependency on all boost libraries (~800MB) but the CMakeLists doesnt make use of the Boost headers or libraries for any of its targets. What are the steps I should take to confirm this PR doesnt reintroduce the problems #579 was fixing ?
Currently I only confirmed that, in a fresh environment, I can use rosdep to install the deps of the package and then the package builds successfully and all the tests pass.

Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
…therwise

Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
@SteveMacenski
Copy link
Collaborator

SteveMacenski commented Aug 1, 2020

Good question, that was done because the build farm was failing to release binaries because of the missing dependency (and various other warnings / errors that PR resolved). This should probably be OK. I tend to use depend general tag as I'm not generally concerned about image sizes (and I generally don't use boost when I have an option). Happy to help accommodate for users that do need to keep things small.

@SteveMacenski SteveMacenski merged commit 285a386 into cra-ros-pkg:foxy-devel Aug 1, 2020
@mikaelarguedas
Copy link
Contributor Author

I tend to use depend general tag as I'm not generally concerned about image sizes

Yeah this became pretty common in ROS 2 packages.
Even using those it's possible to avoid requiring to pull GB of unnecessary libraries by selecting the specific rosdep keys needed by a package (e.g. ros/class_loader#136)

and I generally don't use boost when I have an option

Mentioning it here because ROS 2 packages being mostly Boost-free, the impact of a package pulling every boost library is big (for target image size but also machine time in general) and out of the handful of packages that do use the boost key are karto_sdk and slam_toolbox 😉

@mikaelarguedas mikaelarguedas deleted the ros2_trim_boost_deps branch August 1, 2020 21:55
@SteveMacenski
Copy link
Collaborator

Even using those it's possible to avoid requiring to pull GB of unnecessary libraries by selecting the specific rosdep keys needed by a package (e.g. ros/class_loader#136)

I wasn't aware of that off hand, good to know. My modified open karto library is extremely ingrained with boost that cannot be removed. We need the serialization module, there's no way around that. The thread and other system modules potentially could be removed.

@mikaelarguedas
Copy link
Contributor Author

We need the serialization module, there's no way around that. The thread and other system modules potentially could be removed.

👍
I'm working my way through having all the rosdep keys available to be able to declare only the modules needed. It seems (didnt check very closely) that the only ones missing for karto and slam_toolbox are included in this PR

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