From b77403017b5ee6c73bb5ad25de7435b659efade2 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Wed, 10 Dec 2025 18:43:35 +0200 Subject: [PATCH] opencv: fill in missing FastCV gaps When OpenCV is being built with the "fastcv" packageconfig, several OpenCV libs are linked against the libfastcv.a. At runtime this lib will dlopen(libfastcvopt.so.1), providing a fallback to slow algorithms, etc. However as it is dlopen() rather than dynamic linking, there is no runtime dependency. In Yocto, if we enable a feature, we expect that all runtime dependencies are pulled in. Utilize the qcom-fastcv-binaries recipe provided by the meta-qcom layer and pull in libfastcvopt1 package as required. Cc: Pulkit Singh Tak Signed-off-by: Dmitry Baryshkov Signed-off-by: Khem Raj --- meta-oe/recipes-support/opencv/opencv_4.12.0.bb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meta-oe/recipes-support/opencv/opencv_4.12.0.bb b/meta-oe/recipes-support/opencv/opencv_4.12.0.bb index aa11d3da43..b8e83cd6be 100644 --- a/meta-oe/recipes-support/opencv/opencv_4.12.0.bb +++ b/meta-oe/recipes-support/opencv/opencv_4.12.0.bb @@ -122,7 +122,7 @@ PACKAGECONFIG[tests] = "-DBUILD_TESTS=ON -DINSTALL_TESTS=ON,-DBUILD_TESTS=OFF,," PACKAGECONFIG[text] = "-DBUILD_opencv_text=ON,-DBUILD_opencv_text=OFF,tesseract," PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff," PACKAGECONFIG[v4l] = "-DWITH_V4L=ON,-DWITH_V4L=OFF,v4l-utils," -PACKAGECONFIG[fastcv] = "-DWITH_FASTCV=ON ,-DWITH_FASTCV=OFF,," +PACKAGECONFIG[fastcv] = "-DWITH_FASTCV=ON ,-DWITH_FASTCV=OFF,qcom-fastcv-binaries," inherit pkgconfig cmake setuptools3-base python3native @@ -165,6 +165,11 @@ python populate_packages:prepend () { if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.endswith('-doc') and not pkg.endswith('-locale') and not pkg.endswith('-staticdev'): metapkg_rdepends.append(pkg) d.setVar('RDEPENDS:' + metapkg, ' '.join(metapkg_rdepends)) + + fastcv_pkgs = ["libopencv-core", "libopencv-fastcv", "libopencv-imgproc"] + if bb.utils.contains('PACKAGECONFIG', 'fastcv', True, False, d): + for pkg in fastcv_pkgs: + d.appendVar('RDEPENDS:' + pkg, " qcom-fastcv-binaries") } PACKAGES_DYNAMIC += "^libopencv-.*"