Message ID | 20251017155047.1122714-2-corentin.guillevic@smile.fr |
---|---|
State | Under Review |
Headers | show |
Series | [v3] opencv: limit features in native | expand |
> -----Original Message----- > From: Corentin Guillevic <corentin.guillevic@smile.fr> > Sent: den 17 oktober 2025 17:51 > To: openembedded-devel@lists.openembedded.org > Cc: Peter Kjellerstedt <peter.kjellerstedt@axis.com>; Corentin Guillevic <corentin.guillevic@smile.fr> > Subject: [PATCH v3] 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 for the native build. > > 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> > --- > changes in v3: > - update commit text according to the v2 implementation > > changes in v2: > - change implementation to a more commonly written one > --- > 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 Since the change for opencv to allow it to build for native just made it into the walnascar branch, this will need to be backported there too. //Peter
On 10/17/25 20:29, Peter Kjellerstedt wrote: >> -----Original Message----- >> From: Corentin Guillevic <corentin.guillevic@smile.fr> >> Sent: den 17 oktober 2025 17:51 >> To: openembedded-devel@lists.openembedded.org >> Cc: Peter Kjellerstedt <peter.kjellerstedt@axis.com>; Corentin Guillevic <corentin.guillevic@smile.fr> >> Subject: [PATCH v3] 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 for the native build. >> >> 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> >> --- >> changes in v3: >> - update commit text according to the v2 implementation >> >> changes in v2: >> - change implementation to a more commonly written one >> --- >> 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 > Since the change for opencv to allow it to build for native just made it > into the walnascar branch, this will need to be backported there too. > > //Peter I'd say Walnascar has taken its final form - all bugs are features there (unless something very critical happens in the near future, that makes an emergency release mandatory).
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 for the native build. 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> --- changes in v3: - update commit text according to the v2 implementation changes in v2: - change implementation to a more commonly written one --- meta-oe/recipes-support/opencv/opencv_4.12.0.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)