#1147685#5
Date:
2026-09-14 11:22:19 UTC
From:
To:
Dear maintainer,

Your package fails to build from source against opencv 5.0.0+dfsg-1~exp1,
currently in experimental.

OpenCV 5.0 renames its entire install tree from opencv4 to opencv5 and ships
no compatibility shims:

  * pkg-config: only /usr/lib/<triplet>/pkgconfig/opencv5.pc.  There is no
                opencv4.pc and no opencv.pc.
  * headers:    /usr/include/opencv5/opencv2/..., no /usr/include/opencv4.
  * cmake:      /usr/lib/<triplet>/cmake/opencv5/OpenCVConfig.cmake.  A bare
                find_package(OpenCV) still resolves, but a pinned version
                such as find_package(OpenCV 4.7) no longer matches.
  * modules:    libopencv-calib3d-dev is split into libopencv-calib-dev,
                libopencv-geometry-dev, libopencv-stereo-dev and
                libopencv-ptcloud-dev; libopencv-features2d-dev becomes
                libopencv-features-dev.  The CMake component names change
                with them (features2d -> features).
  * geometry:   the new geometry module is not only a piece of calib3d.  It
                also absorbs shape and contour functions that used to live
                in imgproc -- contourArea, arcLength, approxPolyDP,
                boundingRect, minAreaRect, convexHull and
                getPerspectiveTransform among them -- and opencv2/opencv.hpp
                does not pull in opencv2/geometry.hpp, so code that reached
                those through the umbrella header now needs an explicit
                include of opencv2/geometry.hpp.

In ros-vision-opencv's case, cv_bridge/CMakeLists.txt:28 calls
find_package(OpenCV ...) with a hard-coded fallback path: after an
OpenCV-4 probe fails it retries with version "3" pinned ("-- Did not
find OpenCV 4, trying OpenCV 3"). CMake then walks the config search
path, finds /usr/lib/x86_64-linux-gnu/cmake/opencv5/OpenCVConfig.cmake
(version 5.0.0), and rejects it because 5.0.0 does not satisfy the
literal "3" version constraint, so find_package fails outright. The
fallback never tries version 5 at all. The maintainer should change
line 28 to probe for OpenCV 5 first (or drop the upper bound and call
find_package(OpenCV 4...6) or an unversioned find_package(OpenCV
REQUIRED)) so the opencv5 CMake config under
/usr/lib/x86_64-linux-gnu/cmake/opencv5/ is accepted.

The same source builds fine in the same chroot against the OpenCV 4.10
packages currently in unstable, so this is specific to OpenCV 5.

The relevant part of the build log follows; the full log is attached.