Bug#1147685: ros-vision-opencv: FTBFS with OpenCV 5.0
Aron Xu
aron at debian.org
Mon Sep 14 12:22:19 BST 2026
Source: ros-vision-opencv
Version: 1.16.2+ds-5
Severity: important
Tags: ftbfs
User: opencv at packages.debian.org
Usertags: opencv5-transition
Control: affects -1 src:opencv
X-Debbugs-Cc: opencv at packages.debian.org, aron at debian.org
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 ros-vision-opencv's case, cv_bridge/CMakeLists.txt:28 calls
find_package(OpenCV ...) with a hard-coded fallback path: after an
OpenCV-4 probe fails it retries with version "3" pinned ("-- Did not
find OpenCV 4, trying OpenCV 3"). CMake then walks the config search
path, finds /usr/lib/x86_64-linux-gnu/cmake/opencv5/OpenCVConfig.cmake
(version 5.0.0), and rejects it because 5.0.0 does not satisfy the
literal "3" version constraint, so find_package fails outright. The
fallback never tries version 5 at all. The maintainer should change
line 28 to probe for OpenCV 5 first (or drop the upper bound and call
find_package(OpenCV 4...6) or an unversioned find_package(OpenCV
REQUIRED)) so the opencv5 CMake config under
/usr/lib/x86_64-linux-gnu/cmake/opencv5/ is accepted.
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.
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/x86_64-linux-gnu-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/x86_64-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX:
/build/reproducible-path/ros-vision-opencv-1.16.2+ds/obj-x86_64-linux-gnu/_devel
-- Using CMAKE_PREFIX_PATH:
/build/reproducible-path/ros-vision-opencv-1.16.2+ds/debian/tmp/usr
-- Found Python: /usr/bin/python3 (found suitable version "3.14.7",
minimum required is "3") found components: Interpreter
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Skip enable_testing() when building binary package
-- Using CATKIN_TEST_RESULTS_DIR:
/build/reproducible-path/ros-vision-opencv-1.16.2+ds/obj-x86_64-linux-gnu/cv_bridge/py3.14/test_results
-- GTest is available
-- GMock is not available. Please install libgmock-dev to enable
tests involving GMock.
-- nosetests not found, Python tests can not be run (try installing
package 'python3-nose')
-- Found Threads: TRUE
-- catkin 0.8.12
-- BUILD_SHARED_LIBS is on
CMake Warning (dev) at CMakeLists.txt:7 (find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
are removed. Run "cmake --help-policy CMP0148" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.14.so
(found suitable exact version "3.14.7")
CMake Warning (dev) at CMakeLists.txt:15 (find_package):
Policy CMP0167 is not set: The FindBoost module is removed. Run "cmake
--help-policy CMP0167" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found Boost:
/usr/lib/x86_64-linux-gnu/cmake/Boost-1.90.0/BoostConfig.cmake (found
version "1.90.0") found components: python314
-- Did not find OpenCV 4, trying OpenCV 3
CMake Error at CMakeLists.txt:28 (find_package):
Could not find a configuration file for package "OpenCV" that is compatible
with requested version "3".
The following configuration files were considered but not accepted:
/usr/lib/x86_64-linux-gnu/cmake/opencv5/OpenCVConfig.cmake, version: 5.0.0
The version found is not compatible with the version requested.
/lib/x86_64-linux-gnu/cmake/opencv5/OpenCVConfig.cmake, version: 5.0.0
The version found is not compatible with the version requested.
-- Configuring incomplete, errors occurred!
cd obj-x86_64-linux-gnu/cv_bridge/py3.14 && tail -v -n \+0 CMakeCache.txt
Please close this bug if it turns out to be a collision with another ongoing
transition rather than an OpenCV 5 problem.
Thanks,
Aron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ros-vision-opencv_1.16.2+ds-5_amd64-2026-09-11T19?53?56Z.build.gz
Type: application/x-gzip
Size: 49294 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20260914/3235d016/attachment-0003.bin>
More information about the debian-science-maintainers
mailing list