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 kylin-ondevice-ai-engine-plugin's case,
ondeviceembeddingengine/src/embeddingproxy.h:26 hardcodes #include
<opencv4/opencv2/opencv.hpp>, even though CMake already passes -isystem
/usr/include/opencv5 for this same target. Every other component in the
tree (ondevicevisionengine/*) includes OpenCV headers without a version
prefix and builds cleanly under that same flag, so this one header is the
outlier that still spells out the retired opencv4 directory name inside
the #include itself. The maintainer should drop the "opencv4/" path
segment and use #include <opencv2/opencv.hpp> instead, letting the
existing -isystem /usr/include/opencv5 flag resolve it, matching the
sibling engines.
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.
make[3]: Leaving directory
'/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/obj-x86_64-linux-gnu'
make -f ondevicevisionengine/ocr_triton_client/CMakeFiles/ocr_triton_client.dir/build.make
ondevicevisionengine/ocr_triton_client/CMakeFiles/ocr_triton_client.dir/build
make -f ondevicevisionengine/matting_triton_client/CMakeFiles/matting_triton_client.dir/build.make
ondevicevisionengine/matting_triton_client/CMakeFiles/matting_triton_client.dir/build
make[3]: Entering directory
'/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/obj-x86_64-linux-gnu'
make[3]: Entering directory
'/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/obj-x86_64-linux-gnu'
make[3]: Entering directory
'/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/obj-x86_64-linux-gnu'
make[3]: Entering directory
'/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/obj-x86_64-linux-gnu'
make[3]: Entering directory
'/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/obj-x86_64-linux-gnu'
[ 3%] Building CXX object
ondevicenlpengine/CMakeFiles/kylin-ondevice-nlp-engine.dir/ondevicenlpengine.cpp.o
[ 6%] Building CXX object
ondevicevisionengine/image_binaryzation/CMakeFiles/image_binaryzation.dir/client.cpp.o
[ 9%] Building CXX object
ondevicevisionengine/ocr_triton_client/CMakeFiles/ocr_triton_client.dir/client.cpp.o
[ 12%] Building CXX object
ondevicevisionengine/matting_triton_client/CMakeFiles/matting_triton_client.dir/client.cpp.o
[ 18%] Building CXX object
ondevicenlpengine/CMakeFiles/kylin-ondevice-nlp-engine.dir/nlp/llm.cpp.o
[ 18%] Building CXX object
ondevicevisionengine/ocr_triton_client/CMakeFiles/ocr_triton_client.dir/__/utils/base64_transformer.cpp.o
[ 21%] Building CXX object
ondevicevisionengine/docimgrec_triton_client/CMakeFiles/docimgrec_triton_client.dir/__/utils/base64_transformer.cpp.o
[ 25%] Building CXX object
ondevicenlpengine/CMakeFiles/kylin-ondevice-nlp-engine.dir/utils/logger.cpp.o
[ 28%] Building CXX object
ondevicevisionengine/image_binaryzation/CMakeFiles/image_binaryzation.dir/__/utils/base64_transformer.cpp.o
[ 31%] Building CXX object
ondeviceembeddingengine/CMakeFiles/kylin-ondevice-embedding-engine.dir/ondeviceembeddingengine.cpp.o
[ 34%] Building CXX object
ondevicevisionengine/docimgrec_triton_client/CMakeFiles/docimgrec_triton_client.dir/client.cpp.o
[ 37%] Building CXX object
ondevicevisionengine/matting_triton_client/CMakeFiles/matting_triton_client.dir/__/utils/base64_transformer.cpp.o
[ 40%] Building CXX object
ondeviceembeddingengine/CMakeFiles/kylin-ondevice-embedding-engine.dir/src/embeddingserver.cpp.o
[ 43%] Building CXX object
ondeviceembeddingengine/CMakeFiles/kylin-ondevice-embedding-engine.dir/src/task.cpp.o
[ 46%] Building CXX object
ondeviceembeddingengine/CMakeFiles/kylin-ondevice-embedding-engine.dir/src/embeddingproxy.cpp.o
[ 50%] Building CXX object
ondeviceembeddingengine/CMakeFiles/kylin-ondevice-embedding-engine.dir/src/utils.cpp.o
In file included from
/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/ondeviceembeddingengine/src/embeddingproxy.cpp:18:
/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/ondeviceembeddingengine/src/embeddingproxy.h:26:10:
fatal error: opencv4/opencv2/opencv.hpp: No such file or directory
26 | #include <opencv4/opencv2/opencv.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** Waiting for unfinished jobs....
In file included from
/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/ondeviceembeddingengine/src/embeddingserver.h:27,
from
/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/ondeviceembeddingengine/src/embeddingserver.cpp:17:
/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/ondeviceembeddingengine/src/embeddingproxy.h:26:10:
fatal error: opencv4/opencv2/opencv.hpp: No such file or directory
26 | #include <opencv4/opencv2/opencv.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from
/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/ondeviceembeddingengine/src/embeddingserver.h:27,
from
/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/ondeviceembeddingengine/ondeviceembeddingengine.cpp:19:
/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/ondeviceembeddingengine/src/embeddingproxy.h:26:10:
fatal error: opencv4/opencv2/opencv.hpp: No such file or directory
26 | #include <opencv4/opencv2/opencv.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: Leaving directory
'/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/obj-x86_64-linux-gnu'
make[2]: *** [CMakeFiles/Makefile2:292:
ondeviceembeddingengine/CMakeFiles/kylin-ondevice-embedding-engine.dir/all]
Error 2
make[2]: *** Waiting for unfinished jobs....
279 | (cv::Mat_<float>(1, 2) << 960.0f / 992.0f, 1024.0f / 992.0f);
| ^~~~~~
In file included from /usr/include/opencv5/opencv2/core/mat.hpp:4159,
from /usr/include/opencv5/opencv2/core.hpp:58,
from /usr/include/opencv5/opencv2/opencv.hpp:52,
from
/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/ondevicevisionengine/docimgrec_triton_client/client.h:29,
from
/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/ondevicevisionengine/docimgrec_triton_client/client.cpp:18:
/usr/include/opencv5/opencv2/core/mat.inl.hpp:3211:27: note: declared here
3211 | MatCommaInitializer_<_Tp> operator << (const Mat_<_Tp>& m, T2 val)
| ^~~~~~~~
[ 53%] Linking CXX static library libmatting_triton_client.a
/usr/bin/x86_64-linux-gnu-ar qc libmatting_triton_client.a
CMakeFiles/matting_triton_client.dir/client.cpp.o
CMakeFiles/matting_triton_client.dir/__/utils/base64_transformer.cpp.o
/usr/bin/x86_64-linux-gnu-ranlib libmatting_triton_client.a
make[3]: Leaving directory
'/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/obj-x86_64-linux-gnu'
[ 53%] Built target matting_triton_client
[ 56%] Linking CXX static library libdocimgrec_triton_client.a
/usr/bin/x86_64-linux-gnu-ar qc libdocimgrec_triton_client.a
CMakeFiles/docimgrec_triton_client.dir/client.cpp.o
CMakeFiles/docimgrec_triton_client.dir/__/utils/base64_transformer.cpp.o
/usr/bin/x86_64-linux-gnu-ranlib libdocimgrec_triton_client.a
make[3]: Leaving directory
'/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/obj-x86_64-linux-gnu'
[ 56%] Built target docimgrec_triton_client
[ 59%] Linking CXX static library libimage_binaryzation.a
/usr/bin/x86_64-linux-gnu-ar qc libimage_binaryzation.a
CMakeFiles/image_binaryzation.dir/client.cpp.o
CMakeFiles/image_binaryzation.dir/__/utils/base64_transformer.cpp.o
/usr/bin/x86_64-linux-gnu-ranlib libimage_binaryzation.a
make[3]: Leaving directory
'/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/obj-x86_64-linux-gnu'
[ 59%] Built target image_binaryzation
[ 62%] Linking CXX static library libocr_triton_client.a
/usr/bin/x86_64-linux-gnu-ar qc libocr_triton_client.a
CMakeFiles/ocr_triton_client.dir/client.cpp.o
CMakeFiles/ocr_triton_client.dir/__/utils/base64_transformer.cpp.o
/usr/bin/x86_64-linux-gnu-ranlib libocr_triton_client.a
make[3]: Leaving directory
'/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/obj-x86_64-linux-gnu'
[ 62%] Built target ocr_triton_client
[ 65%] Linking CXX shared library libkylin-ondevice-nlp-engine.so
make[3]: Leaving directory
'/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/obj-x86_64-linux-gnu'
[ 65%] Built target kylin-ondevice-nlp-engine
make[2]: Leaving directory
'/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/obj-x86_64-linux-gnu'
make[1]: *** [Makefile:139: all] Error 2
make[1]: Leaving directory
'/build/reproducible-path/kylin-ondevice-ai-engine-plugin-1.2.0.0/obj-x86_64-linux-gnu'
dh_auto_build: error: cd obj-x86_64-linux-gnu && make -j40
INSTALL="install --strip-program=true" VERBOSE=1 returned exit code 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