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

[noetic] Restrict boost dependencies to components used #1871

Merged
merged 7 commits into from
Mar 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions clients/roscpp/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
<buildtool_depend version_gte="0.5.78">catkin</buildtool_depend>

<build_depend version_gte="0.3.17">cpp_common</build_depend>
<build_depend>libboost-chrono-dev</build_depend>
<build_depend>libboost-filesystem-dev</build_depend>
<build_depend>libboost-system-dev</build_depend>
<build_depend>message_generation</build_depend>
<build_depend>pkg-config</build_depend>
<build_depend>rosconsole</build_depend>
Expand All @@ -37,6 +40,9 @@

<run_depend version_gte="0.3.17">cpp_common</run_depend>
<run_depend>message_runtime</run_depend>
<run_depend>libboost-chrono-dev</run_depend>
<run_depend>libboost-filesystem-dev</run_depend>
<run_depend>libboost-system-dev</run_depend>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving to format 2 would permit deduplicating these.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed moving to format 2 for all packages would be a nice improvement.

Regarding deduplication: in the context of Generating ‘dev’ and runtime artefacts from ROS packages we're aiming for not using the <depend> tag to be able to generate pure runtime packages without bringing in all the dev dependencies.

<run_depend>rosconsole</run_depend>
<run_depend>roscpp_serialization</run_depend>
<run_depend version_gte="0.3.17">roscpp_traits</run_depend>
Expand Down
2 changes: 1 addition & 1 deletion test/test_rosbag/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

<buildtool_depend version_gte="0.5.68">catkin</buildtool_depend>

<build_depend>boost</build_depend>
<build_depend>bzip2</build_depend>
<build_depend>cpp_common</build_depend>
<build_depend>message_generation</build_depend>
Expand All @@ -39,6 +38,7 @@

<test_depend>genmsg</test_depend>
<test_depend>genpy</test_depend>
<test_depend>libboost-dev</test_depend>
<test_depend>message_runtime</test_depend>
<test_depend condition="$ROS_PYTHON_VERSION == 2">python-rospkg</test_depend>
<test_depend condition="$ROS_PYTHON_VERSION == 3">python3-rospkg</test_depend>
Expand Down
2 changes: 1 addition & 1 deletion tools/rosbag/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if(NOT WIN32)
endif()

find_package(catkin REQUIRED COMPONENTS rosbag_storage rosconsole roscpp std_srvs topic_tools xmlrpcpp)
find_package(Boost REQUIRED COMPONENTS date_time regex program_options filesystem)
find_package(Boost REQUIRED COMPONENTS date_time filesystem program_options regex thread)
find_package(BZip2 REQUIRED)

catkin_python_setup()
Expand Down
6 changes: 5 additions & 1 deletion tools/rosbag/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
<author>Jeremy Leibs</author>
<author>James Bowman</author>

<depend>boost</depend>
<depend>libboost-date-time-dev</depend>
<depend>libboost-filesystem-dev</depend>
<depend>libboost-program-options-dev</depend>
<depend>libboost-regex-dev</depend>
<depend>libboost-thread-dev</depend>
Comment on lines -23 to +27
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we split this into exec_depend and the various build*_depend?

Did you not do this on purpose?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Purposeful 😬 , currently I just replaced the keys without changing the scope of the tags.

I figured that when splitting the depends tags, we should decide which to put in build_depend vs exec_depend vs build_export_depend which would require a closer audit of each package rather than just duplicating them all in build and exec depends.

It could be done in this PR though, it was just out of scope of my first pass

<depend>rosbag_storage</depend>
<depend>rosconsole</depend>
<depend>roscpp</depend>
Expand Down
2 changes: 1 addition & 1 deletion tools/rosbag_storage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endif()

find_package(console_bridge REQUIRED)
find_package(catkin REQUIRED COMPONENTS cpp_common pluginlib roscpp_serialization roscpp_traits rostime roslz4 std_msgs)
find_package(Boost REQUIRED COMPONENTS date_time filesystem program_options regex)
find_package(Boost REQUIRED COMPONENTS filesystem)
find_package(BZip2 REQUIRED)

catkin_package(
Expand Down
4 changes: 2 additions & 2 deletions tools/rosbag_storage/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

<buildtool_depend>catkin</buildtool_depend>

<build_depend>boost</build_depend>
<build_depend>bzip2</build_depend>
<build_depend version_gte="0.3.17">cpp_common</build_depend>
<build_depend>libboost-filesystem-dev</build_depend>
<build_depend>libconsole-bridge-dev</build_depend>
<build_depend>libgpgme-dev</build_depend>
<build_depend>libssl-dev</build_depend>
Expand All @@ -24,9 +24,9 @@
<build_depend>roslz4</build_depend>
<build_depend>std_msgs</build_depend>

<run_depend>boost</run_depend>
<run_depend>bzip2</run_depend>
<run_depend version_gte="0.3.17">cpp_common</run_depend>
<run_depend>libboost-filesystem-dev</run_depend>
<run_depend>libconsole-bridge-dev</run_depend>
<run_depend>libgpgme-dev</run_depend>
<run_depend>libssl-dev</run_depend>
Expand Down
2 changes: 2 additions & 0 deletions tools/rosbag_storage/test/test_aes_encryptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@

#include <cstdio>

#include <boost/filesystem.hpp>

#include <gtest/gtest.h>

#include <gpgme.h>
Expand Down
2 changes: 1 addition & 1 deletion tools/rostest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.3)
project(rostest)

find_package(catkin COMPONENTS rosunit)
find_package(Boost COMPONENTS system thread)
find_package(Boost COMPONENTS thread)

include_directories(include ${Boost_INCLUDE_DIRS})

Expand Down
4 changes: 2 additions & 2 deletions tools/rostest/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

<buildtool_depend version_gte="0.7.9">catkin</buildtool_depend>

<build_depend>boost</build_depend>
<build_depend>libboost-thread-dev</build_depend>
<build_depend>rosunit</build_depend>

<run_depend>boost</run_depend>
<run_depend>libboost-thread-dev</run_depend>
<run_depend>rosgraph</run_depend>
<run_depend>roslaunch</run_depend>
<run_depend>rosmaster</run_depend>
Expand Down
2 changes: 1 addition & 1 deletion utilities/message_filters/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<buildtool_depend version_gte="0.5.68">catkin</buildtool_depend>

<build_depend>boost</build_depend>
<build_depend>libboost-thread-dev</build_depend>
<build_depend>rosconsole</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>rostest</build_depend>
Expand Down
2 changes: 1 addition & 1 deletion utilities/xmlrpcpp/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<depend>cpp_common</depend>
<depend version_gte="0.6.9">rostime</depend>

<test_depend>boost</test_depend>
<test_depend>libboost-thread-dev</test_depend>

<export>
<rosdoc external="http://xmlrpcpp.sourceforge.net/doc/hierarchy.html"/>
Expand Down
2 changes: 1 addition & 1 deletion utilities/xmlrpcpp/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if(WIN32)
endif()

# Some of the tests that follow use boost threads.
find_package(Boost REQUIRED COMPONENTS system thread)
find_package(Boost REQUIRED COMPONENTS thread)
include_directories(${Boost_INCLUDE_DIRS})

add_library(test_fixtures test_fixtures.cpp)
Expand Down