#1147688 siril: FTBFS with OpenCV 5.0

#1147688#5
Date:
2026-09-14 11:32:39 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 siril's case, meson.build line 285 declares the OpenCV
dependency as dependency('opencv4', ...), which meson resolves
purely by pkg-config/cmake module name lookup with no version
fallback. pkg-config reports "Package opencv4 was not found" and
the cmake fallback also fails, so meson aborts configure with the
error Dependency "opencv4" not found (tried pkg-config and cmake),
at ../meson.build:285:14. The maintainer should change
meson.build:285 to query 'opencv5' instead, or better, try both
'opencv4' and 'opencv5' pkg-config names, so the build works
against both OpenCV 4 and 5 during the transition.

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.

  Subproject kplot finished.

  Dependency kplot for host machine from subproject subprojects/kplot
found: YES 0.1.14
  Determining dependency 'opencv4' with pkg-config executable
'/usr/bin/pkg-config'
  env[PKG_CONFIG_PATH]:
  env[PKG_CONFIG]: /usr/bin/pkg-config
  -----------
  Called: `/usr/bin/pkg-config --modversion opencv4` -> 1
  stderr:
  Package opencv4 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `opencv4.pc'
  to the PKG_CONFIG_PATH environment variable
  Package 'opencv4' not found
  -----------
  CMake binary for host machine is cached.
  Preliminary CMake check failed. Aborting.
  Run-time dependency opencv4 found: NO  (tried pkg-config and cmake)

  ../meson.build:285:14: ERROR: Dependency "opencv4" not found (tried
pkg-config and cmake)
  dh_auto_configure: error: cd obj-x86_64-linux-gnu &&
DEB_PYTHON_INSTALL_LAYOUT=deb LC_ALL=C.UTF-8 meson setup ..
--wrap-mode=nodownload --buildtype=plain --prefix=/usr
--sysconfdir=/etc --localstatedir=/var --libdir=lib/x86_64-linux-gnu
-Dpython.bytecompile=-1 -Dcriterion=false returned exit code 1
  make[1]: *** [debian/rules:15: override_dh_auto_configure] Error 25
  make[1]: Leaving directory '/build/reproducible-path/siril-1.4.2'
  make: *** [debian/rules:9: binary] Error 2
  dpkg-buildpackage: error: debian/rules binary subprocess failed with
exit status 2
  --------------------------------------------------------------------------------
  Build finished at 2026-09-11T20:13:22Z

  Finished
  --------


  +------------------------------------------------------------------------------+
  | Cleanup                                      Fri, 11 Sep 2026
20:13:23 +0000 |
  +------------------------------------------------------------------------------+

  Purging /build/reproducible-path
  Not cleaning session: cloned chroot in use
  E: Build failure (dpkg-buildpackage died with exit 2)

Please close this bug if it turns out to be a collision with another ongoing
transition rather than an OpenCV 5 problem.

Thanks,
Aron