diff mbox series

[V2] gstreamer1.0-plugins-bad: disble vulkan when x11/wayland not enabled

Message ID 20260508022311.3112415-1-changqing.li@windriver.com
State Under Review
Headers show
Series [V2] gstreamer1.0-plugins-bad: disble vulkan when x11/wayland not enabled | expand

Commit Message

Changqing Li May 8, 2026, 2:23 a.m. UTC
When vulkan is enabled in DISTRO_FEATURES without x11 or wayland,
do_configure will failed with error:
gst-libs/gst/vulkan/meson.build:311:4: ERROR: Problem encountered: No Windowing system found. vulkansink will not work

disable vulkan from PACKAGECONFIG when x11 and wayland is not enabled

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 .../gstreamer/gstreamer1.0-plugins-bad_1.28.2.bb             | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Jose Quaresma May 8, 2026, 2:40 p.m. UTC | #1
Hi Changqing,

Changqing Li via lists.openembedded.org <changqing.li=
windriver.com@lists.openembedded.org> escreveu (sexta, 8/05/2026 à(s)
03:23):

> When vulkan is enabled in DISTRO_FEATURES without x11 or wayland,
> do_configure will failed with error:
> gst-libs/gst/vulkan/meson.build:311:4: ERROR: Problem encountered: No
> Windowing system found. vulkansink will not work
>
> disable vulkan from PACKAGECONFIG when x11 and wayland is not enabled
>
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
>  .../gstreamer/gstreamer1.0-plugins-bad_1.28.2.bb             | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-multimedia/gstreamer/
> gstreamer1.0-plugins-bad_1.28.2.bb b/meta/recipes-multimedia/gstreamer/
> gstreamer1.0-plugins-bad_1.28.2.bb
> index cdf3a20dff..c7f081e25b 100644
> --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.28.2.bb
> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.28.2.bb
> @@ -21,10 +21,13 @@ DEPENDS += "gstreamer1.0-plugins-base"
>
>  inherit gobject-introspection
>
> +PACKAGECONFIG_VULKAN ?= "${@bb.utils.filter('DISTRO_FEATURES', 'vulkan',
> d)}"
> +
>  PACKAGECONFIG ??= " \
>      ${GSTREAMER_ORC} \
> +    ${@'${PACKAGECONFIG_VULKAN}' if (bb.utils.filter('DISTRO_FEATURES',
> 'x11 wayland', d) != '') else ''} \
>

that is a little more difficult to understand than usual, why don't we just
use the bb.utils.contains?

${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', '${
PACKAGECONFIG_VULKAN}', '', d)

It seems to me that this would work.

Or even the following, dropping the PACKAGECONFIG_VULKAN but then it loses
some readability again.

${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland',
'${@bb.utils.filter('DISTRO_FEATURES', 'vulkan', d)}', '', d)

Jose


>      ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)}
> \
> -    ${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan x11', d)} \
> +    ${@bb.utils.filter('DISTRO_FEATURES', 'directfb x11', d)} \
>      ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}
> \
>      ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \
>      bz2 closedcaption curl dash dtls hls openssl sbc smoothstreaming \
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#236630):
> https://lists.openembedded.org/g/openembedded-core/message/236630
> Mute This Topic: https://lists.openembedded.org/mt/119208574/5052612
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> quaresma.jose@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Quentin Schulz May 8, 2026, 2:53 p.m. UTC | #2
Hi Changqing,

On 5/8/26 4:23 AM, Changqing Li via lists.openembedded.org wrote:
> When vulkan is enabled in DISTRO_FEATURES without x11 or wayland,
> do_configure will failed with error:
> gst-libs/gst/vulkan/meson.build:311:4: ERROR: Problem encountered: No Windowing system found. vulkansink will not work
> 
> disable vulkan from PACKAGECONFIG when x11 and wayland is not enabled
> 
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
>   .../gstreamer/gstreamer1.0-plugins-bad_1.28.2.bb             | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.28.2.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.28.2.bb
> index cdf3a20dff..c7f081e25b 100644
> --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.28.2.bb
> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.28.2.bb
> @@ -21,10 +21,13 @@ DEPENDS += "gstreamer1.0-plugins-base"
>   
>   inherit gobject-introspection
>   
> +PACKAGECONFIG_VULKAN ?= "${@bb.utils.filter('DISTRO_FEATURES', 'vulkan', d)}"
> +
>   PACKAGECONFIG ??= " \
>       ${GSTREAMER_ORC} \
> +    ${@'${PACKAGECONFIG_VULKAN}' if (bb.utils.filter('DISTRO_FEATURES', 'x11 wayland', d) != '') else ''} \
>       ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
> -    ${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan x11', d)} \
> +    ${@bb.utils.filter('DISTRO_FEATURES', 'directfb x11', d)} \
>       ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
>       ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \
>       bz2 closedcaption curl dash dtls hls openssl sbc smoothstreaming \
> 

Should we really build gstreamer-1.0-plugins-bad without vulkan support 
even if DISTRO_FEATURES contains it? Seems odd to me.

If we can fail the build, then we could probably do:

ANY_OF_DISTRO_FEATURES = "${@bb.utils.contains('DISTRO_FEATURES', 
'vulkan', 'x11 wayland', '', d)}"

Otherwise if this isn't desired, we could go for:

  # Vulkan requires a windowing system
PACKAGECONFIG_VULKAN = "${@bb.utils.contains_any('DISTRO_FEATURES', 'x11 
wayland', 'vulkan', '', d)}"

PACKAGECONFIG ??= "\
     ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 
'${PACKAGECONFIG_VULKAN}', '', d)}"

Cheers,
Quentin
diff mbox series

Patch

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.28.2.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.28.2.bb
index cdf3a20dff..c7f081e25b 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.28.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.28.2.bb
@@ -21,10 +21,13 @@  DEPENDS += "gstreamer1.0-plugins-base"
 
 inherit gobject-introspection
 
+PACKAGECONFIG_VULKAN ?= "${@bb.utils.filter('DISTRO_FEATURES', 'vulkan', d)}"
+
 PACKAGECONFIG ??= " \
     ${GSTREAMER_ORC} \
+    ${@'${PACKAGECONFIG_VULKAN}' if (bb.utils.filter('DISTRO_FEATURES', 'x11 wayland', d) != '') else ''} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
-    ${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan x11', d)} \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'directfb x11', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \
     bz2 closedcaption curl dash dtls hls openssl sbc smoothstreaming \