ros2 / rcl_logging

Logging implementations for ROS 2.
Apache License 2.0
22 stars 35 forks source link

Export spdlog dependency for rcl_logging_spdlog #87

Closed AlexisTM closed 2 years ago

AlexisTM commented 2 years ago

Information

OS: Apertis 2022 (Debian bullseye based) ROS Version: Galactic rcl_logging version: 2.1.4 GCC: aarch64-linux-gnu-g++ (Apertis 10.2.1-6+apertis2+apertispro0bv2022dev3b1) 10.2.1 20210110 Arch: aarch64

Description

When cross-building for our project, rclcpp_components and other rclcpp packages fails to link to spdlog, saying: spdlog.so.1 not found while available in the workspace's lib folder (which is in the CMAKE_FIND_ROOT_PATH).

Explicitly adding spdlog as a dependency of rcl_logging_spdlog fixes the issue.

ament_export_dependencies(rcl_logging_interface spdlog)

Note: The build works fine without this when building natively on the host (x86_64). Note2: This fix is based on the galactic branch

AlexisTM commented 2 years ago
clalancette commented 2 years ago

Note2: This fix is based on the galactic branch

Could you please retarget this PR to the master branch here? Our usual workflow is to land things on master and then backport them as necessary. Thank you!

clalancette commented 2 years ago

Actually, #89 is a superset of this one, so I'm going to close this in favor of that.