From de761fa21cc737292655f7c57f1cca382367e2b4 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 26 Dec 2025 18:14:47 +0100 Subject: [PATCH] package/opencv3: drop support for ffmpeg opencv3's code is not compatible with newer versions of ffmpeg, and opencv3 is no longer maintained, so we have no choice but to disable its ffmpeg support. Fixes: https://autobuild.buildroot.net/results/9ae3911583cccb6362f33cd82e5eaafb059fdc76/ It's not clear which ffmpeg version bump broken the build exactly, but this issue is definitely present in 2025.02.x as the following defconfig fails to build in a similar way on 2025.02.x: BR2_aarch64=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y BR2_PACKAGE_FFMPEG_NONFREE=y # BR2_PACKAGE_FFMPEG_FFMPEG is not set # BR2_PACKAGE_FFMPEG_INDEVS is not set # BR2_PACKAGE_FFMPEG_OUTDEVS is not set BR2_PACKAGE_OPENCV3=y BR2_PACKAGE_OPENCV3_LIB_VIDEOIO=y BR2_PACKAGE_OPENCV3_BUILD_PERF_TESTS=y BR2_PACKAGE_OPENCV3_WITH_FFMPEG=y BR2_PACKAGE_OPENCV3_INSTALL_DATA=y Signed-off-by: Thomas Petazzoni Signed-off-by: Julien Olivain (cherry picked from commit ef538cf4d9fde8e1e92364906a81310e321703d2) Signed-off-by: Thomas Perale --- Config.in.legacy | 7 +++++++ package/ffmpeg/ffmpeg.mk | 6 +++--- package/opencv3/Config.in | 9 --------- package/opencv3/opencv3.mk | 8 +------- 4 files changed, 11 insertions(+), 19 deletions(-) diff --git a/Config.in.legacy b/Config.in.legacy index 53f3c95404..598cd9c0ef 100644 --- a/Config.in.legacy +++ b/Config.in.legacy @@ -146,6 +146,13 @@ endif comment "Legacy options removed in 2025.02.10" +config BR2_PACKAGE_OPENCV3_WITH_FFMPEG + bool "opencv3 ffmpeg support removed" + select BR2_LEGACY + help + Support for OpenCV 3 ffmpeg support has been removed as it + was no longer compatible with recent versions of ffmpeg. + config BR2_PACKAGE_OPENCV3_WITH_PROTOBUF bool "opencv3 protobuf support removed" select BR2_LEGACY diff --git a/package/ffmpeg/ffmpeg.mk b/package/ffmpeg/ffmpeg.mk index f218e60067..1d6ad32d3e 100644 --- a/package/ffmpeg/ffmpeg.mk +++ b/package/ffmpeg/ffmpeg.mk @@ -297,11 +297,11 @@ else FFMPEG_CONF_OPTS += --disable-mmal --disable-omx --disable-omx-rpi endif -# To avoid a circular dependency only use opencv if opencv itself does -# not depend on ffmpeg. -ifeq ($(BR2_PACKAGE_OPENCV3_LIB_IMGPROC)x$(BR2_PACKAGE_OPENCV3_WITH_FFMPEG),yx) +ifeq ($(BR2_PACKAGE_OPENCV3_LIB_IMGPROC),y) FFMPEG_CONF_OPTS += --enable-libopencv FFMPEG_DEPENDENCIES += opencv3 +# To avoid a circular dependency only use opencv if opencv itself does +# not depend on ffmpeg. else FFMPEG_CONF_OPTS += --disable-libopencv endif diff --git a/package/opencv3/Config.in b/package/opencv3/Config.in index 7a01996b10..d24a7ee83f 100644 --- a/package/opencv3/Config.in +++ b/package/opencv3/Config.in @@ -241,15 +241,6 @@ config BR2_PACKAGE_OPENCV3_BUILD_PERF_TESTS comment "3rd party support" -config BR2_PACKAGE_OPENCV3_WITH_FFMPEG - bool "ffmpeg support" - depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS - select BR2_PACKAGE_BZIP2 - select BR2_PACKAGE_FFMPEG - select BR2_PACKAGE_FFMPEG_SWSCALE - help - Use ffmpeg from the target system. - config BR2_PACKAGE_OPENCV3_WITH_GSTREAMER1 bool "gstreamer-1.x" depends on BR2_USE_MMU # gstreamer1 -> libglib2 diff --git a/package/opencv3/opencv3.mk b/package/opencv3/opencv3.mk index ab2840c92e..d6882114d5 100644 --- a/package/opencv3/opencv3.mk +++ b/package/opencv3/opencv3.mk @@ -212,6 +212,7 @@ OPENCV3_CONF_OPTS += \ -DWITH_1394=OFF \ -DWITH_CLP=OFF \ -DWITH_EIGEN=OFF \ + -DWITH_FFMPEG=OFF \ -DWITH_GDAL=OFF \ -DWITH_GPHOTO2=OFF \ -DWITH_GSTREAMER_0_10=OFF \ @@ -231,13 +232,6 @@ OPENCV3_CONF_OPTS += \ OPENCV3_DEPENDENCIES += host-pkgconf zlib -ifeq ($(BR2_PACKAGE_OPENCV3_WITH_FFMPEG),y) -OPENCV3_CONF_OPTS += -DWITH_FFMPEG=ON -OPENCV3_DEPENDENCIES += ffmpeg bzip2 -else -OPENCV3_CONF_OPTS += -DWITH_FFMPEG=OFF -endif - ifeq ($(BR2_PACKAGE_OPENCV3_WITH_GSTREAMER1),y) OPENCV3_CONF_OPTS += -DWITH_GSTREAMER=ON OPENCV3_DEPENDENCIES += gstreamer1 gst1-plugins-base