Skip to content

Missing export of required public definition PLUGINLIB__DISABLE_BOOST_FUNCTIONS for downstream packages #2429

@devrite

Description

@devrite
  • Operating System:
    • Ubuntu 20.04
  • ROS2 Version:
    • rolling+galactic(flag depr.)
    • foxy
  • Version or commit hash:

Steps to reproduce issue

docker run --rm -it ros:foxy-ros-base-focal
apt-get update && apt-get install -y ros-foxy-navigation2
grep -r PLUGINLIB__DISABLE_BOOST_FUNCTIONS /opt/ros/foxy/share

Expected behavior

Similar output as below (e.g., also done by the rviz plugin) for all libs and plugins exported via navigation2. Missing for a lot of plugins. Just do a grep on the source to tree to identify which packages do public set the PLUGINLIB__DISABLE_BOOST_FUNCTIONS.

Other packages including, for example, headers from nav2_costmap_2d will eventually include pluginlib headers but the definition is not set, thus forcing a downstream package to set this definition itself or falsely enabling the boost features if boost is installed via another dependency already (e.g. if the boost headers are found).

Actual behavior

rviz_common/cmake/rviz_commonExport.cmake:  INTERFACE_COMPILE_DEFINITIONS "PLUGINLIB__DISABLE_BOOST_FUNCTIONS"
rviz_default_plugins/cmake/rviz_default_pluginsExport.cmake:  INTERFACE_COMPILE_DEFINITIONS "PLUGINLIB__DISABLE_BOOST_FUNCTIONS"
nav2_rviz_plugins/cmake/nav2_rviz_pluginsExport.cmake:  INTERFACE_COMPILE_DEFINITIONS "PLUGINLIB__DISABLE_BOOST_FUNCTIONS"
rosbag2_cpp/cmake/export_rosbag2_cppExport.cmake:  INTERFACE_COMPILE_DEFINITIONS "PLUGINLIB__DISABLE_BOOST_FUNCTIONS"
rosbag2_storage/cmake/export_rosbag2_storageExport.cmake:  INTERFACE_COMPILE_DEFINITIONS "PLUGINLIB__DISABLE_BOOST_FUNCTIONS"

Additional information

I will prepare a pull request for review, which should fix the problem. There are two possible approaches, switching to modern CMake Export as with the rviz plugin or manually exporting the definition via ament.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions