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 uprightdiff's case the OpenCV 4 include directory is hardcoded in
debian/rules: override_dh_auto_configure runs
dh_auto_configure -- CPPFLAGS="-I/usr/include/opencv4"
and that directory no longer exists, because OpenCV 5 installs its
headers under /usr/include/opencv5. The flag is still passed to every
g++ command, so the compiler never finds any OpenCV header and the first
translation unit stops at "fatal error: opencv2/core/core.hpp: No such
file or directory". The header itself is not the problem, the stale path
is. The cleanest fix is to drop that CPPFLAGS override and let the
OpenCV check in configure.ac query pkg-config (opencv5, optionally
falling back to opencv4) so the flags follow whichever version is
installed; modernising the aggregate opencv2/<module>/<module>.hpp
includes to opencv2/<module>.hpp is worth doing at the same time.
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.
debian/rules override_dh_auto_configure
make[1]: Entering directory '/build/reproducible-path/uprightdiff-1.4.0'
dh_auto_configure -- CPPFLAGS="-I/usr/include/opencv4"
./configure --build=x86_64-linux-gnu --prefix=/usr
--includedir=\${prefix}/include --mandir=\${prefix}/share/man
--infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var
--disable-option-checking --disable-silent-rules
--libdir=\${prefix}/lib/x86_64-linux-gnu --runstatedir=/run --disa
[...]
checking for a BSD-compatible install... /usr/bin/install -c
checking whether sleep supports fractional seconds... yes
checking filesystem timestamp resolution... 0.01
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking xargs -n works... yes
checking whether UID '999' is supported by ustar format... yes
checking whether GID '999' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
./configure: line 3512: -std=c++11: command not found
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C++... yes
checking whether x86_64-linux-gnu-g++ accepts -g... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of x86_64-linux-gnu-g++... none
checking for gcc... x86_64-linux-gnu-gcc
checking whether the compiler supports GNU C... yes
checking whether x86_64-linux-gnu-gcc accepts -g... yes
checking for x86_64-linux-gnu-gcc option to enable C23 features... none needed
checking whether x86_64-linux-gnu-gcc understands -c and -o together... yes
checking dependency style of x86_64-linux-gnu-gcc... none
checking for main in -lboost_program_options... yes
checking for main in -lopencv_core... yes
checking for main in -lopencv_highgui... yes
checking for main in -lopencv_imgproc... yes
checking for main in -lopencv_imgcodecs... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for _Bool... no
checking for stdbool.h that conforms to C99 or later... yes
checking for inline... inline
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
make[1]: Leaving directory '/build/reproducible-path/uprightdiff-1.4.0'
dh_auto_build
make -j40
make[1]: Entering directory '/build/reproducible-path/uprightdiff-1.4.0'
x86_64-linux-gnu-g++ -DPACKAGE_NAME=\"uprightdiff\"
-DPACKAGE_TARNAME=\"uprightdiff\" -DPACKAGE_VERSION=\"1.4.0\"
-DPACKAGE_STRING=\"uprightdiff\ 1.4.0\"
-DPACKAGE_BUGREPORT=\"https://phabricator.wikimedia.org/tag/uprightdiff/\"
-DPACKAGE_URL=\"\" -DPACKAGE=\"uprightdiff\" -DVERSION=\"1.4.0\"
-DHAVE [...]
x86_64-linux-gnu-g++ -DPACKAGE_NAME=\"uprightdiff\"
-DPACKAGE_TARNAME=\"uprightdiff\" -DPACKAGE_VERSION=\"1.4.0\"
-DPACKAGE_STRING=\"uprightdiff\ 1.4.0\"
-DPACKAGE_BUGREPORT=\"https://phabricator.wikimedia.org/tag/uprightdiff/\"
-DPACKAGE_URL=\"\" -DPACKAGE=\"uprightdiff\" -DVERSION=\"1.4.0\"
-DHAVE [...]
x86_64-linux-gnu-g++ -DPACKAGE_NAME=\"uprightdiff\"
-DPACKAGE_TARNAME=\"uprightdiff\" -DPACKAGE_VERSION=\"1.4.0\"
-DPACKAGE_STRING=\"uprightdiff\ 1.4.0\"
-DPACKAGE_BUGREPORT=\"https://phabricator.wikimedia.org/tag/uprightdiff/\"
-DPACKAGE_URL=\"\" -DPACKAGE=\"uprightdiff\" -DVERSION=\"1.4.0\"
-DHAVE [...]
UprightDiff.cpp:1:10: fatal error: opencv2/core/core.hpp: No such
file or directory
1 | #include <opencv2/core/core.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:390: UprightDiff.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from BlockMotionSearch.cpp:3:
BlockMotionSearch.h:1:10: fatal error: opencv2/core/core.hpp: No
such file or directory
1 | #include <opencv2/core/core.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:390: BlockMotionSearch.o] Error 1
main.cpp:4:10: fatal error: opencv2/highgui/highgui.hpp: No such
file or directory
4 | #include <opencv2/highgui/highgui.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:390: main.o] Error 1
make[1]: Leaving directory '/build/reproducible-path/uprightdiff-1.4.0'
dh_auto_build: error: make -j40 returned exit code 2
make: *** [debian/rules:5: binary] Error 25
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