Skip to content

cv_bridge: export libopencv-dev for its CMake config (build_export_depend) - #702

Open
k-okada wants to merge 2 commits into
ros-perception:rollingfrom
k-okada:cv-bridge-export-opencv
Open

k-okada wants to merge 2 commits into
ros-perception:rollingfrom
k-okada:cv-bridge-export-opencv

Conversation

@k-okada

@k-okada k-okada commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Since #563, cv_bridge has libopencv-dev as build_depend only, while its CMake config still finds OpenCV for the packages using it (ament_export_dependencies(... OpenCV ...)). The build farm installs only the exported dependencies of cv_bridge for them, so cv_bridge 4.1.1 of rolling breaks them, e.g. Rbin_uR64__posedetection_msgs__ubuntu_resolute_amd64__binary #9 on build.ros2.org:

-- Found cv_bridge: 4.1.1 (/opt/ros/rolling/share/cv_bridge/cmake)
CMake Error at /opt/ros/rolling/share/cv_bridge/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package):
  ...
  Could not find a package configuration file provided by "OpenCV" with any
  of the following names:

    OpenCVConfig.cmake
    opencv-config.cmake

(also reproduced in the CI of a package using it with the repository of the build farm: jsk-ros-pkg/jsk_common_msgs#37)

  • ci: a new workflow builds cv_bridge with all its dependencies, then, in a fresh container with only its build_export, buildtool_export and exec dependencies (as the build farm), configures a package with find_package(cv_bridge REQUIRED). It fails with the first commit only.
  • cv_bridge: libopencv-dev as build_export_depend too, keeping the split of Split libopencv into build and exec #563 (build_depend and the runtime exec_depend).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p

…farm

The build farm installs only the build_export, buildtool_export and exec
dependencies of cv_bridge for the packages depending on it, so a dependency
of the CMake config of cv_bridge (e.g. OpenCV) must be exported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
@mergify

mergify Bot commented Dec 5, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue). If it does not match the queue conditions yet, it enters the queue once it does.

  • Queue this pull request once it meets the queue conditions

k-okada added a commit to k-okada/jsk_common_msgs that referenced this pull request Dec 5, 2026
…lling

cv_bridge 4.1.1 finds OpenCV in its CMake config for the packages using it,
but has libopencv-dev as build_depend only, so the build farm does not
install it for posedetection_msgs (ros-perception/vision_opencv#702).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
The CMake config of cv_bridge finds OpenCV for the packages using it
(ament_export_dependencies), so they need libopencv-dev, which ros-perception#563 made
build_depend only. Keep the split of ros-perception#563 for the runtime dependencies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant