#1147671#5
Date:
2026-09-14 10:53:40 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 mrgingham's case the build gets no OpenCV flags at all. In the 4.10
build every g++ line carries -I/usr/include/opencv4 and the full set of
-lopencv_* libraries; in the OpenCV 5 build those flags are simply absent
from the same commands, so mrgingham.hh:3, find_blobs.hh:4 and
find_chessboard_corners.hh:4 fail with "opencv2/core/core.hpp: No such
file or directory" before the compiler ever looks at an OpenCV header.
The missing-header errors are therefore a consequence, not the cause: the
flag lookup in the build uses an opencv4-era pkg-config name and silently
returns nothing under OpenCV 5. The fix is to make that lookup query
opencv5, e.g. pkg-config --cflags --libs opencv5, ideally with a fallback
chain over opencv5/opencv4/opencv so the package keeps building either
way; the aggregate opencv2/<module>/<module>.hpp includes are also worth
modernising to opencv2/<module>.hpp while you are there.

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.

  g++ -Wall -Wextra -g -O2
-ffile-prefix-map=/build/reproducible-path/mrgingham-1.27=.
-fstack-protector-strong -fstack-clash-protection -Wformat
-Werror=format-security -fcf-protection -fvisibility=hidden
-Wno-unused-function -Wno-missing-field-initializers
-Wno-unused-parameter -Wno-strict-aliasing  [...]
  g++ -Wall -Wextra -g -O2
-ffile-prefix-map=/build/reproducible-path/mrgingham-1.27=.
-fstack-protector-strong -fstack-clash-protection -Wformat
-Werror=format-security -fcf-protection -fvisibility=hidden
-Wno-unused-function -Wno-missing-field-initializers
-Wno-unused-parameter -Wno-strict-aliasing  [...]
  g++ -Wall -Wextra -g -O2
-ffile-prefix-map=/build/reproducible-path/mrgingham-1.27=.
-fstack-protector-strong -fstack-clash-protection -Wformat
-Werror=format-security -fcf-protection -fvisibility=hidden
-Wno-unused-function -Wno-missing-field-initializers
-Wno-unused-parameter -Wno-strict-aliasing  [...]
  g++ -Wall -Wextra -g -O2
-ffile-prefix-map=/build/reproducible-path/mrgingham-1.27=.
-fstack-protector-strong -fstack-clash-protection -Wformat
-Werror=format-security -fcf-protection -fvisibility=hidden
-Wno-unused-function -Wno-missing-field-initializers
-Wno-unused-parameter -Wno-strict-aliasing  [...]
  cc -Wall -Wextra -g -O2 -Werror=implicit-function-declaration
-ffile-prefix-map=/build/reproducible-path/mrgingham-1.27=.
-fstack-protector-strong -fstack-clash-protection -Wformat
-Werror=format-security -fcf-protection -std=gnu99 -fvisibility=hidden
-Wno-unused-function -Wno-missing-field-initiali [...]
  /usr/bin/make-pod-from-help mrgingham-observe-pixel-uncertainty >
mrgingham-observe-pixel-uncertainty.pod.tmp
  /usr/bin/make-pod-from-help mrgingham-rotate-corners >
mrgingham-rotate-corners.pod.tmp
  < ChESS_response_5.docstring sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/;
s/$/\\n"/;' > ChESS_response_5.docstring.h
  < find_board.docstring sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/;
s/$/\\n"/;' > find_board.docstring.h
  < find_chessboard.docstring sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/;
s/$/\\n"/;' > find_chessboard.docstring.h
  < find_chessboard_corners.docstring sed 's/\\/\\\\/g; s/"/\\"/g;
s/^/"/; s/$/\\n"/;' > find_chessboard_corners.docstring.h
  < find_points.docstring sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/;
s/$/\\n"/;' > find_points.docstring.h
  g++ -Wall -Wextra -g -O2
-ffile-prefix-map=/build/reproducible-path/mrgingham-1.27=.
-fstack-protector-strong -fstack-clash-protection -Wformat
-Werror=format-security -fcf-protection -fvisibility=hidden
-Wno-unused-function -Wno-missing-field-initializers
-Wno-unused-parameter -Wno-strict-aliasing  [...]
  g++ -Wall -Wextra -g -O2
-ffile-prefix-map=/build/reproducible-path/mrgingham-1.27=.
-fstack-protector-strong -fstack-clash-protection -Wformat
-Werror=format-security -fcf-protection -fvisibility=hidden
-Wno-unused-function -Wno-missing-field-initializers
-Wno-unused-parameter -Wno-strict-aliasing  [...]
  g++ -Wall -Wextra -g -O2
-ffile-prefix-map=/build/reproducible-path/mrgingham-1.27=.
-fstack-protector-strong -fstack-clash-protection -Wformat
-Werror=format-security -fcf-protection -fvisibility=hidden
-Wno-unused-function -Wno-missing-field-initializers
-Wno-unused-parameter -Wno-strict-aliasing  [...]
  g++ -Wall -Wextra -g -O2
-ffile-prefix-map=/build/reproducible-path/mrgingham-1.27=.
-fstack-protector-strong -fstack-clash-protection -Wformat
-Werror=format-security -fcf-protection -fvisibility=hidden
-Wno-unused-function -Wno-missing-field-initializers
-Wno-unused-parameter -Wno-strict-aliasing  [...]
  g++ -Wall -Wextra -g -O2
-ffile-prefix-map=/build/reproducible-path/mrgingham-1.27=.
-fstack-protector-strong -fstack-clash-protection -Wformat
-Werror=format-security -fcf-protection -fvisibility=hidden
-Wno-unused-function -Wno-missing-field-initializers
-Wno-unused-parameter -Wno-strict-aliasing  [...]
  cc -Wall -Wextra -g -O2 -Werror=implicit-function-declaration
-ffile-prefix-map=/build/reproducible-path/mrgingham-1.27=.
-fstack-protector-strong -fstack-clash-protection -Wformat
-Werror=format-security -fcf-protection -std=gnu99 -fvisibility=hidden
-Wno-unused-function -Wno-missing-field-initiali [...]
  In file included from mrgingham-from-image.cc:1:
  mrgingham.hh:3:10: fatal error: opencv2/core/core.hpp: No such file
or directory
      3 | #include <opencv2/core/core.hpp>
        |          ^~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  make[2]: *** [/usr/include/mrbuild/Makefile.common.footer:158:
mrgingham-from-image.o] Error 1
  make[2]: *** Waiting for unfinished jobs....
  find_blobs.cc:1:10: fatal error: opencv2/features2d/features2d.hpp:
No such file or directory
      1 | #include <opencv2/features2d/features2d.hpp>
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  find_chessboard_corners.cc:1:10: fatal error:
opencv2/imgproc/imgproc.hpp: No such file or directory
      1 | #include <opencv2/imgproc/imgproc.hpp>
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  In file included from mrgingham.cc:1:
  mrgingham.hh:3:10: fatal error: opencv2/core/core.hpp: No such file
or directory
      3 | #include <opencv2/core/core.hpp>
        |          ^~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  make[2]: *** [/usr/include/mrbuild/Makefile.common.footer:158:
find_blobs.o] Error 1
  make[2]: *** [/usr/include/mrbuild/Makefile.common.footer:158:
find_chessboard_corners.o] Error 1
  make[2]: *** [/usr/include/mrbuild/Makefile.common.footer:158:
mrgingham.o] Error 1
  test-dump-chessboard-corners.cc:1:10: fatal error:
opencv2/imgproc/imgproc.hpp: No such file or directory
      1 | #include <opencv2/imgproc/imgproc.hpp>
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  In file included from test-find-grid-from-points.cc:1:
  mrgingham.hh:3:10: fatal error: opencv2/core/core.hpp: No such file
or directory
      3 | #include <opencv2/core/core.hpp>
        |          ^~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  make[2]: *** [/usr/include/mrbuild/Makefile.common.footer:158:
test-dump-chessboard-corners.o] Error 1
  make[2]: *** [/usr/include/mrbuild/Makefile.common.footer:158:
test-find-grid-from-points.o] Error 1
  cat footer.pod >> mrgingham-rotate-corners.pod.tmp
  mv mrgingham-rotate-corners.pod.tmp mrgingham-rotate-corners.pod
  /build/reproducible-path/mrgingham-1.27/./mrgingham-observe-pixel-uncertainty:90:
SyntaxWarning: "\." is an invalid escape sequence. Such sequences will
not work in the future. Did you mean "\\."? A raw string is also an
option.
    if re.match('.*\.vnl$', args.input):
  In file included from mrgingham_pywrap_cplusplus_bridge.cc:1:
  find_chessboard_corners.hh:4:10: fatal error: opencv2/core/core.hpp:
No such file or directory
      4 | #include <opencv2/core/core.hpp>
        |          ^~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  In file included from test-dump-blobs.cc:1:
  find_blobs.hh:4:10: fatal error: opencv2/core/core.hpp: No such file
or directory
      4 | #include <opencv2/core/core.hpp>
        |          ^~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  make[2]: *** [/usr/include/mrbuild/Makefile.common.footer:158:
mrgingham_pywrap_cplusplus_bridge.o] Error 1
  make[2]: *** [/usr/include/mrbuild/Makefile.common.footer:158:
test-dump-blobs.o] Error 1
  cat footer.pod >> mrgingham-observe-pixel-uncertainty.pod.tmp
  mv mrgingham-observe-pixel-uncertainty.pod.tmp
mrgingham-observe-pixel-uncertainty.pod
  In file included from find_grid.cc:10:
  mrgingham.hh:3:10: fatal error: opencv2/core/core.hpp: No such file
or directory
      3 | #include <opencv2/core/core.hpp>
        |          ^~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  make[2]: *** [/usr/include/mrbuild/Makefile.common.footer:158:
find_grid.o] Error 1
  make[2]: Leaving directory '/build/reproducible-path/mrgingham-1.27'
  dh_auto_build: error: make -j40 INSTALL="install
--strip-program=true" returned exit code 2
  make[1]: *** [debian/rules:23: override_dh_auto_build] Error 25
  make[1]: Leaving directory '/build/reproducible-path/mrgingham-1.27'
  make: *** [debian/rules:15: binary] Error 2
  dpkg-buildpackage: error: debian/rules binary subprocess failed with
exit status 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