All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Awais Belal" <Awais_Belal@mentor.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH] libsdl2: disable shared memory for native builds
Date: Wed, 17 Mar 2021 19:06:44 +0500	[thread overview]
Message-ID: <20210317140644.12587-1-awais_belal@mentor.com> (raw)

libsdl2 currently does not handle the failures that
occur due to shared memory in case of remote hosts
where it should ideally switch to socket based writing
when a failure is seen with shared memory.
Consider a scenario where a qemu build is done with
graphics support on a build machine and then accessed
remotely using ssh. If the remote host's X presents
MIT-SHM as an extension, launching qemu fails with

runqemu - ERROR - Failed to run qemu: X Error: BadValue
Request Major code 130 (MIT-SHM)
Request Minor code 3 ()

This is most often seen when the remote machine doing
ssh is a Ubuntu 20.04. The libsdl2 native are mainly
used for qemu at this time so it is a major usecase.
A report of such a failure was also presented at
https://lists.yoctoproject.org/g/poky/topic/78854857

Signed-off-by: Awais Belal <awais_belal@mentor.com>
---
 meta/recipes-graphics/libsdl2/libsdl2_2.0.14.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.14.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.14.bb
index 872592fdae..54556abb27 100644
--- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.14.bb
+++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.14.bb
@@ -65,6 +65,7 @@ PACKAGECONFIG[wayland]    = "--enable-video-wayland,--disable-video-wayland,wayl
 PACKAGECONFIG[x11]        = "--enable-video-x11,--disable-video-x11,virtual/libx11 libxext libxrandr libxrender"
 
 EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader"
+CFLAGS_append_class-native = " -DNO_SHARED_MEMORY"
 
 do_configure_prepend() {
         # Remove old libtool macros.
-- 
2.17.1


                 reply	other threads:[~2021-03-17 14:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20210317140644.12587-1-awais_belal@mentor.com \
    --to=awais_belal@mentor.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.