Message ID | 20251017091933.1094941-2-corentin.guillevic@smile.fr |
---|---|
State | New |
Headers | show |
Series | [v2] opencv: limit features in native | expand |
> -----Original Message----- > From: Corentin Guillevic <corentin.guillevic@smile.fr> > Sent: den 17 oktober 2025 11:20 > To: openembedded-devel@lists.openembedded.org > Cc: Peter Kjellerstedt <peter.kjellerstedt@axis.com>; Corentin Guillevic <corentin.guillevic@smile.fr> > Subject: [PATCH v2] opencv: limit features in native > > Since commit 91e428d4cd5a ("opencv: Support building for native"), > opencv can be built on a native target. However, not all of their > PACKAGECONFIG dependencies (ade, libgphoto2, ffmpeg, gstreamer1.0 and > gstreamer1.0-plugins-base) can be built in this context due to the > missing native BBCLASSEXTEND. > > These recipes would need to be extended for native build, but specific > work is required to ensure they work properly. To make opencv-native work > for now, remove the above features by splitting PACKAGECONFIG in 3: common, > native and target. The text above was not rewritten after the implementation was changed. > Effectively, PACKAGECONFIG for native is target minus gapi, gstreamer, > gphoto2 and libav. > > Fixes this warning from AB[0]: > WARNING: Nothing PROVIDES 'gstreamer1.0-plugins-base-native' (but virtual:native:[...]/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.12.0.bb DEPENDS on or otherwise requires it). Close matches: > WARNING: Nothing PROVIDES 'ffmpeg-native' (but virtual:native:[...]/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.12.0.bb DEPENDS on or otherwise requires it). Close matches: > WARNING: Nothing PROVIDES 'libgphoto2-native' (but virtual:native:[...]/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.12.0.bb DEPENDS on or otherwise requires it). Close matches: > WARNING: Nothing PROVIDES 'gstreamer1.0-native' (but virtual:native:[...]/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.12.0.bb DEPENDS on or otherwise requires it). Close matches: > WARNING: Nothing PROVIDES 'ade-native' (but virtual:native:[...]/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.12.0.bb DEPENDS on or otherwise requires it). Close matches: > WARNING: Nothing RPROVIDES 'opencv-dev-native' (but virtual:native:[...]/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.12.0.bb RDEPENDS on or otherwise requires it) > WARNING: Nothing RPROVIDES 'opencv-native' (but virtual:native:[...]/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.12.0.bb RDEPENDS on or otherwise requires it) > [0]: https://autobuilder.yoctoproject.org/valkyrie/#/builders/82/builds/469/steps/13/logs/warnings > > Signed-off-by: Corentin Guillevic <corentin.guillevic@smile.fr> > --- > meta-oe/recipes-support/opencv/opencv_4.12.0.bb | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > 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 27499caa92..aa11d3da43 100644 > --- a/meta-oe/recipes-support/opencv/opencv_4.12.0.bb > +++ b/meta-oe/recipes-support/opencv/opencv_4.12.0.bb > @@ -86,8 +86,9 @@ LDFLAGS:append:riscv32 = " -Wl,--no-as-needed -latomic -Wl,--as-needed" > > EXTRA_OECMAKE:append:x86 = " -DX86=ON" > > -PACKAGECONFIG ??= "gapi python3 eigen jpeg png tiff v4l libv4l gstreamer samples tbb gphoto2 \ > - ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk', '', d)} \ > +PACKAGECONFIG ??= "python3 eigen jpeg png tiff v4l libv4l samples tbb \ > + ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk', '', d)}" > +PACKAGECONFIG:append:class-target = " gapi gstreamer gphoto2 \ > ${@bb.utils.contains_any("LICENSE_FLAGS_ACCEPTED", "commercial_ffmpeg commercial", "libav", "", d)}" > > # TBB does not build for powerpc so disable that package config > -- > 2.49.0 //Peter
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 27499caa92..aa11d3da43 100644 --- a/meta-oe/recipes-support/opencv/opencv_4.12.0.bb +++ b/meta-oe/recipes-support/opencv/opencv_4.12.0.bb @@ -86,8 +86,9 @@ LDFLAGS:append:riscv32 = " -Wl,--no-as-needed -latomic -Wl,--as-needed" EXTRA_OECMAKE:append:x86 = " -DX86=ON" -PACKAGECONFIG ??= "gapi python3 eigen jpeg png tiff v4l libv4l gstreamer samples tbb gphoto2 \ - ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk', '', d)} \ +PACKAGECONFIG ??= "python3 eigen jpeg png tiff v4l libv4l samples tbb \ + ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk', '', d)}" +PACKAGECONFIG:append:class-target = " gapi gstreamer gphoto2 \ ${@bb.utils.contains_any("LICENSE_FLAGS_ACCEPTED", "commercial_ffmpeg commercial", "libav", "", d)}" # TBB does not build for powerpc so disable that package config
Since commit 91e428d4cd5a ("opencv: Support building for native"), opencv can be built on a native target. However, not all of their PACKAGECONFIG dependencies (ade, libgphoto2, ffmpeg, gstreamer1.0 and gstreamer1.0-plugins-base) can be built in this context due to the missing native BBCLASSEXTEND. These recipes would need to be extended for native build, but specific work is required to ensure they work properly. To make opencv-native work for now, remove the above features by splitting PACKAGECONFIG in 3: common, native and target. Effectively, PACKAGECONFIG for native is target minus gapi, gstreamer, gphoto2 and libav. Fixes this warning from AB[0]: WARNING: Nothing PROVIDES 'gstreamer1.0-plugins-base-native' (but virtual:native:[...]/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.12.0.bb DEPENDS on or otherwise requires it). Close matches: WARNING: Nothing PROVIDES 'ffmpeg-native' (but virtual:native:[...]/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.12.0.bb DEPENDS on or otherwise requires it). Close matches: WARNING: Nothing PROVIDES 'libgphoto2-native' (but virtual:native:[...]/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.12.0.bb DEPENDS on or otherwise requires it). Close matches: WARNING: Nothing PROVIDES 'gstreamer1.0-native' (but virtual:native:[...]/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.12.0.bb DEPENDS on or otherwise requires it). Close matches: WARNING: Nothing PROVIDES 'ade-native' (but virtual:native:[...]/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.12.0.bb DEPENDS on or otherwise requires it). Close matches: WARNING: Nothing RPROVIDES 'opencv-dev-native' (but virtual:native:[...]/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.12.0.bb RDEPENDS on or otherwise requires it) WARNING: Nothing RPROVIDES 'opencv-native' (but virtual:native:[...]/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.12.0.bb RDEPENDS on or otherwise requires it) [0]: https://autobuilder.yoctoproject.org/valkyrie/#/builders/82/builds/469/steps/13/logs/warnings Signed-off-by: Corentin Guillevic <corentin.guillevic@smile.fr> --- meta-oe/recipes-support/opencv/opencv_4.12.0.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)