Skip to content

build: find mimick_vendor for test targets (fixes #2306) - #3413

Open
Aaravanand00 wants to merge 1 commit into
ros2:rollingfrom
Aaravanand00:fix-mimick-link-dependency-2306
Open

Aaravanand00 wants to merge 1 commit into
ros2:rollingfrom
Aaravanand00:fix-mimick-link-dependency-2306

Conversation

@Aaravanand00

Copy link
Copy Markdown
Contributor

Description

Fixes #2306

rclcpp, rclcpp_action, and rclcpp_lifecycle link several test targets against the mimick library and declare mimick_vendor as a <test_depend> in their package.xml files.

However, none of their CMakeLists.txt files actually invoked find_package(mimick_vendor REQUIRED). Without this call, CMake does not import the mimick target with its exported vendor installation paths, and instead falls back to passing plain -lmimick to the linker.

When overlaying rclcpp on top of binary installations (e.g. colcon build --allow-overriding rclcpp ...), /usr/bin/ld fails to locate libmimick.a in the isolated vendor prefix unless the environment was re-sourced after installing ros-<distro>-mimick-vendor.

This PR adds find_package(mimick_vendor REQUIRED) under BUILD_TESTING in:

  • rclcpp/test/CMakeLists.txt
  • rclcpp_action/CMakeLists.txt
  • rclcpp_lifecycle/CMakeLists.txt

Matching the pattern already used in rcl/test/CMakeLists.txt.

Is this user-facing behavior change?

No API changes. Fixes linker failure (/usr/bin/ld: cannot find -lmimick) when compiling tests on overlay workspaces.

Did you use Generative AI?

Yes AI was used to assist with root cause analysis and verifying CMake dependency chains.

Additional Information

  • Verified locally with ament_lint_cmake (0 problems found).

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

ABI Compliance Check

✅ Verdict: compatible

Library Verdict Summary
libcomponent_manager.so ✅ compatible No ABI changes detected.
librclcpp.so ✅ compatible No ABI changes detected.
librclcpp_action.so ✅ compatible No ABI changes detected.
librclcpp_lifecycle.so ✅ compatible No ABI changes detected.
✅ libcomponent_manager.so — full abidiff report

Compared:

  • Base: lib-base/libcomponent_manager.so
  • Head: lib-pr/libcomponent_manager.so @ b15fde2
(empty report — no differences printed by abidiff)
✅ librclcpp.so — full abidiff report

Compared:

  • Base: lib-base/librclcpp.so
  • Head: lib-pr/librclcpp.so @ b15fde2
(empty report — no differences printed by abidiff)
✅ librclcpp_action.so — full abidiff report

Compared:

  • Base: lib-base/librclcpp_action.so
  • Head: lib-pr/librclcpp_action.so @ b15fde2
(empty report — no differences printed by abidiff)
✅ librclcpp_lifecycle.so — full abidiff report

Compared:

  • Base: lib-base/librclcpp_lifecycle.so
  • Head: lib-pr/librclcpp_lifecycle.so @ b15fde2
(empty report — no differences printed by abidiff)

Updated for commit b15fde2 · check run · suppressions: /home/runner/work/_temp/ros2-abi-suppressions.txt

Signed-off-by: Aaravanand <aaravanand@gmail.com>
@Aaravanand00
Aaravanand00 force-pushed the fix-mimick-link-dependency-2306 branch from 04c7005 to b15fde2 Compare November 15, 2026 11:16
@Aaravanand00

Copy link
Copy Markdown
Contributor Author

@clalancette @fujitatomoya ptal is this looks good???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cannot link mimick : /usr/bin/ld: cannot find -lmimick

1 participant