#1147658 gmic: FTBFS with OpenCV 5.0

#1147658#5
Date:
2026-09-14 09:38:28 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.

gmic fails because zart/zart.pro's mandatory OpenCV check aborts
qmake with "Project ERROR: Cannot find OpenCV" (line 3690; the same
message also appears non-fatally during the ignored dh_auto_clean
pass at line 3381), which fails dh_auto_configure at debian/rules:17
(Error 25). qmake's own output gives no detail on which pkg-config
module name(s) it tried. Earlier in the same build, an unrelated
CMake-based configure step reports "Package 'opencv4' not found"
(line 3432) and "Package 'opencv' not found" (line 3434) but treats
OpenCV as optional and continues; this shows the same two candidate
names fail to resolve elsewhere in the source tree. zart.pro's
OpenCV detection should be checked against whatever pkg-config
module names it probes and extended to also try "opencv5" (e.g.
`pkg-config --exists opencv5`), or otherwise accept whichever of
opencv4/opencv5 is present.

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.