Skip to content

fix: expose compat headers through the sas_core INTERFACE target - #13

Merged
mmmarinho merged 1 commit into
jazzyfrom
fix/wrapper-interface-includes
Sep 22, 2026
Merged

mmmarinho merged 1 commit into
jazzyfrom
fix/wrapper-interface-includes

Conversation

@mmmarinho

Copy link
Copy Markdown
Member

What this does

Fixes a build break in the thin wrapper that only shows up when downstream ROS packages are compiled against it — the wrapper's own smoke test (standalone g++ with explicit -I) did not catch it.

Problem

The wrapper's sas_core is a pure INTERFACE library:

add_library(sas_core INTERFACE)
target_link_libraries(sas_core INTERFACE marinholab::sas::core Eigen3::Eigen)
install(DIRECTORY include/ DESTINATION include)

It forwards to the core target but never declares its own include directories. The install(DIRECTORY include/) line installs the compat headers (include/sas_core/*.hpp), but installing a file does not put it on the include path of consumers — that comes from the target's interface. Previously the monolithic package provided those headers for free through its real sas_core_pure library.

Result — the first colcon build of a downstream package against the wrapper fails (observed in the PPA builder run on smart_arm_stack_ROS2 lyrical, and reproduced locally):

sas_conversions/include/sas_conversions/eigen3_std_conversions.hpp:27:
fatal error: sas_core/eigen3_std_conversions.hpp: No such file or directory

Affected downstream packages (all include <sas_core/...> headers): sas_conversions, sas_common, sas_datalogger, sas_robot_driver, sas_robot_kinematics.

Fix

Standard ament pattern — expose the compat headers through the INTERFACE target for both workspace and installed use:

target_include_directories(sas_core INTERFACE
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
    $<INSTALL_INTERFACE:include>
)

Verification

Reproduced and verified in the exact environment (murilomarinho/sas:jazzy docker image, .deb installed, as the CI/builder uses):

  • Before: colcon build of sas_core + downstream sas_conversions → fatal error: sas_core/eigen3_std_conversions.hpp: No such file or directory (exit 2)
  • After: same build → 2 packages finished, exit 0

Note for the PPA build

Once this is merged, re-run the sas deb builder workflow (smart_arm_stack_ROS2) — the run 35702346871 failed at exactly this step (colcon build → sas_conversions); the libmarinholab-sas-core build itself was green (v26.09.08).


This pull request was created by an AI agent (OpenHands) on behalf of the repository owner.

The INTERFACE target forwarded to marinholab::sas::core + Eigen but never declared its own include directories, so the compat headers (include/sas_core/*.hpp) were not on the include path of downstream packages linking sas_core::sas_core. Downstream packages doing #include <sas_core/...> failed with: fatal error: sas_core/eigen3_std_conversions.hpp: No such file or directory. Add BUILD_INTERFACE/INSTALL_INTERFACE include dirs so they propagate in both workspace and installed use. Co-authored-by: openhands <openhands@all-hands.dev>

@mmmarinho mmmarinho left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

👍

@mmmarinho
mmmarinho merged commit 75ec1a3 into jazzy Sep 22, 2026
2 checks passed
@mmmarinho
mmmarinho deleted the fix/wrapper-interface-includes branch September 22, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants