From: akuster808 <akuster808@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Martin Kelly <martin@xevo.com>
Subject: Re: [PATCH] libsdl: enable X11 for nativesdk
Date: Tue, 11 Apr 2017 09:34:00 -0700 [thread overview]
Message-ID: <becb96f0-bc8a-3a91-0649-cab9be51d6dd@gmail.com> (raw)
In-Reply-To: <1491508529-2862-1-git-send-email-martin@xevo.com>
On 04/06/2017 12:55 PM, Martin Kelly wrote:
> From: Martin Kelly <mkelly@xevo.com>
>
> Currently, the following situation fails:
>
> - Build an SDK and image. Make the image support graphics but not X11.
> - Extract SDK and copy image somewhere outside of the Yocto workspace. Do
> runqemu on the image.
>
> This results in the error:
> "Could not initialize SDL(No available video device) - exiting"
This seems to have fixed an issue I was seeing on FedoraCore 25 with
Morty with the same error. Did I miss comments regarding these changes?
- armin
>
> This error occurs because libSDL attempts to load libX11 for video devices. When
> it fails, qemu also fails.
>
> Note that the same runqemu command will work fine from within the Yocto
> workspace environment because it will use the native libSDL -- which supports
> X11 -- rather than the nativesdk libSDL. In addition, the command will work fine
> as long as DISTRO_FEATURES includes x11, because then the nativesdk libSDL will
> be compiled with X11 support.
>
> Although the example above may seem a bit silly, this is actually a pretty bad
> error because it breaks the ability to build an SDK and image on one machine and
> run it on a different machine.
>
> Fix the issue by building nativesdk-libsdl with X11 support -- even when
> DISTRO_FEATURES does not include X11 -- as we already do for libsdl-native.
>
> Signed-off-by: Martin Kelly <mkelly@xevo.com>
> ---
> meta/recipes-graphics/libsdl/libsdl_1.2.15.bb | 3 ++-
> meta/recipes-graphics/xorg-lib/libxcb_1.12.bb | 1 +
> meta/recipes-graphics/xorg-lib/xorg-lib-common.inc | 1 +
> 3 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb b/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
> index c802a6f..89d84ab 100644
> --- a/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
> +++ b/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
> @@ -43,8 +43,9 @@ EXTRA_OECONF = "--disable-static --enable-cdrom --enable-threads --enable-timers
>
> PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11', d)} \
> ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)}"
> +# Without X11 support, qemu will fail because SDL cannot find video devices.
> PACKAGECONFIG_class-native = "x11"
> -PACKAGECONFIG_class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
> +PACKAGECONFIG_class-nativesdk = "x11"
>
> PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib"
> PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
> diff --git a/meta/recipes-graphics/xorg-lib/libxcb_1.12.bb b/meta/recipes-graphics/xorg-lib/libxcb_1.12.bb
> index a38bdea..6d7e675 100644
> --- a/meta/recipes-graphics/xorg-lib/libxcb_1.12.bb
> +++ b/meta/recipes-graphics/xorg-lib/libxcb_1.12.bb
> @@ -31,6 +31,7 @@ inherit autotools pkgconfig distro_features_check
> # The libxau and others requires x11 in DISTRO_FEATURES
> REQUIRED_DISTRO_FEATURES = "x11"
> REQUIRED_DISTRO_FEATURES_class-native = ""
> +REQUIRED_DISTRO_FEATURES_class-nativesdk = ""
>
> export PYTHON = "python3"
>
> diff --git a/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc b/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc
> index 6f4e444..b397923 100644
> --- a/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc
> +++ b/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc
> @@ -25,3 +25,4 @@ UNKNOWN_CONFIGURE_WHITELIST += "--enable-malloc0returnsnull --disable-malloc0ret
>
> REQUIRED_DISTRO_FEATURES ?= "x11"
> REQUIRED_DISTRO_FEATURES_class-native = ""
> +REQUIRED_DISTRO_FEATURES_class-nativesdk = ""
next prev parent reply other threads:[~2017-04-11 16:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-06 19:55 [PATCH] libsdl: enable X11 for nativesdk Martin Kelly
2017-04-11 16:34 ` akuster808 [this message]
2017-04-11 17:14 ` Richard Purdie
2017-04-11 21:47 ` Martin Kelly
2017-04-13 0:16 ` Martin Kelly
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=becb96f0-bc8a-3a91-0649-cab9be51d6dd@gmail.com \
--to=akuster808@gmail.com \
--cc=martin@xevo.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox