Skip to contentSkip to conversation

qemu: Fix build when x11 is not in distro features

PATCH Superseded Khem Raj 2 participants 6 messages Mar 9, 2022 1 message not in the archive

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 qemu: Fix build when x11 is not in distro features

---
 meta/recipes-devtools/qemu/qemu_6.2.0.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-devtools/qemu/qemu_6.2.0.bb +2 -0
index 062ed32b015..c7eef0a9d5e 100644
@@ -6,6 +6,8 @@ DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native"
 
 DEPENDS:append:libc-musl = " libucontext"
 
+CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}"
+
 RDEPENDS:${PN}:class-target += "bash"
 
 EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}"
Signature · 1 line
2.35.1
#1 lore raw

Why is this issue not seen on autobuilder’s no-x11 job?

Alex

Quoted 37 lines · Khem Raj
---
 meta/recipes-devtools/qemu/qemu_6.2.0.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-devtools/qemu/qemu_6.2.0.bb +0 -0
index 062ed32b015..c7eef0a9d5e 100644
@@ -6,6 +6,8 @@ DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native

meson-native"

DEPENDS:append:libc-musl = " libucontext"

+CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}"
+
RDEPENDS:${PN}:class-target += "bash"

EXTRA_OECONF:append:class-target = "
--target-list=${@get_qemu_target_list(d)}"
--
2.35.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#162946):
https://lists.openembedded.org/g/openembedded-core/message/162946
Mute This Topic: https://lists.openembedded.org/mt/89652908/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#2 lore raw
Quoted 3 lines · Alexander Kanavin

Why is this issue not seen on autobuilder’s no-x11 job?

perhaps AB's no-x11 job is still using mesa and not an alternative stack like mali or sgx ddk
if so then here is why

https://git.openembedded.org/openembedded-core/tree/meta/recipes-graphics/mesa/mesa.inc#n30

Quoted 34 lines

Alex

Quoted 31 lines · Khem Raj
---
 meta/recipes-devtools/qemu/qemu_6.2.0.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-devtools/qemu/qemu_6.2.0.bb +2 -1
index 062ed32b015..c7eef0a9d5e 100644
@@ -6,6 +6,8 @@ DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native"
 
 DEPENDS:append:libc-musl = " libucontext"
 
+CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}"
+
 RDEPENDS:${PN}:class-target += "bash"
 
 EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}"
--

2.35.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#162946): https://lists.openembedded.org/g/openembedded-core/message/162946
Mute This Topic: https://lists.openembedded.org/mt/89652908/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Also, what error specifically are you seeing? How is your build set up?

Alex

Quoted 46 lines · Alexander Kanavin via lists.openembedded.org

Why is this issue not seen on autobuilder’s no-x11 job?

Alex

Quoted 20 lines · Khem Raj
---
 meta/recipes-devtools/qemu/qemu_6.2.0.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-devtools/qemu/qemu_6.2.0.bb +0 -0
index 062ed32b015..c7eef0a9d5e 100644
@@ -6,6 +6,8 @@ DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native

meson-native"

DEPENDS:append:libc-musl = " libucontext"

+CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}"
+
RDEPENDS:${PN}:class-target += "bash"

Quoted 9 lines

EXTRA_OECONF:append:class-target = "
--target-list=${@get_qemu_target_list(d)}"
--
2.35.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#162947):
https://lists.openembedded.org/g/openembedded-core/message/162947
Mute This Topic: https://lists.openembedded.org/mt/89652908/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#5 lore raw
Quoted 3 lines · Alexander Kanavin

Also, what error specifically are you seeing? How is your build set up?

There is use of MESA_EGL_NO_X11_HEADERS which is now renamed in newer headers to EGL_NO_X11 from mesa/khronos headers, however this define is relatively new and 3D stacks do not have this adopted but apps
like qemu and bunch of others depend on it, I guess they assume mesa. One can argue that its better to fix the 3D stacks to behave
like mesa but this means every BSP using these stacks will need to carry such a fix.

https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/include/EGL/eglplatform.h

Quoted 43 lines

Alex

Quoted 40 lines · Alexander Kanavin via lists.openembedded.org

Why is this issue not seen on autobuilder’s no-x11 job?

Alex

Quoted 20 lines · Khem Raj
---
 meta/recipes-devtools/qemu/qemu_6.2.0.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-devtools/qemu/qemu_6.2.0.bb +2 -1
index 062ed32b015..c7eef0a9d5e 100644
@@ -6,6 +6,8 @@ DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native"
 
 DEPENDS:append:libc-musl = " libucontext"
 
+CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}"
+
 RDEPENDS:${PN}:class-target += "bash"
 
 EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}"
--
Quoted 5 lines

2.35.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#162947): https://lists.openembedded.org/g/openembedded-core/message/162947
Mute This Topic: https://lists.openembedded.org/mt/89652908/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#6 lore raw

Can you add this to the commit message please?

Alex

Quoted 60 lines · Khem Raj
Quoted 3 lines · Alexander Kanavin

Also, what error specifically are you seeing? How is your build set up?

There is use of MESA_EGL_NO_X11_HEADERS which is now renamed in newer headers to EGL_NO_X11 from mesa/khronos headers, however this define is relatively new and 3D stacks do not have this adopted but apps
like qemu and bunch of others depend on it, I guess they assume mesa. One can argue that its better to fix the 3D stacks to behave
like mesa but this means every BSP using these stacks will need to carry such a fix.

https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/include/EGL/eglplatform.h

Quoted 43 lines

Alex

Quoted 40 lines · Alexander Kanavin via lists.openembedded.org

Why is this issue not seen on autobuilder’s no-x11 job?

Alex

Quoted 20 lines · Khem Raj
---
 meta/recipes-devtools/qemu/qemu_6.2.0.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-devtools/qemu/qemu_6.2.0.bb +2 -1
index 062ed32b015..c7eef0a9d5e 100644
@@ -6,6 +6,8 @@ DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native"
 
 DEPENDS:append:libc-musl = " libucontext"
 
+CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}"
+
 RDEPENDS:${PN}:class-target += "bash"
 
 EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}"
--
Quoted 5 lines

2.35.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#162947): https://lists.openembedded.org/g/openembedded-core/message/162947
Mute This Topic: https://lists.openembedded.org/mt/89652908/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-