* [PATCH 1/7] runqemu: direct mesa to use its own drivers, rather than ones provided by host distro
@ 2023-03-12 14:50 Alexander Kanavin
2023-03-12 14:50 ` [PATCH 2/7] bitbake.conf: do not set native opengl distro feature from target Alexander Kanavin
` (5 more replies)
0 siblings, 6 replies; 15+ messages in thread
From: Alexander Kanavin @ 2023-03-12 14:50 UTC (permalink / raw)
To: openembedded-core; +Cc: Alexander Kanavin
With mesa 23.0, it is not longer possible to use the host drivers, as
mesa upstream has added strict checks for matching builds between
drivers and libraries that load them.
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
scripts/runqemu | 25 +------------------------
1 file changed, 1 insertion(+), 24 deletions(-)
diff --git a/scripts/runqemu b/scripts/runqemu
index 58b0c191e1..8e915f3d4c 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -447,30 +447,7 @@ class BaseConfig(object):
self.set("MACHINE", arg)
def set_dri_path(self):
- # As runqemu can be run within bitbake (when using testimage, for example),
- # we need to ensure that we run host pkg-config, and that it does not
- # get mis-directed to native build paths set by bitbake.
- env = os.environ.copy()
- try:
- del env['PKG_CONFIG_PATH']
- del env['PKG_CONFIG_DIR']
- del env['PKG_CONFIG_LIBDIR']
- del env['PKG_CONFIG_SYSROOT_DIR']
- except KeyError:
- pass
- try:
- dripath = subprocess.check_output("PATH=/bin:/usr/bin:$PATH pkg-config --variable=dridriverdir dri", shell=True, env=env)
- except subprocess.CalledProcessError as e:
- raise RunQemuError("Could not determine the path to dri drivers on the host via pkg-config.\nPlease install Mesa development files (particularly, dri.pc) on the host machine.")
- self.qemu_environ['LIBGL_DRIVERS_PATH'] = dripath.decode('utf-8').strip()
-
- # This preloads uninative libc pieces and therefore ensures that RPATH/RUNPATH
- # in host mesa drivers doesn't trick uninative into loading host libc.
- preload_items = ['libdl.so.2', 'librt.so.1', 'libpthread.so.0']
- uninative_path = os.path.dirname(self.get("UNINATIVE_LOADER"))
- if os.path.exists(uninative_path):
- preload_paths = [os.path.join(uninative_path, i) for i in preload_items]
- self.qemu_environ['LD_PRELOAD'] = " ".join(preload_paths)
+ self.qemu_environ['LIBGL_DRIVERS_PATH'] = os.path.join(self.bindir_native, '../lib/dri')
def check_args(self):
for debug in ("-d", "--debug"):
--
2.30.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/7] bitbake.conf: do not set native opengl distro feature from target
2023-03-12 14:50 [PATCH 1/7] runqemu: direct mesa to use its own drivers, rather than ones provided by host distro Alexander Kanavin
@ 2023-03-12 14:50 ` Alexander Kanavin
2023-03-13 22:45 ` [OE-core] " Khem Raj
2023-03-12 14:50 ` [PATCH 3/7] mesa: allow mesa-native/nativesdk only subject to opengl/vulkan DISTRO_FEATURE Alexander Kanavin
` (4 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Alexander Kanavin @ 2023-03-12 14:50 UTC (permalink / raw)
To: openembedded-core; +Cc: Alexander Kanavin
This makes native opengl (and thus accelerated graphics in qemu) opt-in;
the reason is that latest mesa tightly couples hardware drivers with its libraries,
so we have to build both in mesa-native. Doing so significantly lengthens
the builds, and so cannot be imposed by default.
Add a check and a hint to runqemu so that there is a helpful error when
there is no native/nativesdk opengl/virgl support.
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
meta/conf/bitbake.conf | 4 ++--
meta/lib/oeqa/selftest/cases/runtime_test.py | 4 ++--
scripts/runqemu | 11 ++++++++++-
3 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index afd9e2f552..d1dc428583 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -912,8 +912,8 @@ DISTRO_FEATURES_NATIVESDK ?= "x11"
# Normally target distro features will not be applied to native builds:
# Native distro features on this list will use the target feature value
-DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod opengl wayland"
-DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod opengl wayland"
+DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod wayland"
+DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod wayland"
DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit gobject-introspection-data ldconfig"
MACHINE_FEATURES_BACKFILL = "rtc qemu-usermode"
diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
index 81b8d056cc..661c09c109 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -232,7 +232,7 @@ class TestImage(OESelftestTestCase):
if 'sdl' not in qemu_packageconfig:
features += 'PACKAGECONFIG:append:pn-qemu-system-native = " sdl"\n'
if 'opengl' not in qemu_distrofeatures:
- features += 'DISTRO_FEATURES:append = " opengl"\n'
+ features += 'DISTRO_FEATURES_NATIVE:append = " opengl"\n'
features += 'TEST_SUITES = "ping ssh virgl"\n'
features += 'IMAGE_FEATURES:append = " ssh-server-dropbear"\n'
features += 'IMAGE_INSTALL:append = " kmscube"\n'
@@ -264,7 +264,7 @@ class TestImage(OESelftestTestCase):
qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native')
features = 'IMAGE_CLASSES += "testimage"\n'
if 'opengl' not in qemu_distrofeatures:
- features += 'DISTRO_FEATURES:append = " opengl"\n'
+ features += 'DISTRO_FEATURES_NATIVE:append = " opengl"\n'
features += 'TEST_SUITES = "ping ssh virgl"\n'
features += 'IMAGE_FEATURES:append = " ssh-server-dropbear"\n'
features += 'IMAGE_INSTALL:append = " kmscube"\n'
diff --git a/scripts/runqemu b/scripts/runqemu
index 8e915f3d4c..9f82aa12f1 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -447,7 +447,16 @@ class BaseConfig(object):
self.set("MACHINE", arg)
def set_dri_path(self):
- self.qemu_environ['LIBGL_DRIVERS_PATH'] = os.path.join(self.bindir_native, '../lib/dri')
+ drivers_path = os.path.join(self.bindir_native, '../lib/dri')
+ if not os.path.exists(drivers_path) or not os.listdir(drivers_path):
+ raise RunQemuError("""
+qemu has been built without opengl support and accelerated graphics support is not available.
+To enable it, add:
+DISTRO_FEATURES_NATIVE:append = " opengl"
+DISTRO_FEATURES_NATIVESDK:append = " opengl"
+to your build configuration.
+""")
+ self.qemu_environ['LIBGL_DRIVERS_PATH'] = drivers_path
def check_args(self):
for debug in ("-d", "--debug"):
--
2.30.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 3/7] mesa: allow mesa-native/nativesdk only subject to opengl/vulkan DISTRO_FEATURE
2023-03-12 14:50 [PATCH 1/7] runqemu: direct mesa to use its own drivers, rather than ones provided by host distro Alexander Kanavin
2023-03-12 14:50 ` [PATCH 2/7] bitbake.conf: do not set native opengl distro feature from target Alexander Kanavin
@ 2023-03-12 14:50 ` Alexander Kanavin
2023-03-12 14:50 ` [PATCH 4/7] mesa: enable a rich set of drivers for native builds Alexander Kanavin
` (3 subsequent siblings)
5 siblings, 0 replies; 15+ messages in thread
From: Alexander Kanavin @ 2023-03-12 14:50 UTC (permalink / raw)
To: openembedded-core; +Cc: Alexander Kanavin
This prevents accidental builds of it when native/nativesdk opengl
is not actually enabled (which may cause undesirable lengthening
of dependency chains or build failures because those dependencies
don't enable options required for mesa).
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
meta/recipes-graphics/mesa/mesa.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index c0b8f65625..775aab9297 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -51,7 +51,7 @@ inherit meson pkgconfig python3native gettext features_check
BBCLASSEXTEND = "native nativesdk"
-ANY_OF_DISTRO_FEATURES:class-target = "opengl vulkan"
+ANY_OF_DISTRO_FEATURES = "opengl vulkan"
PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)}"
--
2.30.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 4/7] mesa: enable a rich set of drivers for native builds
2023-03-12 14:50 [PATCH 1/7] runqemu: direct mesa to use its own drivers, rather than ones provided by host distro Alexander Kanavin
2023-03-12 14:50 ` [PATCH 2/7] bitbake.conf: do not set native opengl distro feature from target Alexander Kanavin
2023-03-12 14:50 ` [PATCH 3/7] mesa: allow mesa-native/nativesdk only subject to opengl/vulkan DISTRO_FEATURE Alexander Kanavin
@ 2023-03-12 14:50 ` Alexander Kanavin
2023-03-12 14:50 ` [PATCH 5/7] llvm: allow building libllvm in native builds, subject to PACKAGECONFIG Alexander Kanavin
` (2 subsequent siblings)
5 siblings, 0 replies; 15+ messages in thread
From: Alexander Kanavin @ 2023-03-12 14:50 UTC (permalink / raw)
To: openembedded-core; +Cc: Alexander Kanavin
Without this, the only available driver would be swrast
(without llvmpipe) which is far too slow to be practical,
and so qemu wouldn't be able to perform accelerated graphics.
Note that mesa-native itself is guarded by presence of 'opengl'
in DISTRO_FEATURES_NATIVE, so building it is entirely opt-in.
The one major dependency is llvm-native which takes just under
three minutes on my machine.
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
meta/recipes-graphics/mesa/mesa.inc | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 775aab9297..f06c1a31da 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -89,6 +89,8 @@ PACKAGECONFIG = " \
${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'video-codecs', '', d)} \
"
+PACKAGECONFIG:append:class-native = "gallium-llvm r600"
+
# "gbm" requires "opengl"
PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled"
@@ -102,8 +104,8 @@ PACKAGECONFIG[dri3] = "-Ddri3=enabled, -Ddri3=disabled, xorgproto libxshmfence"
# Vulkan drivers need dri3 enabled
# amd could be enabled as well but requires gallium-llvm with llvm >= 3.9
VULKAN_DRIVERS = ""
-VULKAN_DRIVERS:append:x86:class-target = ",intel"
-VULKAN_DRIVERS:append:x86-64:class-target = ",intel"
+VULKAN_DRIVERS:append:x86 = ",intel"
+VULKAN_DRIVERS:append:x86-64 = ",intel"
VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'broadcom', ',broadcom', '', d)}"
PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers"
@@ -149,8 +151,8 @@ PACKAGECONFIG[zink] = ""
GALLIUMDRIVERS = "swrast"
# gallium swrast was found to crash Xorg on startup in x32 qemu
GALLIUMDRIVERS:x86-x32 = ""
-GALLIUMDRIVERS:append:x86:class-target = ",i915,iris,crocus"
-GALLIUMDRIVERS:append:x86-64:class-target = ",i915,iris,crocus"
+GALLIUMDRIVERS:append:x86 = ",i915,iris,crocus"
+GALLIUMDRIVERS:append:x86-64 = ",i915,iris,crocus"
GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
@@ -162,8 +164,8 @@ GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'zink', ',zink', '
# radeonsi requires LLVM
GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}"
GALLIUMDRIVERS_LLVM = "r300,nouveau${GALLIUMDRIVERS_RADEONSI}"
-GALLIUMDRIVERS_LLVM:append:x86:class-target = ",svga"
-GALLIUMDRIVERS_LLVM:append:x86-64:class-target = ",svga"
+GALLIUMDRIVERS_LLVM:append:x86 = ",svga"
+GALLIUMDRIVERS_LLVM:append:x86-64 = ",svga"
PACKAGECONFIG[r600] = ""
PACKAGECONFIG[virgl] = ""
--
2.30.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 5/7] llvm: allow building libllvm in native builds, subject to PACKAGECONFIG
2023-03-12 14:50 [PATCH 1/7] runqemu: direct mesa to use its own drivers, rather than ones provided by host distro Alexander Kanavin
` (2 preceding siblings ...)
2023-03-12 14:50 ` [PATCH 4/7] mesa: enable a rich set of drivers for native builds Alexander Kanavin
@ 2023-03-12 14:50 ` Alexander Kanavin
2023-03-12 14:50 ` [PATCH 6/7] mesa: do not strip rpaths from dri drivers Alexander Kanavin
2023-03-12 14:50 ` [PATCH 7/7] mesa: update 22.3.5 -> 23.0.0 Alexander Kanavin
5 siblings, 0 replies; 15+ messages in thread
From: Alexander Kanavin @ 2023-03-12 14:50 UTC (permalink / raw)
To: openembedded-core; +Cc: Alexander Kanavin
Also, enable that, if opengl is in native DISTRO_FEATURES: this allows
mesa-native to build drivers that rely on libllvm, particularly llvmpipe,
which is a (sort of) accelerated software renderer that is the only
option on build hosts without dedicated or supported GPUs.
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
meta/recipes-devtools/llvm/llvm_git.bb | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb
index b4e983d2d0..f133653903 100644
--- a/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/meta/recipes-devtools/llvm/llvm_git.bb
@@ -57,9 +57,11 @@ def get_llvm_arch(bb, d, arch_var):
def get_llvm_host_arch(bb, d):
return get_llvm_arch(bb, d, 'HOST_ARCH')
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "libllvm"
+PACKAGECONFIG:class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'libllvm', '', d)}"
# if optviewer OFF, force the modules to be not found or the ones on the host would be found
PACKAGECONFIG[optviewer] = ",-DPY_PYGMENTS_FOUND=OFF -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF -DPY_YAML_FOUND=OFF,python3-pygments python3-pyyaml,python3-pygments python3-pyyaml"
+PACKAGECONFIG[libllvm] = ""
#
# Default to build all OE-Core supported target arches (user overridable).
@@ -102,14 +104,15 @@ do_compile:prepend:class-target() {
}
do_compile() {
+ if ${@bb.utils.contains('PACKAGECONFIG', 'libllvm', 'true', 'false', d)}; then
ninja -v ${PARALLEL_MAKE}
-}
-
-do_compile:class-native() {
+ else
ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen
+ fi
}
do_install() {
+ if ${@bb.utils.contains('PACKAGECONFIG', 'libllvm', 'true', 'false', d)}; then
DESTDIR=${D} ninja -v install
# llvm harcodes usr/lib as install path, so this corrects it to actual libdir
@@ -121,9 +124,10 @@ do_install() {
# reproducibility
sed -i -e 's,${WORKDIR},,g' ${D}/${libdir}/cmake/llvm/LLVMConfig.cmake
+ fi
}
-do_install:class-native() {
+do_install:append:class-native() {
install -D -m 0755 ${B}/bin/llvm-tblgen ${D}${bindir}/llvm-tblgen${PV}
install -D -m 0755 ${B}/bin/llvm-config ${D}${bindir}/llvm-config${PV}
ln -sf llvm-config${PV} ${D}${bindir}/llvm-config
--
2.30.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 6/7] mesa: do not strip rpaths from dri drivers
2023-03-12 14:50 [PATCH 1/7] runqemu: direct mesa to use its own drivers, rather than ones provided by host distro Alexander Kanavin
` (3 preceding siblings ...)
2023-03-12 14:50 ` [PATCH 5/7] llvm: allow building libllvm in native builds, subject to PACKAGECONFIG Alexander Kanavin
@ 2023-03-12 14:50 ` Alexander Kanavin
2023-03-12 14:50 ` [PATCH 7/7] mesa: update 22.3.5 -> 23.0.0 Alexander Kanavin
5 siblings, 0 replies; 15+ messages in thread
From: Alexander Kanavin @ 2023-03-12 14:50 UTC (permalink / raw)
To: openembedded-core; +Cc: Alexander Kanavin
This was needed back when we used upstream llvm-config which
would add bogus rpaths into the drivers; nowadays it is replaced
with a oe-specific wrapper.
The particular reason is that mesa-native relies on having rpaths
to work correctly (i.e. find other native libraries in the
same sysroot location).
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
meta/recipes-graphics/mesa/mesa.inc | 3 ---
1 file changed, 3 deletions(-)
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index f06c1a31da..370b54ca6b 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -241,9 +241,6 @@ do_install:append () {
rm -f ${D}${libdir}/gallium-pipe/*.la
rm -f ${D}${libdir}/gbm/*.la
- # it was packaged in libdricore9.1.3-1 and preventing upgrades when debian.bbclass was used
- chrpath --delete ${D}${libdir}/dri/*_dri.so || true
-
# libwayland-egl has been moved to wayland 1.15+
rm -f ${D}${libdir}/libwayland-egl*
rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc
--
2.30.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 7/7] mesa: update 22.3.5 -> 23.0.0
2023-03-12 14:50 [PATCH 1/7] runqemu: direct mesa to use its own drivers, rather than ones provided by host distro Alexander Kanavin
` (4 preceding siblings ...)
2023-03-12 14:50 ` [PATCH 6/7] mesa: do not strip rpaths from dri drivers Alexander Kanavin
@ 2023-03-12 14:50 ` Alexander Kanavin
2023-03-13 6:15 ` [OE-core] " Böszörményi Zoltán
5 siblings, 1 reply; 15+ messages in thread
From: Alexander Kanavin @ 2023-03-12 14:50 UTC (permalink / raw)
To: openembedded-core; +Cc: Alexander Kanavin
Drop patches:
0001-gbm-backend-fix-gbm-compile-without-dri.patch
0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
(backports)
0001-util-format-Check-for-NEON-before-using-it.patch
(upstream submission has stalled with unanswered concerns from upstream;
patch no longer applies; issue does not reproduce with 'raspberrypi0-wifi' MACHINE)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
...e-unsigned-instead-of-uint-to-fix-mu.patch | 44 -------------
...-backend-fix-gbm-compile-without-dri.patch | 65 -------------------
...ormat-Check-for-NEON-before-using-it.patch | 47 --------------
.../{mesa-gl_22.3.5.bb => mesa-gl_23.0.0.bb} | 0
meta/recipes-graphics/mesa/mesa.inc | 5 +-
.../mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb} | 0
6 files changed, 1 insertion(+), 160 deletions(-)
delete mode 100644 meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
delete mode 100644 meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
delete mode 100644 meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
rename meta/recipes-graphics/mesa/{mesa-gl_22.3.5.bb => mesa-gl_23.0.0.bb} (100%)
rename meta/recipes-graphics/mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb} (100%)
diff --git a/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch b/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
deleted file mode 100644
index 3ab22889bf..0000000000
--- a/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 8a5de0b6cf1090d7f29f3974ec79c32776cf2745 Mon Sep 17 00:00:00 2001
-From: Jami Kettunen <jami.kettunen@protonmail.com>
-Date: Tue, 31 Aug 2021 00:15:58 +0300
-Subject: [PATCH] freedreno/pm4: Use unsigned instead of uint to fix musl build
-
-Upstream-Status: Backport
-
-Fixes the following error I noticed when building against aarch64 with
-musl libc:
-
- In file included from ../src/freedreno/decode/crashdec.h:38,
- from ../src/freedreno/decode/crashdec.c:40:
- ../src/freedreno/common/freedreno_pm4.h:104:15: error: unknown type name 'uint'
- 104 | static inline uint
- | ^~~~
- ../src/freedreno/common/freedreno_pm4.h:105:25: error: unknown type name 'uint'; did you mean 'int'?
- 105 | pm4_calc_odd_parity_bit(uint val)
- | ^~~~
- | int
-
-Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com>
-Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19665>
----
- src/freedreno/common/freedreno_pm4.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/freedreno/common/freedreno_pm4.h b/src/freedreno/common/freedreno_pm4.h
-index 8f958953d693..091247e709a0 100644
---- a/src/freedreno/common/freedreno_pm4.h
-+++ b/src/freedreno/common/freedreno_pm4.h
-@@ -105,8 +105,8 @@ pm4_pkt7_hdr(uint8_t opcode, uint16_t cnt)
- #define cp_type3_opcode(pkt) (((pkt) >> 8) & 0xFF)
- #define type3_pkt_size(pkt) ((((pkt) >> 16) & 0x3FFF) + 1)
-
--static inline uint
--pm4_calc_odd_parity_bit(uint val)
-+static inline unsigned
-+pm4_calc_odd_parity_bit(unsigned val)
- {
- return (0x9669 >> (0xf & ((val) ^ ((val) >> 4) ^ ((val) >> 8) ^
- ((val) >> 12) ^ ((val) >> 16) ^ ((val) >> 20) ^
---
-2.39.2
-
diff --git a/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch b/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
deleted file mode 100644
index 6541671b7a..0000000000
--- a/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 25946100e21cf2095bea334e8d7096798561d0b7 Mon Sep 17 00:00:00 2001
-From: Vincent Davis Jr <vince@underview.tech>
-Date: Wed, 28 Dec 2022 16:28:01 -0600
-Subject: [PATCH] gbm/backend: fix gbm compile without dri
-
-Upstream-Status: Backport
-
-https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20447
-https://gitlab.freedesktop.org/mesa/mesa/-/commit/842ca284650f066e58706741a7d22d67b5088e60
-
-At mesa version 22.2.3 patch wasn't introduced until after.
-
-Commit introduces a fix that allows for gbm to be built with an empty
-backend. There are situation especially in a Yocto/OE cross compilation
-environment where you want to build with an empty backend. The particular
-situation is as such:
-
-The mesa-gl recipe is the preferred provider for virtual/libgbm, virtual/libgl,
-virtual/mesa, etc... But the x11 DISTRO_FEATURE in't included this leads to build
-errors such as:
-
-| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o: in function `find_backend':
-| backend.c:(.text.find_backend+0xa4): undefined reference to `gbm_dri_backend'
-| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o:(.data.rel.ro.builtin_backends+0x4):
- undefined reference to `gbm_dri_backend'
-| collect2: error: ld returned 1 exit status
-
-Issue should be replicable by setting -Ddri3=disabled and -Dgbm=enabled
-
-Add fix to bypasses compilation issue by excluding gbm dri backend. If
-HAVE_DRI || HAVE_DRIX not specified.
-
-Acked-by: David Heidelberg <david.heidelberg@collabora.com>
-Signed-off-by: Vincent Davis Jr <vince@underview.tech>
----
- src/gbm/main/backend.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/gbm/main/backend.c b/src/gbm/main/backend.c
-index 974d0a76a4e..feee0703495 100644
---- a/src/gbm/main/backend.c
-+++ b/src/gbm/main/backend.c
-@@ -42,7 +42,9 @@
- #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
- #define VER_MIN(a, b) ((a) < (b) ? (a) : (b))
-
-+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3)
- extern const struct gbm_backend gbm_dri_backend;
-+#endif
-
- struct gbm_backend_desc {
- const char *name;
-@@ -51,7 +53,9 @@ struct gbm_backend_desc {
- };
-
- static const struct gbm_backend_desc builtin_backends[] = {
-+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3)
- { "dri", &gbm_dri_backend },
-+#endif
- };
-
- #define BACKEND_LIB_SUFFIX "_gbm"
---
-2.34.1
-
diff --git a/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch b/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
deleted file mode 100644
index d22ff3c8a8..0000000000
--- a/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From f17e836ef9b1bbc6056790596420b699e48128c2 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 2 Dec 2021 19:57:42 -0800
-Subject: [PATCH] util/format: Check for NEON before using it
-
-This fixes build on rpi0-w and any other machine which does not have
-neon unit and is not used as FPU unit
-
-Fixes errors e.g.
-
-In file included from ../mesa-21.3.0/src/util/format/u_format_unpack_neon.c:35:
-/mnt/b/yoe/master/build/tmp/work/arm1176jzfshf-vfp-yoe-linux-gnueabi/mesa/2_21.3.0-r0/recipe-sysroot-native/usr/lib/clang/13.0.1/include/arm_neon.h:32:2: error: "NEON support not enabled"
-
-Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14032]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- src/util/format/u_format.c | 2 +-
- src/util/format/u_format_unpack_neon.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/util/format/u_format.c b/src/util/format/u_format.c
-index c071250..0880984 100644
---- a/src/util/format/u_format.c
-+++ b/src/util/format/u_format.c
-@@ -1184,7 +1184,7 @@ static void
- util_format_unpack_table_init(void)
- {
- for (enum pipe_format format = PIPE_FORMAT_NONE; format < PIPE_FORMAT_COUNT; format++) {
--#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
-+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
- const struct util_format_unpack_description *unpack = util_format_unpack_description_neon(format);
- if (unpack) {
- util_format_unpack_table[format] = unpack;
-diff --git a/src/util/format/u_format_unpack_neon.c b/src/util/format/u_format_unpack_neon.c
-index a4a5cb1..1e4f794 100644
---- a/src/util/format/u_format_unpack_neon.c
-+++ b/src/util/format/u_format_unpack_neon.c
-@@ -23,7 +23,7 @@
-
- #include <u_format.h>
-
--#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
-+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
-
- /* armhf builds default to vfp, not neon, and refuses to compile neon intrinsics
- * unless you tell it "no really".
diff --git a/meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb b/meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb
similarity index 100%
rename from meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb
rename to meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 370b54ca6b..09a35ef33e 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -17,12 +17,9 @@ PE = "2"
SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
- file://0001-util-format-Check-for-NEON-before-using-it.patch \
- file://0001-gbm-backend-fix-gbm-compile-without-dri.patch \
- file://0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch \
"
-SRC_URI[sha256sum] = "3eed2ecae2bc674494566faab9fcc9beb21cd804c7ba2b59a1694f3d7236e6a9"
+SRC_URI[sha256sum] = "01f3cff3763f09e0adabcb8011e4aebc6ad48f6a4dd4bae904fe918707d253e4"
UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
diff --git a/meta/recipes-graphics/mesa/mesa_22.3.5.bb b/meta/recipes-graphics/mesa/mesa_23.0.0.bb
similarity index 100%
rename from meta/recipes-graphics/mesa/mesa_22.3.5.bb
rename to meta/recipes-graphics/mesa/mesa_23.0.0.bb
--
2.30.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH 7/7] mesa: update 22.3.5 -> 23.0.0
2023-03-12 14:50 ` [PATCH 7/7] mesa: update 22.3.5 -> 23.0.0 Alexander Kanavin
@ 2023-03-13 6:15 ` Böszörményi Zoltán
2023-03-13 7:52 ` Alexander Kanavin
0 siblings, 1 reply; 15+ messages in thread
From: Böszörményi Zoltán @ 2023-03-13 6:15 UTC (permalink / raw)
To: Alexander Kanavin, openembedded-core; +Cc: Alexander Kanavin
Thanks for taking care of this series.
Will this be in Mickledore?
2023. 03. 12. 15:50 keltezéssel, Alexander Kanavin írta:
> Drop patches:
> 0001-gbm-backend-fix-gbm-compile-without-dri.patch
> 0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
> (backports)
>
> 0001-util-format-Check-for-NEON-before-using-it.patch
> (upstream submission has stalled with unanswered concerns from upstream;
> patch no longer applies; issue does not reproduce with 'raspberrypi0-wifi' MACHINE)
>
> Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> ---
> ...e-unsigned-instead-of-uint-to-fix-mu.patch | 44 -------------
> ...-backend-fix-gbm-compile-without-dri.patch | 65 -------------------
> ...ormat-Check-for-NEON-before-using-it.patch | 47 --------------
> .../{mesa-gl_22.3.5.bb => mesa-gl_23.0.0.bb} | 0
> meta/recipes-graphics/mesa/mesa.inc | 5 +-
> .../mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb} | 0
> 6 files changed, 1 insertion(+), 160 deletions(-)
> delete mode 100644 meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
> delete mode 100644 meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
> delete mode 100644 meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
> rename meta/recipes-graphics/mesa/{mesa-gl_22.3.5.bb => mesa-gl_23.0.0.bb} (100%)
> rename meta/recipes-graphics/mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb} (100%)
>
> diff --git a/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch b/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
> deleted file mode 100644
> index 3ab22889bf..0000000000
> --- a/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
> +++ /dev/null
> @@ -1,44 +0,0 @@
> -From 8a5de0b6cf1090d7f29f3974ec79c32776cf2745 Mon Sep 17 00:00:00 2001
> -From: Jami Kettunen <jami.kettunen@protonmail.com>
> -Date: Tue, 31 Aug 2021 00:15:58 +0300
> -Subject: [PATCH] freedreno/pm4: Use unsigned instead of uint to fix musl build
> -
> -Upstream-Status: Backport
> -
> -Fixes the following error I noticed when building against aarch64 with
> -musl libc:
> -
> - In file included from ../src/freedreno/decode/crashdec.h:38,
> - from ../src/freedreno/decode/crashdec.c:40:
> - ../src/freedreno/common/freedreno_pm4.h:104:15: error: unknown type name 'uint'
> - 104 | static inline uint
> - | ^~~~
> - ../src/freedreno/common/freedreno_pm4.h:105:25: error: unknown type name 'uint'; did you mean 'int'?
> - 105 | pm4_calc_odd_parity_bit(uint val)
> - | ^~~~
> - | int
> -
> -Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com>
> -Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19665>
> ----
> - src/freedreno/common/freedreno_pm4.h | 4 ++--
> - 1 file changed, 2 insertions(+), 2 deletions(-)
> -
> -diff --git a/src/freedreno/common/freedreno_pm4.h b/src/freedreno/common/freedreno_pm4.h
> -index 8f958953d693..091247e709a0 100644
> ---- a/src/freedreno/common/freedreno_pm4.h
> -+++ b/src/freedreno/common/freedreno_pm4.h
> -@@ -105,8 +105,8 @@ pm4_pkt7_hdr(uint8_t opcode, uint16_t cnt)
> - #define cp_type3_opcode(pkt) (((pkt) >> 8) & 0xFF)
> - #define type3_pkt_size(pkt) ((((pkt) >> 16) & 0x3FFF) + 1)
> -
> --static inline uint
> --pm4_calc_odd_parity_bit(uint val)
> -+static inline unsigned
> -+pm4_calc_odd_parity_bit(unsigned val)
> - {
> - return (0x9669 >> (0xf & ((val) ^ ((val) >> 4) ^ ((val) >> 8) ^
> - ((val) >> 12) ^ ((val) >> 16) ^ ((val) >> 20) ^
> ---
> -2.39.2
> -
> diff --git a/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch b/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
> deleted file mode 100644
> index 6541671b7a..0000000000
> --- a/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
> +++ /dev/null
> @@ -1,65 +0,0 @@
> -From 25946100e21cf2095bea334e8d7096798561d0b7 Mon Sep 17 00:00:00 2001
> -From: Vincent Davis Jr <vince@underview.tech>
> -Date: Wed, 28 Dec 2022 16:28:01 -0600
> -Subject: [PATCH] gbm/backend: fix gbm compile without dri
> -
> -Upstream-Status: Backport
> -
> -https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20447
> -https://gitlab.freedesktop.org/mesa/mesa/-/commit/842ca284650f066e58706741a7d22d67b5088e60
> -
> -At mesa version 22.2.3 patch wasn't introduced until after.
> -
> -Commit introduces a fix that allows for gbm to be built with an empty
> -backend. There are situation especially in a Yocto/OE cross compilation
> -environment where you want to build with an empty backend. The particular
> -situation is as such:
> -
> -The mesa-gl recipe is the preferred provider for virtual/libgbm, virtual/libgl,
> -virtual/mesa, etc... But the x11 DISTRO_FEATURE in't included this leads to build
> -errors such as:
> -
> -| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o: in function `find_backend':
> -| backend.c:(.text.find_backend+0xa4): undefined reference to `gbm_dri_backend'
> -| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o:(.data.rel.ro.builtin_backends+0x4):
> - undefined reference to `gbm_dri_backend'
> -| collect2: error: ld returned 1 exit status
> -
> -Issue should be replicable by setting -Ddri3=disabled and -Dgbm=enabled
> -
> -Add fix to bypasses compilation issue by excluding gbm dri backend. If
> -HAVE_DRI || HAVE_DRIX not specified.
> -
> -Acked-by: David Heidelberg <david.heidelberg@collabora.com>
> -Signed-off-by: Vincent Davis Jr <vince@underview.tech>
> ----
> - src/gbm/main/backend.c | 4 ++++
> - 1 file changed, 4 insertions(+)
> -
> -diff --git a/src/gbm/main/backend.c b/src/gbm/main/backend.c
> -index 974d0a76a4e..feee0703495 100644
> ---- a/src/gbm/main/backend.c
> -+++ b/src/gbm/main/backend.c
> -@@ -42,7 +42,9 @@
> - #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
> - #define VER_MIN(a, b) ((a) < (b) ? (a) : (b))
> -
> -+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3)
> - extern const struct gbm_backend gbm_dri_backend;
> -+#endif
> -
> - struct gbm_backend_desc {
> - const char *name;
> -@@ -51,7 +53,9 @@ struct gbm_backend_desc {
> - };
> -
> - static const struct gbm_backend_desc builtin_backends[] = {
> -+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3)
> - { "dri", &gbm_dri_backend },
> -+#endif
> - };
> -
> - #define BACKEND_LIB_SUFFIX "_gbm"
> ---
> -2.34.1
> -
> diff --git a/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch b/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
> deleted file mode 100644
> index d22ff3c8a8..0000000000
> --- a/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
> +++ /dev/null
> @@ -1,47 +0,0 @@
> -From f17e836ef9b1bbc6056790596420b699e48128c2 Mon Sep 17 00:00:00 2001
> -From: Khem Raj <raj.khem@gmail.com>
> -Date: Thu, 2 Dec 2021 19:57:42 -0800
> -Subject: [PATCH] util/format: Check for NEON before using it
> -
> -This fixes build on rpi0-w and any other machine which does not have
> -neon unit and is not used as FPU unit
> -
> -Fixes errors e.g.
> -
> -In file included from ../mesa-21.3.0/src/util/format/u_format_unpack_neon.c:35:
> -/mnt/b/yoe/master/build/tmp/work/arm1176jzfshf-vfp-yoe-linux-gnueabi/mesa/2_21.3.0-r0/recipe-sysroot-native/usr/lib/clang/13.0.1/include/arm_neon.h:32:2: error: "NEON support not enabled"
> -
> -Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14032]
> -Signed-off-by: Khem Raj <raj.khem@gmail.com>
> -
> ----
> - src/util/format/u_format.c | 2 +-
> - src/util/format/u_format_unpack_neon.c | 2 +-
> - 2 files changed, 2 insertions(+), 2 deletions(-)
> -
> -diff --git a/src/util/format/u_format.c b/src/util/format/u_format.c
> -index c071250..0880984 100644
> ---- a/src/util/format/u_format.c
> -+++ b/src/util/format/u_format.c
> -@@ -1184,7 +1184,7 @@ static void
> - util_format_unpack_table_init(void)
> - {
> - for (enum pipe_format format = PIPE_FORMAT_NONE; format < PIPE_FORMAT_COUNT; format++) {
> --#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
> -+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
> - const struct util_format_unpack_description *unpack = util_format_unpack_description_neon(format);
> - if (unpack) {
> - util_format_unpack_table[format] = unpack;
> -diff --git a/src/util/format/u_format_unpack_neon.c b/src/util/format/u_format_unpack_neon.c
> -index a4a5cb1..1e4f794 100644
> ---- a/src/util/format/u_format_unpack_neon.c
> -+++ b/src/util/format/u_format_unpack_neon.c
> -@@ -23,7 +23,7 @@
> -
> - #include <u_format.h>
> -
> --#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
> -+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
> -
> - /* armhf builds default to vfp, not neon, and refuses to compile neon intrinsics
> - * unless you tell it "no really".
> diff --git a/meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb b/meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb
> similarity index 100%
> rename from meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb
> rename to meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb
> diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
> index 370b54ca6b..09a35ef33e 100644
> --- a/meta/recipes-graphics/mesa/mesa.inc
> +++ b/meta/recipes-graphics/mesa/mesa.inc
> @@ -17,12 +17,9 @@ PE = "2"
> SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
> file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
> file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
> - file://0001-util-format-Check-for-NEON-before-using-it.patch \
> - file://0001-gbm-backend-fix-gbm-compile-without-dri.patch \
> - file://0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch \
> "
>
> -SRC_URI[sha256sum] = "3eed2ecae2bc674494566faab9fcc9beb21cd804c7ba2b59a1694f3d7236e6a9"
> +SRC_URI[sha256sum] = "01f3cff3763f09e0adabcb8011e4aebc6ad48f6a4dd4bae904fe918707d253e4"
>
> UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
>
> diff --git a/meta/recipes-graphics/mesa/mesa_22.3.5.bb b/meta/recipes-graphics/mesa/mesa_23.0.0.bb
> similarity index 100%
> rename from meta/recipes-graphics/mesa/mesa_22.3.5.bb
> rename to meta/recipes-graphics/mesa/mesa_23.0.0.bb
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#178398): https://lists.openembedded.org/g/openembedded-core/message/178398
> Mute This Topic: https://lists.openembedded.org/mt/97560257/3617728
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [zboszor@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH 7/7] mesa: update 22.3.5 -> 23.0.0
2023-03-13 6:15 ` [OE-core] " Böszörményi Zoltán
@ 2023-03-13 7:52 ` Alexander Kanavin
0 siblings, 0 replies; 15+ messages in thread
From: Alexander Kanavin @ 2023-03-13 7:52 UTC (permalink / raw)
To: Böszörményi Zoltán
Cc: openembedded-core, Alexander Kanavin
We are in the feature freeze now (see weekly status emails). If there
are more pressing concerns for release stability (and there usually
are), the patchset won't be taken until after the release. If you want
it to go in sooner, help with those issues would be appreciated (you
can ask on #yocto irc).
Alex
On Mon, 13 Mar 2023 at 07:15, Böszörményi Zoltán <zboszor@gmail.com> wrote:
>
> Thanks for taking care of this series.
>
> Will this be in Mickledore?
>
> 2023. 03. 12. 15:50 keltezéssel, Alexander Kanavin írta:
> > Drop patches:
> > 0001-gbm-backend-fix-gbm-compile-without-dri.patch
> > 0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
> > (backports)
> >
> > 0001-util-format-Check-for-NEON-before-using-it.patch
> > (upstream submission has stalled with unanswered concerns from upstream;
> > patch no longer applies; issue does not reproduce with 'raspberrypi0-wifi' MACHINE)
> >
> > Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> > ---
> > ...e-unsigned-instead-of-uint-to-fix-mu.patch | 44 -------------
> > ...-backend-fix-gbm-compile-without-dri.patch | 65 -------------------
> > ...ormat-Check-for-NEON-before-using-it.patch | 47 --------------
> > .../{mesa-gl_22.3.5.bb => mesa-gl_23.0.0.bb} | 0
> > meta/recipes-graphics/mesa/mesa.inc | 5 +-
> > .../mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb} | 0
> > 6 files changed, 1 insertion(+), 160 deletions(-)
> > delete mode 100644 meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
> > delete mode 100644 meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
> > delete mode 100644 meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
> > rename meta/recipes-graphics/mesa/{mesa-gl_22.3.5.bb => mesa-gl_23.0.0.bb} (100%)
> > rename meta/recipes-graphics/mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb} (100%)
> >
> > diff --git a/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch b/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
> > deleted file mode 100644
> > index 3ab22889bf..0000000000
> > --- a/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
> > +++ /dev/null
> > @@ -1,44 +0,0 @@
> > -From 8a5de0b6cf1090d7f29f3974ec79c32776cf2745 Mon Sep 17 00:00:00 2001
> > -From: Jami Kettunen <jami.kettunen@protonmail.com>
> > -Date: Tue, 31 Aug 2021 00:15:58 +0300
> > -Subject: [PATCH] freedreno/pm4: Use unsigned instead of uint to fix musl build
> > -
> > -Upstream-Status: Backport
> > -
> > -Fixes the following error I noticed when building against aarch64 with
> > -musl libc:
> > -
> > - In file included from ../src/freedreno/decode/crashdec.h:38,
> > - from ../src/freedreno/decode/crashdec.c:40:
> > - ../src/freedreno/common/freedreno_pm4.h:104:15: error: unknown type name 'uint'
> > - 104 | static inline uint
> > - | ^~~~
> > - ../src/freedreno/common/freedreno_pm4.h:105:25: error: unknown type name 'uint'; did you mean 'int'?
> > - 105 | pm4_calc_odd_parity_bit(uint val)
> > - | ^~~~
> > - | int
> > -
> > -Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com>
> > -Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19665>
> > ----
> > - src/freedreno/common/freedreno_pm4.h | 4 ++--
> > - 1 file changed, 2 insertions(+), 2 deletions(-)
> > -
> > -diff --git a/src/freedreno/common/freedreno_pm4.h b/src/freedreno/common/freedreno_pm4.h
> > -index 8f958953d693..091247e709a0 100644
> > ---- a/src/freedreno/common/freedreno_pm4.h
> > -+++ b/src/freedreno/common/freedreno_pm4.h
> > -@@ -105,8 +105,8 @@ pm4_pkt7_hdr(uint8_t opcode, uint16_t cnt)
> > - #define cp_type3_opcode(pkt) (((pkt) >> 8) & 0xFF)
> > - #define type3_pkt_size(pkt) ((((pkt) >> 16) & 0x3FFF) + 1)
> > -
> > --static inline uint
> > --pm4_calc_odd_parity_bit(uint val)
> > -+static inline unsigned
> > -+pm4_calc_odd_parity_bit(unsigned val)
> > - {
> > - return (0x9669 >> (0xf & ((val) ^ ((val) >> 4) ^ ((val) >> 8) ^
> > - ((val) >> 12) ^ ((val) >> 16) ^ ((val) >> 20) ^
> > ---
> > -2.39.2
> > -
> > diff --git a/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch b/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
> > deleted file mode 100644
> > index 6541671b7a..0000000000
> > --- a/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
> > +++ /dev/null
> > @@ -1,65 +0,0 @@
> > -From 25946100e21cf2095bea334e8d7096798561d0b7 Mon Sep 17 00:00:00 2001
> > -From: Vincent Davis Jr <vince@underview.tech>
> > -Date: Wed, 28 Dec 2022 16:28:01 -0600
> > -Subject: [PATCH] gbm/backend: fix gbm compile without dri
> > -
> > -Upstream-Status: Backport
> > -
> > -https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20447
> > -https://gitlab.freedesktop.org/mesa/mesa/-/commit/842ca284650f066e58706741a7d22d67b5088e60
> > -
> > -At mesa version 22.2.3 patch wasn't introduced until after.
> > -
> > -Commit introduces a fix that allows for gbm to be built with an empty
> > -backend. There are situation especially in a Yocto/OE cross compilation
> > -environment where you want to build with an empty backend. The particular
> > -situation is as such:
> > -
> > -The mesa-gl recipe is the preferred provider for virtual/libgbm, virtual/libgl,
> > -virtual/mesa, etc... But the x11 DISTRO_FEATURE in't included this leads to build
> > -errors such as:
> > -
> > -| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o: in function `find_backend':
> > -| backend.c:(.text.find_backend+0xa4): undefined reference to `gbm_dri_backend'
> > -| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o:(.data.rel.ro.builtin_backends+0x4):
> > - undefined reference to `gbm_dri_backend'
> > -| collect2: error: ld returned 1 exit status
> > -
> > -Issue should be replicable by setting -Ddri3=disabled and -Dgbm=enabled
> > -
> > -Add fix to bypasses compilation issue by excluding gbm dri backend. If
> > -HAVE_DRI || HAVE_DRIX not specified.
> > -
> > -Acked-by: David Heidelberg <david.heidelberg@collabora.com>
> > -Signed-off-by: Vincent Davis Jr <vince@underview.tech>
> > ----
> > - src/gbm/main/backend.c | 4 ++++
> > - 1 file changed, 4 insertions(+)
> > -
> > -diff --git a/src/gbm/main/backend.c b/src/gbm/main/backend.c
> > -index 974d0a76a4e..feee0703495 100644
> > ---- a/src/gbm/main/backend.c
> > -+++ b/src/gbm/main/backend.c
> > -@@ -42,7 +42,9 @@
> > - #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
> > - #define VER_MIN(a, b) ((a) < (b) ? (a) : (b))
> > -
> > -+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3)
> > - extern const struct gbm_backend gbm_dri_backend;
> > -+#endif
> > -
> > - struct gbm_backend_desc {
> > - const char *name;
> > -@@ -51,7 +53,9 @@ struct gbm_backend_desc {
> > - };
> > -
> > - static const struct gbm_backend_desc builtin_backends[] = {
> > -+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3)
> > - { "dri", &gbm_dri_backend },
> > -+#endif
> > - };
> > -
> > - #define BACKEND_LIB_SUFFIX "_gbm"
> > ---
> > -2.34.1
> > -
> > diff --git a/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch b/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
> > deleted file mode 100644
> > index d22ff3c8a8..0000000000
> > --- a/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
> > +++ /dev/null
> > @@ -1,47 +0,0 @@
> > -From f17e836ef9b1bbc6056790596420b699e48128c2 Mon Sep 17 00:00:00 2001
> > -From: Khem Raj <raj.khem@gmail.com>
> > -Date: Thu, 2 Dec 2021 19:57:42 -0800
> > -Subject: [PATCH] util/format: Check for NEON before using it
> > -
> > -This fixes build on rpi0-w and any other machine which does not have
> > -neon unit and is not used as FPU unit
> > -
> > -Fixes errors e.g.
> > -
> > -In file included from ../mesa-21.3.0/src/util/format/u_format_unpack_neon.c:35:
> > -/mnt/b/yoe/master/build/tmp/work/arm1176jzfshf-vfp-yoe-linux-gnueabi/mesa/2_21.3.0-r0/recipe-sysroot-native/usr/lib/clang/13.0.1/include/arm_neon.h:32:2: error: "NEON support not enabled"
> > -
> > -Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14032]
> > -Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > -
> > ----
> > - src/util/format/u_format.c | 2 +-
> > - src/util/format/u_format_unpack_neon.c | 2 +-
> > - 2 files changed, 2 insertions(+), 2 deletions(-)
> > -
> > -diff --git a/src/util/format/u_format.c b/src/util/format/u_format.c
> > -index c071250..0880984 100644
> > ---- a/src/util/format/u_format.c
> > -+++ b/src/util/format/u_format.c
> > -@@ -1184,7 +1184,7 @@ static void
> > - util_format_unpack_table_init(void)
> > - {
> > - for (enum pipe_format format = PIPE_FORMAT_NONE; format < PIPE_FORMAT_COUNT; format++) {
> > --#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
> > -+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
> > - const struct util_format_unpack_description *unpack = util_format_unpack_description_neon(format);
> > - if (unpack) {
> > - util_format_unpack_table[format] = unpack;
> > -diff --git a/src/util/format/u_format_unpack_neon.c b/src/util/format/u_format_unpack_neon.c
> > -index a4a5cb1..1e4f794 100644
> > ---- a/src/util/format/u_format_unpack_neon.c
> > -+++ b/src/util/format/u_format_unpack_neon.c
> > -@@ -23,7 +23,7 @@
> > -
> > - #include <u_format.h>
> > -
> > --#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
> > -+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
> > -
> > - /* armhf builds default to vfp, not neon, and refuses to compile neon intrinsics
> > - * unless you tell it "no really".
> > diff --git a/meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb b/meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb
> > similarity index 100%
> > rename from meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb
> > rename to meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb
> > diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
> > index 370b54ca6b..09a35ef33e 100644
> > --- a/meta/recipes-graphics/mesa/mesa.inc
> > +++ b/meta/recipes-graphics/mesa/mesa.inc
> > @@ -17,12 +17,9 @@ PE = "2"
> > SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
> > file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
> > file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
> > - file://0001-util-format-Check-for-NEON-before-using-it.patch \
> > - file://0001-gbm-backend-fix-gbm-compile-without-dri.patch \
> > - file://0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch \
> > "
> >
> > -SRC_URI[sha256sum] = "3eed2ecae2bc674494566faab9fcc9beb21cd804c7ba2b59a1694f3d7236e6a9"
> > +SRC_URI[sha256sum] = "01f3cff3763f09e0adabcb8011e4aebc6ad48f6a4dd4bae904fe918707d253e4"
> >
> > UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
> >
> > diff --git a/meta/recipes-graphics/mesa/mesa_22.3.5.bb b/meta/recipes-graphics/mesa/mesa_23.0.0.bb
> > similarity index 100%
> > rename from meta/recipes-graphics/mesa/mesa_22.3.5.bb
> > rename to meta/recipes-graphics/mesa/mesa_23.0.0.bb
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#178398): https://lists.openembedded.org/g/openembedded-core/message/178398
> > Mute This Topic: https://lists.openembedded.org/mt/97560257/3617728
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [zboszor@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH 2/7] bitbake.conf: do not set native opengl distro feature from target
2023-03-12 14:50 ` [PATCH 2/7] bitbake.conf: do not set native opengl distro feature from target Alexander Kanavin
@ 2023-03-13 22:45 ` Khem Raj
2023-03-13 23:10 ` Khem Raj
0 siblings, 1 reply; 15+ messages in thread
From: Khem Raj @ 2023-03-13 22:45 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: openembedded-core, Alexander Kanavin
I am seeing waylandpp failing to build and YP layer compatibility tests failing.
https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2557/steps/11/logs/stdio
On Sun, Mar 12, 2023 at 7:51 AM Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
>
> This makes native opengl (and thus accelerated graphics in qemu) opt-in;
> the reason is that latest mesa tightly couples hardware drivers with its libraries,
> so we have to build both in mesa-native. Doing so significantly lengthens
> the builds, and so cannot be imposed by default.
>
> Add a check and a hint to runqemu so that there is a helpful error when
> there is no native/nativesdk opengl/virgl support.
>
> Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> ---
> meta/conf/bitbake.conf | 4 ++--
> meta/lib/oeqa/selftest/cases/runtime_test.py | 4 ++--
> scripts/runqemu | 11 ++++++++++-
> 3 files changed, 14 insertions(+), 5 deletions(-)
>
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index afd9e2f552..d1dc428583 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -912,8 +912,8 @@ DISTRO_FEATURES_NATIVESDK ?= "x11"
>
> # Normally target distro features will not be applied to native builds:
> # Native distro features on this list will use the target feature value
> -DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod opengl wayland"
> -DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod opengl wayland"
> +DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod wayland"
> +DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod wayland"
>
> DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit gobject-introspection-data ldconfig"
> MACHINE_FEATURES_BACKFILL = "rtc qemu-usermode"
> diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
> index 81b8d056cc..661c09c109 100644
> --- a/meta/lib/oeqa/selftest/cases/runtime_test.py
> +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
> @@ -232,7 +232,7 @@ class TestImage(OESelftestTestCase):
> if 'sdl' not in qemu_packageconfig:
> features += 'PACKAGECONFIG:append:pn-qemu-system-native = " sdl"\n'
> if 'opengl' not in qemu_distrofeatures:
> - features += 'DISTRO_FEATURES:append = " opengl"\n'
> + features += 'DISTRO_FEATURES_NATIVE:append = " opengl"\n'
> features += 'TEST_SUITES = "ping ssh virgl"\n'
> features += 'IMAGE_FEATURES:append = " ssh-server-dropbear"\n'
> features += 'IMAGE_INSTALL:append = " kmscube"\n'
> @@ -264,7 +264,7 @@ class TestImage(OESelftestTestCase):
> qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native')
> features = 'IMAGE_CLASSES += "testimage"\n'
> if 'opengl' not in qemu_distrofeatures:
> - features += 'DISTRO_FEATURES:append = " opengl"\n'
> + features += 'DISTRO_FEATURES_NATIVE:append = " opengl"\n'
> features += 'TEST_SUITES = "ping ssh virgl"\n'
> features += 'IMAGE_FEATURES:append = " ssh-server-dropbear"\n'
> features += 'IMAGE_INSTALL:append = " kmscube"\n'
> diff --git a/scripts/runqemu b/scripts/runqemu
> index 8e915f3d4c..9f82aa12f1 100755
> --- a/scripts/runqemu
> +++ b/scripts/runqemu
> @@ -447,7 +447,16 @@ class BaseConfig(object):
> self.set("MACHINE", arg)
>
> def set_dri_path(self):
> - self.qemu_environ['LIBGL_DRIVERS_PATH'] = os.path.join(self.bindir_native, '../lib/dri')
> + drivers_path = os.path.join(self.bindir_native, '../lib/dri')
> + if not os.path.exists(drivers_path) or not os.listdir(drivers_path):
> + raise RunQemuError("""
> +qemu has been built without opengl support and accelerated graphics support is not available.
> +To enable it, add:
> +DISTRO_FEATURES_NATIVE:append = " opengl"
> +DISTRO_FEATURES_NATIVESDK:append = " opengl"
> +to your build configuration.
> +""")
> + self.qemu_environ['LIBGL_DRIVERS_PATH'] = drivers_path
>
> def check_args(self):
> for debug in ("-d", "--debug"):
> --
> 2.30.2
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#178393): https://lists.openembedded.org/g/openembedded-core/message/178393
> Mute This Topic: https://lists.openembedded.org/mt/97560251/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH 2/7] bitbake.conf: do not set native opengl distro feature from target
2023-03-13 22:45 ` [OE-core] " Khem Raj
@ 2023-03-13 23:10 ` Khem Raj
2023-03-14 8:37 ` Alexander Kanavin
[not found] ` <174C3C4C8B75F870.18998@lists.openembedded.org>
0 siblings, 2 replies; 15+ messages in thread
From: Khem Raj @ 2023-03-13 23:10 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: openembedded-core, Alexander Kanavin
also seeing below errors which are related too
ERROR: Nothing PROVIDES 'gtk4-native' (but
/mnt/b/yoe/master/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-bluetooth/gnome-bluetooth_42.5.bb,
/mnt/b/yoe/master/
sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-text-editor/gnome-text-editor_43.1.bb,
/mnt/b/yoe/master/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-
chess/gnome-chess_43.1.bb,
/mnt/b/yoe/master/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-calculator/gnome-calculator_43.0.1.bb
DEPENDS on or otherwise require
s it)
gtk4-native was skipped: missing required distro feature 'opengl' (not
in DISTRO_FEATURES)
On Mon, Mar 13, 2023 at 3:45 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> I am seeing waylandpp failing to build and YP layer compatibility tests failing.
>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2557/steps/11/logs/stdio
>
> On Sun, Mar 12, 2023 at 7:51 AM Alexander Kanavin
> <alex.kanavin@gmail.com> wrote:
> >
> > This makes native opengl (and thus accelerated graphics in qemu) opt-in;
> > the reason is that latest mesa tightly couples hardware drivers with its libraries,
> > so we have to build both in mesa-native. Doing so significantly lengthens
> > the builds, and so cannot be imposed by default.
> >
> > Add a check and a hint to runqemu so that there is a helpful error when
> > there is no native/nativesdk opengl/virgl support.
> >
> > Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> > ---
> > meta/conf/bitbake.conf | 4 ++--
> > meta/lib/oeqa/selftest/cases/runtime_test.py | 4 ++--
> > scripts/runqemu | 11 ++++++++++-
> > 3 files changed, 14 insertions(+), 5 deletions(-)
> >
> > diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> > index afd9e2f552..d1dc428583 100644
> > --- a/meta/conf/bitbake.conf
> > +++ b/meta/conf/bitbake.conf
> > @@ -912,8 +912,8 @@ DISTRO_FEATURES_NATIVESDK ?= "x11"
> >
> > # Normally target distro features will not be applied to native builds:
> > # Native distro features on this list will use the target feature value
> > -DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod opengl wayland"
> > -DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod opengl wayland"
> > +DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod wayland"
> > +DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod wayland"
> >
> > DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit gobject-introspection-data ldconfig"
> > MACHINE_FEATURES_BACKFILL = "rtc qemu-usermode"
> > diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
> > index 81b8d056cc..661c09c109 100644
> > --- a/meta/lib/oeqa/selftest/cases/runtime_test.py
> > +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
> > @@ -232,7 +232,7 @@ class TestImage(OESelftestTestCase):
> > if 'sdl' not in qemu_packageconfig:
> > features += 'PACKAGECONFIG:append:pn-qemu-system-native = " sdl"\n'
> > if 'opengl' not in qemu_distrofeatures:
> > - features += 'DISTRO_FEATURES:append = " opengl"\n'
> > + features += 'DISTRO_FEATURES_NATIVE:append = " opengl"\n'
> > features += 'TEST_SUITES = "ping ssh virgl"\n'
> > features += 'IMAGE_FEATURES:append = " ssh-server-dropbear"\n'
> > features += 'IMAGE_INSTALL:append = " kmscube"\n'
> > @@ -264,7 +264,7 @@ class TestImage(OESelftestTestCase):
> > qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native')
> > features = 'IMAGE_CLASSES += "testimage"\n'
> > if 'opengl' not in qemu_distrofeatures:
> > - features += 'DISTRO_FEATURES:append = " opengl"\n'
> > + features += 'DISTRO_FEATURES_NATIVE:append = " opengl"\n'
> > features += 'TEST_SUITES = "ping ssh virgl"\n'
> > features += 'IMAGE_FEATURES:append = " ssh-server-dropbear"\n'
> > features += 'IMAGE_INSTALL:append = " kmscube"\n'
> > diff --git a/scripts/runqemu b/scripts/runqemu
> > index 8e915f3d4c..9f82aa12f1 100755
> > --- a/scripts/runqemu
> > +++ b/scripts/runqemu
> > @@ -447,7 +447,16 @@ class BaseConfig(object):
> > self.set("MACHINE", arg)
> >
> > def set_dri_path(self):
> > - self.qemu_environ['LIBGL_DRIVERS_PATH'] = os.path.join(self.bindir_native, '../lib/dri')
> > + drivers_path = os.path.join(self.bindir_native, '../lib/dri')
> > + if not os.path.exists(drivers_path) or not os.listdir(drivers_path):
> > + raise RunQemuError("""
> > +qemu has been built without opengl support and accelerated graphics support is not available.
> > +To enable it, add:
> > +DISTRO_FEATURES_NATIVE:append = " opengl"
> > +DISTRO_FEATURES_NATIVESDK:append = " opengl"
> > +to your build configuration.
> > +""")
> > + self.qemu_environ['LIBGL_DRIVERS_PATH'] = drivers_path
> >
> > def check_args(self):
> > for debug in ("-d", "--debug"):
> > --
> > 2.30.2
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#178393): https://lists.openembedded.org/g/openembedded-core/message/178393
> > Mute This Topic: https://lists.openembedded.org/mt/97560251/1997914
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH 2/7] bitbake.conf: do not set native opengl distro feature from target
2023-03-13 23:10 ` Khem Raj
@ 2023-03-14 8:37 ` Alexander Kanavin
[not found] ` <174C3C4C8B75F870.18998@lists.openembedded.org>
1 sibling, 0 replies; 15+ messages in thread
From: Alexander Kanavin @ 2023-03-14 8:37 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-core, Alexander Kanavin
This means opengl has to be added to DISTRO_FEATURES_NATIVE for this
build. I'll send a patch.
Alex
On Tue, 14 Mar 2023 at 00:10, Khem Raj <raj.khem@gmail.com> wrote:
>
> also seeing below errors which are related too
>
> ERROR: Nothing PROVIDES 'gtk4-native' (but
> /mnt/b/yoe/master/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-bluetooth/gnome-bluetooth_42.5.bb,
> /mnt/b/yoe/master/
> sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-text-editor/gnome-text-editor_43.1.bb,
> /mnt/b/yoe/master/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-
> chess/gnome-chess_43.1.bb,
> /mnt/b/yoe/master/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-calculator/gnome-calculator_43.0.1.bb
> DEPENDS on or otherwise require
> s it)
> gtk4-native was skipped: missing required distro feature 'opengl' (not
> in DISTRO_FEATURES)
>
> On Mon, Mar 13, 2023 at 3:45 PM Khem Raj <raj.khem@gmail.com> wrote:
> >
> > I am seeing waylandpp failing to build and YP layer compatibility tests failing.
> >
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2557/steps/11/logs/stdio
> >
> > On Sun, Mar 12, 2023 at 7:51 AM Alexander Kanavin
> > <alex.kanavin@gmail.com> wrote:
> > >
> > > This makes native opengl (and thus accelerated graphics in qemu) opt-in;
> > > the reason is that latest mesa tightly couples hardware drivers with its libraries,
> > > so we have to build both in mesa-native. Doing so significantly lengthens
> > > the builds, and so cannot be imposed by default.
> > >
> > > Add a check and a hint to runqemu so that there is a helpful error when
> > > there is no native/nativesdk opengl/virgl support.
> > >
> > > Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> > > ---
> > > meta/conf/bitbake.conf | 4 ++--
> > > meta/lib/oeqa/selftest/cases/runtime_test.py | 4 ++--
> > > scripts/runqemu | 11 ++++++++++-
> > > 3 files changed, 14 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> > > index afd9e2f552..d1dc428583 100644
> > > --- a/meta/conf/bitbake.conf
> > > +++ b/meta/conf/bitbake.conf
> > > @@ -912,8 +912,8 @@ DISTRO_FEATURES_NATIVESDK ?= "x11"
> > >
> > > # Normally target distro features will not be applied to native builds:
> > > # Native distro features on this list will use the target feature value
> > > -DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod opengl wayland"
> > > -DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod opengl wayland"
> > > +DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod wayland"
> > > +DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod wayland"
> > >
> > > DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit gobject-introspection-data ldconfig"
> > > MACHINE_FEATURES_BACKFILL = "rtc qemu-usermode"
> > > diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
> > > index 81b8d056cc..661c09c109 100644
> > > --- a/meta/lib/oeqa/selftest/cases/runtime_test.py
> > > +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
> > > @@ -232,7 +232,7 @@ class TestImage(OESelftestTestCase):
> > > if 'sdl' not in qemu_packageconfig:
> > > features += 'PACKAGECONFIG:append:pn-qemu-system-native = " sdl"\n'
> > > if 'opengl' not in qemu_distrofeatures:
> > > - features += 'DISTRO_FEATURES:append = " opengl"\n'
> > > + features += 'DISTRO_FEATURES_NATIVE:append = " opengl"\n'
> > > features += 'TEST_SUITES = "ping ssh virgl"\n'
> > > features += 'IMAGE_FEATURES:append = " ssh-server-dropbear"\n'
> > > features += 'IMAGE_INSTALL:append = " kmscube"\n'
> > > @@ -264,7 +264,7 @@ class TestImage(OESelftestTestCase):
> > > qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native')
> > > features = 'IMAGE_CLASSES += "testimage"\n'
> > > if 'opengl' not in qemu_distrofeatures:
> > > - features += 'DISTRO_FEATURES:append = " opengl"\n'
> > > + features += 'DISTRO_FEATURES_NATIVE:append = " opengl"\n'
> > > features += 'TEST_SUITES = "ping ssh virgl"\n'
> > > features += 'IMAGE_FEATURES:append = " ssh-server-dropbear"\n'
> > > features += 'IMAGE_INSTALL:append = " kmscube"\n'
> > > diff --git a/scripts/runqemu b/scripts/runqemu
> > > index 8e915f3d4c..9f82aa12f1 100755
> > > --- a/scripts/runqemu
> > > +++ b/scripts/runqemu
> > > @@ -447,7 +447,16 @@ class BaseConfig(object):
> > > self.set("MACHINE", arg)
> > >
> > > def set_dri_path(self):
> > > - self.qemu_environ['LIBGL_DRIVERS_PATH'] = os.path.join(self.bindir_native, '../lib/dri')
> > > + drivers_path = os.path.join(self.bindir_native, '../lib/dri')
> > > + if not os.path.exists(drivers_path) or not os.listdir(drivers_path):
> > > + raise RunQemuError("""
> > > +qemu has been built without opengl support and accelerated graphics support is not available.
> > > +To enable it, add:
> > > +DISTRO_FEATURES_NATIVE:append = " opengl"
> > > +DISTRO_FEATURES_NATIVESDK:append = " opengl"
> > > +to your build configuration.
> > > +""")
> > > + self.qemu_environ['LIBGL_DRIVERS_PATH'] = drivers_path
> > >
> > > def check_args(self):
> > > for debug in ("-d", "--debug"):
> > > --
> > > 2.30.2
> > >
> > >
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > > Links: You receive all messages sent to this group.
> > > View/Reply Online (#178393): https://lists.openembedded.org/g/openembedded-core/message/178393
> > > Mute This Topic: https://lists.openembedded.org/mt/97560251/1997914
> > > Group Owner: openembedded-core+owner@lists.openembedded.org
> > > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > >
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH 2/7] bitbake.conf: do not set native opengl distro feature from target
[not found] ` <174C3C4C8B75F870.18998@lists.openembedded.org>
@ 2023-03-14 9:30 ` Alexander Kanavin
2023-03-15 13:38 ` Alexandre Belloni
0 siblings, 1 reply; 15+ messages in thread
From: Alexander Kanavin @ 2023-03-14 9:30 UTC (permalink / raw)
To: alex.kanavin
Cc: Khem Raj, openembedded-core, Alexander Kanavin, Markus Volk,
Richard Purdie
On second thought I'm not sure anymore. The issue comes from items
requiring -native versions of themselves, and REQUIRED_DISTRO_FEATURES
(which skips unbuildable recipes) doesn't cross that boundary. If
opengl is in target features, but not in native features, then it
won't figure out that skipping is required.
Should we just keep opengl in native distro features by default?
Sooner or later there will be an item in core that needs gtk4-native
(and thus mesa-native and llvm-native). Llvm is not *that* heavy, rust
for example is four times heavier.
Alex
On Tue, 14 Mar 2023 at 09:37, Alexander Kanavin via
lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org>
wrote:
>
> This means opengl has to be added to DISTRO_FEATURES_NATIVE for this
> build. I'll send a patch.
>
> Alex
>
> On Tue, 14 Mar 2023 at 00:10, Khem Raj <raj.khem@gmail.com> wrote:
> >
> > also seeing below errors which are related too
> >
> > ERROR: Nothing PROVIDES 'gtk4-native' (but
> > /mnt/b/yoe/master/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-bluetooth/gnome-bluetooth_42.5.bb,
> > /mnt/b/yoe/master/
> > sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-text-editor/gnome-text-editor_43.1.bb,
> > /mnt/b/yoe/master/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-
> > chess/gnome-chess_43.1.bb,
> > /mnt/b/yoe/master/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-calculator/gnome-calculator_43.0.1.bb
> > DEPENDS on or otherwise require
> > s it)
> > gtk4-native was skipped: missing required distro feature 'opengl' (not
> > in DISTRO_FEATURES)
> >
> > On Mon, Mar 13, 2023 at 3:45 PM Khem Raj <raj.khem@gmail.com> wrote:
> > >
> > > I am seeing waylandpp failing to build and YP layer compatibility tests failing.
> > >
> > > https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2557/steps/11/logs/stdio
> > >
> > > On Sun, Mar 12, 2023 at 7:51 AM Alexander Kanavin
> > > <alex.kanavin@gmail.com> wrote:
> > > >
> > > > This makes native opengl (and thus accelerated graphics in qemu) opt-in;
> > > > the reason is that latest mesa tightly couples hardware drivers with its libraries,
> > > > so we have to build both in mesa-native. Doing so significantly lengthens
> > > > the builds, and so cannot be imposed by default.
> > > >
> > > > Add a check and a hint to runqemu so that there is a helpful error when
> > > > there is no native/nativesdk opengl/virgl support.
> > > >
> > > > Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> > > > ---
> > > > meta/conf/bitbake.conf | 4 ++--
> > > > meta/lib/oeqa/selftest/cases/runtime_test.py | 4 ++--
> > > > scripts/runqemu | 11 ++++++++++-
> > > > 3 files changed, 14 insertions(+), 5 deletions(-)
> > > >
> > > > diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> > > > index afd9e2f552..d1dc428583 100644
> > > > --- a/meta/conf/bitbake.conf
> > > > +++ b/meta/conf/bitbake.conf
> > > > @@ -912,8 +912,8 @@ DISTRO_FEATURES_NATIVESDK ?= "x11"
> > > >
> > > > # Normally target distro features will not be applied to native builds:
> > > > # Native distro features on this list will use the target feature value
> > > > -DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod opengl wayland"
> > > > -DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod opengl wayland"
> > > > +DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod wayland"
> > > > +DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod wayland"
> > > >
> > > > DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit gobject-introspection-data ldconfig"
> > > > MACHINE_FEATURES_BACKFILL = "rtc qemu-usermode"
> > > > diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
> > > > index 81b8d056cc..661c09c109 100644
> > > > --- a/meta/lib/oeqa/selftest/cases/runtime_test.py
> > > > +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
> > > > @@ -232,7 +232,7 @@ class TestImage(OESelftestTestCase):
> > > > if 'sdl' not in qemu_packageconfig:
> > > > features += 'PACKAGECONFIG:append:pn-qemu-system-native = " sdl"\n'
> > > > if 'opengl' not in qemu_distrofeatures:
> > > > - features += 'DISTRO_FEATURES:append = " opengl"\n'
> > > > + features += 'DISTRO_FEATURES_NATIVE:append = " opengl"\n'
> > > > features += 'TEST_SUITES = "ping ssh virgl"\n'
> > > > features += 'IMAGE_FEATURES:append = " ssh-server-dropbear"\n'
> > > > features += 'IMAGE_INSTALL:append = " kmscube"\n'
> > > > @@ -264,7 +264,7 @@ class TestImage(OESelftestTestCase):
> > > > qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native')
> > > > features = 'IMAGE_CLASSES += "testimage"\n'
> > > > if 'opengl' not in qemu_distrofeatures:
> > > > - features += 'DISTRO_FEATURES:append = " opengl"\n'
> > > > + features += 'DISTRO_FEATURES_NATIVE:append = " opengl"\n'
> > > > features += 'TEST_SUITES = "ping ssh virgl"\n'
> > > > features += 'IMAGE_FEATURES:append = " ssh-server-dropbear"\n'
> > > > features += 'IMAGE_INSTALL:append = " kmscube"\n'
> > > > diff --git a/scripts/runqemu b/scripts/runqemu
> > > > index 8e915f3d4c..9f82aa12f1 100755
> > > > --- a/scripts/runqemu
> > > > +++ b/scripts/runqemu
> > > > @@ -447,7 +447,16 @@ class BaseConfig(object):
> > > > self.set("MACHINE", arg)
> > > >
> > > > def set_dri_path(self):
> > > > - self.qemu_environ['LIBGL_DRIVERS_PATH'] = os.path.join(self.bindir_native, '../lib/dri')
> > > > + drivers_path = os.path.join(self.bindir_native, '../lib/dri')
> > > > + if not os.path.exists(drivers_path) or not os.listdir(drivers_path):
> > > > + raise RunQemuError("""
> > > > +qemu has been built without opengl support and accelerated graphics support is not available.
> > > > +To enable it, add:
> > > > +DISTRO_FEATURES_NATIVE:append = " opengl"
> > > > +DISTRO_FEATURES_NATIVESDK:append = " opengl"
> > > > +to your build configuration.
> > > > +""")
> > > > + self.qemu_environ['LIBGL_DRIVERS_PATH'] = drivers_path
> > > >
> > > > def check_args(self):
> > > > for debug in ("-d", "--debug"):
> > > > --
> > > > 2.30.2
> > > >
> > > >
> > > >
> > > >
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#178476): https://lists.openembedded.org/g/openembedded-core/message/178476
> Mute This Topic: https://lists.openembedded.org/mt/97560251/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH 2/7] bitbake.conf: do not set native opengl distro feature from target
2023-03-14 9:30 ` Alexander Kanavin
@ 2023-03-15 13:38 ` Alexandre Belloni
2023-03-16 9:42 ` Alexander Kanavin
0 siblings, 1 reply; 15+ messages in thread
From: Alexandre Belloni @ 2023-03-15 13:38 UTC (permalink / raw)
To: Alexander Kanavin
Cc: Khem Raj, openembedded-core, Alexander Kanavin, Markus Volk,
Richard Purdie
Hello,
I did a build without this patch (as requested by Richard) and this fails:
https://autobuilder.yoctoproject.org/typhoon/#builders/127/builds/1108/steps/15/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#builders/80/builds/4881/steps/14/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#builders/87/builds/4962/steps/15/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#builders/86/builds/4925/steps/14/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#builders/79/builds/4933/steps/15/logs/stdio
2023-03-14 22:03:50,363 - oe-selftest - INFO - 5: 28/29 389/524 (117.66s) (0 failed) (sstatetests.SStateHashSameSigs.test_sstate_32_64_same_hash)
2023-03-14 22:03:50,363 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
File "/home/pokybuild/yocto-worker/oe-selftest-centos/build/meta/lib/oeqa/selftest/cases/sstatetests.py", line 384, in test_sstate_32_64_same_hash
self.assertCountEqual(files1, files2)
File "/home/pokybuild/yocto-worker/oe-selftest-centos/build/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.11/unittest/case.py", line 1233, in assertCountEqual
self.fail(msg)
File "/home/pokybuild/yocto-worker/oe-selftest-centos/build/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.11/unittest/case.py", line 703, in fail
raise self.failureException(msg)
AssertionError: Element counts were not equal:
First has 1, Second has 0: '/home/pokybuild/yocto-worker/oe-selftest-centos/build/build-st-3258797/tmp-sstatesamehash/stamps/x86_64-linux/qemu-system-native/7.2.0-r0.do_install.sigdata.d8cf53551eece8c83f2c7af7604df092d24c822c2e81b1f24db8387e2725b79a'
First has 1, Second has 0: '/home/pokybuild/yocto-worker/oe-selftest-centos/build/build-st-3258797/tmp-sstatesamehash/stamps/x86_64-linux/qemu-system-native/7.2.0-r0.do_configure.sigdata.7d1cb6d46ec6af33727e5a149e9e3adc948cfc5b008523c7ac59e9e909087e53'
[...]
On 14/03/2023 10:30:14+0100, Alexander Kanavin wrote:
> On second thought I'm not sure anymore. The issue comes from items
> requiring -native versions of themselves, and REQUIRED_DISTRO_FEATURES
> (which skips unbuildable recipes) doesn't cross that boundary. If
> opengl is in target features, but not in native features, then it
> won't figure out that skipping is required.
>
> Should we just keep opengl in native distro features by default?
> Sooner or later there will be an item in core that needs gtk4-native
> (and thus mesa-native and llvm-native). Llvm is not *that* heavy, rust
> for example is four times heavier.
>
> Alex
>
> On Tue, 14 Mar 2023 at 09:37, Alexander Kanavin via
> lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org>
> wrote:
> >
> > This means opengl has to be added to DISTRO_FEATURES_NATIVE for this
> > build. I'll send a patch.
> >
> > Alex
> >
> > On Tue, 14 Mar 2023 at 00:10, Khem Raj <raj.khem@gmail.com> wrote:
> > >
> > > also seeing below errors which are related too
> > >
> > > ERROR: Nothing PROVIDES 'gtk4-native' (but
> > > /mnt/b/yoe/master/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-bluetooth/gnome-bluetooth_42.5.bb,
> > > /mnt/b/yoe/master/
> > > sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-text-editor/gnome-text-editor_43.1.bb,
> > > /mnt/b/yoe/master/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-
> > > chess/gnome-chess_43.1.bb,
> > > /mnt/b/yoe/master/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-calculator/gnome-calculator_43.0.1.bb
> > > DEPENDS on or otherwise require
> > > s it)
> > > gtk4-native was skipped: missing required distro feature 'opengl' (not
> > > in DISTRO_FEATURES)
> > >
> > > On Mon, Mar 13, 2023 at 3:45 PM Khem Raj <raj.khem@gmail.com> wrote:
> > > >
> > > > I am seeing waylandpp failing to build and YP layer compatibility tests failing.
> > > >
> > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2557/steps/11/logs/stdio
> > > >
> > > > On Sun, Mar 12, 2023 at 7:51 AM Alexander Kanavin
> > > > <alex.kanavin@gmail.com> wrote:
> > > > >
> > > > > This makes native opengl (and thus accelerated graphics in qemu) opt-in;
> > > > > the reason is that latest mesa tightly couples hardware drivers with its libraries,
> > > > > so we have to build both in mesa-native. Doing so significantly lengthens
> > > > > the builds, and so cannot be imposed by default.
> > > > >
> > > > > Add a check and a hint to runqemu so that there is a helpful error when
> > > > > there is no native/nativesdk opengl/virgl support.
> > > > >
> > > > > Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> > > > > ---
> > > > > meta/conf/bitbake.conf | 4 ++--
> > > > > meta/lib/oeqa/selftest/cases/runtime_test.py | 4 ++--
> > > > > scripts/runqemu | 11 ++++++++++-
> > > > > 3 files changed, 14 insertions(+), 5 deletions(-)
> > > > >
> > > > > diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> > > > > index afd9e2f552..d1dc428583 100644
> > > > > --- a/meta/conf/bitbake.conf
> > > > > +++ b/meta/conf/bitbake.conf
> > > > > @@ -912,8 +912,8 @@ DISTRO_FEATURES_NATIVESDK ?= "x11"
> > > > >
> > > > > # Normally target distro features will not be applied to native builds:
> > > > > # Native distro features on this list will use the target feature value
> > > > > -DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod opengl wayland"
> > > > > -DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod opengl wayland"
> > > > > +DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod wayland"
> > > > > +DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod wayland"
> > > > >
> > > > > DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit gobject-introspection-data ldconfig"
> > > > > MACHINE_FEATURES_BACKFILL = "rtc qemu-usermode"
> > > > > diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
> > > > > index 81b8d056cc..661c09c109 100644
> > > > > --- a/meta/lib/oeqa/selftest/cases/runtime_test.py
> > > > > +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
> > > > > @@ -232,7 +232,7 @@ class TestImage(OESelftestTestCase):
> > > > > if 'sdl' not in qemu_packageconfig:
> > > > > features += 'PACKAGECONFIG:append:pn-qemu-system-native = " sdl"\n'
> > > > > if 'opengl' not in qemu_distrofeatures:
> > > > > - features += 'DISTRO_FEATURES:append = " opengl"\n'
> > > > > + features += 'DISTRO_FEATURES_NATIVE:append = " opengl"\n'
> > > > > features += 'TEST_SUITES = "ping ssh virgl"\n'
> > > > > features += 'IMAGE_FEATURES:append = " ssh-server-dropbear"\n'
> > > > > features += 'IMAGE_INSTALL:append = " kmscube"\n'
> > > > > @@ -264,7 +264,7 @@ class TestImage(OESelftestTestCase):
> > > > > qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native')
> > > > > features = 'IMAGE_CLASSES += "testimage"\n'
> > > > > if 'opengl' not in qemu_distrofeatures:
> > > > > - features += 'DISTRO_FEATURES:append = " opengl"\n'
> > > > > + features += 'DISTRO_FEATURES_NATIVE:append = " opengl"\n'
> > > > > features += 'TEST_SUITES = "ping ssh virgl"\n'
> > > > > features += 'IMAGE_FEATURES:append = " ssh-server-dropbear"\n'
> > > > > features += 'IMAGE_INSTALL:append = " kmscube"\n'
> > > > > diff --git a/scripts/runqemu b/scripts/runqemu
> > > > > index 8e915f3d4c..9f82aa12f1 100755
> > > > > --- a/scripts/runqemu
> > > > > +++ b/scripts/runqemu
> > > > > @@ -447,7 +447,16 @@ class BaseConfig(object):
> > > > > self.set("MACHINE", arg)
> > > > >
> > > > > def set_dri_path(self):
> > > > > - self.qemu_environ['LIBGL_DRIVERS_PATH'] = os.path.join(self.bindir_native, '../lib/dri')
> > > > > + drivers_path = os.path.join(self.bindir_native, '../lib/dri')
> > > > > + if not os.path.exists(drivers_path) or not os.listdir(drivers_path):
> > > > > + raise RunQemuError("""
> > > > > +qemu has been built without opengl support and accelerated graphics support is not available.
> > > > > +To enable it, add:
> > > > > +DISTRO_FEATURES_NATIVE:append = " opengl"
> > > > > +DISTRO_FEATURES_NATIVESDK:append = " opengl"
> > > > > +to your build configuration.
> > > > > +""")
> > > > > + self.qemu_environ['LIBGL_DRIVERS_PATH'] = drivers_path
> > > > >
> > > > > def check_args(self):
> > > > > for debug in ("-d", "--debug"):
> > > > > --
> > > > > 2.30.2
> > > > >
> > > > >
> > > > >
> > > > >
> >
> >
> >
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#178478): https://lists.openembedded.org/g/openembedded-core/message/178478
> Mute This Topic: https://lists.openembedded.org/mt/97560251/3617179
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH 2/7] bitbake.conf: do not set native opengl distro feature from target
2023-03-15 13:38 ` Alexandre Belloni
@ 2023-03-16 9:42 ` Alexander Kanavin
0 siblings, 0 replies; 15+ messages in thread
From: Alexander Kanavin @ 2023-03-16 9:42 UTC (permalink / raw)
To: Alexandre Belloni
Cc: Khem Raj, openembedded-core, Alexander Kanavin, Markus Volk,
Richard Purdie
I just sent a revised patchset that drops this patch and addresses the
sstatetests failure below. I did not run it through AB, but I don't
expect breakage.
Alex
On Wed, 15 Mar 2023 at 14:38, Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
>
> Hello,
>
> I did a build without this patch (as requested by Richard) and this fails:
>
> https://autobuilder.yoctoproject.org/typhoon/#builders/127/builds/1108/steps/15/logs/stdio
> https://autobuilder.yoctoproject.org/typhoon/#builders/80/builds/4881/steps/14/logs/stdio
> https://autobuilder.yoctoproject.org/typhoon/#builders/87/builds/4962/steps/15/logs/stdio
> https://autobuilder.yoctoproject.org/typhoon/#builders/86/builds/4925/steps/14/logs/stdio
> https://autobuilder.yoctoproject.org/typhoon/#builders/79/builds/4933/steps/15/logs/stdio
>
> 2023-03-14 22:03:50,363 - oe-selftest - INFO - 5: 28/29 389/524 (117.66s) (0 failed) (sstatetests.SStateHashSameSigs.test_sstate_32_64_same_hash)
> 2023-03-14 22:03:50,363 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
> File "/home/pokybuild/yocto-worker/oe-selftest-centos/build/meta/lib/oeqa/selftest/cases/sstatetests.py", line 384, in test_sstate_32_64_same_hash
> self.assertCountEqual(files1, files2)
> File "/home/pokybuild/yocto-worker/oe-selftest-centos/build/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.11/unittest/case.py", line 1233, in assertCountEqual
> self.fail(msg)
> File "/home/pokybuild/yocto-worker/oe-selftest-centos/build/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.11/unittest/case.py", line 703, in fail
> raise self.failureException(msg)
> AssertionError: Element counts were not equal:
> First has 1, Second has 0: '/home/pokybuild/yocto-worker/oe-selftest-centos/build/build-st-3258797/tmp-sstatesamehash/stamps/x86_64-linux/qemu-system-native/7.2.0-r0.do_install.sigdata.d8cf53551eece8c83f2c7af7604df092d24c822c2e81b1f24db8387e2725b79a'
> First has 1, Second has 0: '/home/pokybuild/yocto-worker/oe-selftest-centos/build/build-st-3258797/tmp-sstatesamehash/stamps/x86_64-linux/qemu-system-native/7.2.0-r0.do_configure.sigdata.7d1cb6d46ec6af33727e5a149e9e3adc948cfc5b008523c7ac59e9e909087e53'
> [...]
>
> On 14/03/2023 10:30:14+0100, Alexander Kanavin wrote:
> > On second thought I'm not sure anymore. The issue comes from items
> > requiring -native versions of themselves, and REQUIRED_DISTRO_FEATURES
> > (which skips unbuildable recipes) doesn't cross that boundary. If
> > opengl is in target features, but not in native features, then it
> > won't figure out that skipping is required.
> >
> > Should we just keep opengl in native distro features by default?
> > Sooner or later there will be an item in core that needs gtk4-native
> > (and thus mesa-native and llvm-native). Llvm is not *that* heavy, rust
> > for example is four times heavier.
> >
> > Alex
> >
> > On Tue, 14 Mar 2023 at 09:37, Alexander Kanavin via
> > lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org>
> > wrote:
> > >
> > > This means opengl has to be added to DISTRO_FEATURES_NATIVE for this
> > > build. I'll send a patch.
> > >
> > > Alex
> > >
> > > On Tue, 14 Mar 2023 at 00:10, Khem Raj <raj.khem@gmail.com> wrote:
> > > >
> > > > also seeing below errors which are related too
> > > >
> > > > ERROR: Nothing PROVIDES 'gtk4-native' (but
> > > > /mnt/b/yoe/master/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-bluetooth/gnome-bluetooth_42.5.bb,
> > > > /mnt/b/yoe/master/
> > > > sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-text-editor/gnome-text-editor_43.1.bb,
> > > > /mnt/b/yoe/master/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-
> > > > chess/gnome-chess_43.1.bb,
> > > > /mnt/b/yoe/master/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-calculator/gnome-calculator_43.0.1.bb
> > > > DEPENDS on or otherwise require
> > > > s it)
> > > > gtk4-native was skipped: missing required distro feature 'opengl' (not
> > > > in DISTRO_FEATURES)
> > > >
> > > > On Mon, Mar 13, 2023 at 3:45 PM Khem Raj <raj.khem@gmail.com> wrote:
> > > > >
> > > > > I am seeing waylandpp failing to build and YP layer compatibility tests failing.
> > > > >
> > > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2557/steps/11/logs/stdio
> > > > >
> > > > > On Sun, Mar 12, 2023 at 7:51 AM Alexander Kanavin
> > > > > <alex.kanavin@gmail.com> wrote:
> > > > > >
> > > > > > This makes native opengl (and thus accelerated graphics in qemu) opt-in;
> > > > > > the reason is that latest mesa tightly couples hardware drivers with its libraries,
> > > > > > so we have to build both in mesa-native. Doing so significantly lengthens
> > > > > > the builds, and so cannot be imposed by default.
> > > > > >
> > > > > > Add a check and a hint to runqemu so that there is a helpful error when
> > > > > > there is no native/nativesdk opengl/virgl support.
> > > > > >
> > > > > > Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> > > > > > ---
> > > > > > meta/conf/bitbake.conf | 4 ++--
> > > > > > meta/lib/oeqa/selftest/cases/runtime_test.py | 4 ++--
> > > > > > scripts/runqemu | 11 ++++++++++-
> > > > > > 3 files changed, 14 insertions(+), 5 deletions(-)
> > > > > >
> > > > > > diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> > > > > > index afd9e2f552..d1dc428583 100644
> > > > > > --- a/meta/conf/bitbake.conf
> > > > > > +++ b/meta/conf/bitbake.conf
> > > > > > @@ -912,8 +912,8 @@ DISTRO_FEATURES_NATIVESDK ?= "x11"
> > > > > >
> > > > > > # Normally target distro features will not be applied to native builds:
> > > > > > # Native distro features on this list will use the target feature value
> > > > > > -DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod opengl wayland"
> > > > > > -DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod opengl wayland"
> > > > > > +DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod wayland"
> > > > > > +DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod wayland"
> > > > > >
> > > > > > DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit gobject-introspection-data ldconfig"
> > > > > > MACHINE_FEATURES_BACKFILL = "rtc qemu-usermode"
> > > > > > diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
> > > > > > index 81b8d056cc..661c09c109 100644
> > > > > > --- a/meta/lib/oeqa/selftest/cases/runtime_test.py
> > > > > > +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
> > > > > > @@ -232,7 +232,7 @@ class TestImage(OESelftestTestCase):
> > > > > > if 'sdl' not in qemu_packageconfig:
> > > > > > features += 'PACKAGECONFIG:append:pn-qemu-system-native = " sdl"\n'
> > > > > > if 'opengl' not in qemu_distrofeatures:
> > > > > > - features += 'DISTRO_FEATURES:append = " opengl"\n'
> > > > > > + features += 'DISTRO_FEATURES_NATIVE:append = " opengl"\n'
> > > > > > features += 'TEST_SUITES = "ping ssh virgl"\n'
> > > > > > features += 'IMAGE_FEATURES:append = " ssh-server-dropbear"\n'
> > > > > > features += 'IMAGE_INSTALL:append = " kmscube"\n'
> > > > > > @@ -264,7 +264,7 @@ class TestImage(OESelftestTestCase):
> > > > > > qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native')
> > > > > > features = 'IMAGE_CLASSES += "testimage"\n'
> > > > > > if 'opengl' not in qemu_distrofeatures:
> > > > > > - features += 'DISTRO_FEATURES:append = " opengl"\n'
> > > > > > + features += 'DISTRO_FEATURES_NATIVE:append = " opengl"\n'
> > > > > > features += 'TEST_SUITES = "ping ssh virgl"\n'
> > > > > > features += 'IMAGE_FEATURES:append = " ssh-server-dropbear"\n'
> > > > > > features += 'IMAGE_INSTALL:append = " kmscube"\n'
> > > > > > diff --git a/scripts/runqemu b/scripts/runqemu
> > > > > > index 8e915f3d4c..9f82aa12f1 100755
> > > > > > --- a/scripts/runqemu
> > > > > > +++ b/scripts/runqemu
> > > > > > @@ -447,7 +447,16 @@ class BaseConfig(object):
> > > > > > self.set("MACHINE", arg)
> > > > > >
> > > > > > def set_dri_path(self):
> > > > > > - self.qemu_environ['LIBGL_DRIVERS_PATH'] = os.path.join(self.bindir_native, '../lib/dri')
> > > > > > + drivers_path = os.path.join(self.bindir_native, '../lib/dri')
> > > > > > + if not os.path.exists(drivers_path) or not os.listdir(drivers_path):
> > > > > > + raise RunQemuError("""
> > > > > > +qemu has been built without opengl support and accelerated graphics support is not available.
> > > > > > +To enable it, add:
> > > > > > +DISTRO_FEATURES_NATIVE:append = " opengl"
> > > > > > +DISTRO_FEATURES_NATIVESDK:append = " opengl"
> > > > > > +to your build configuration.
> > > > > > +""")
> > > > > > + self.qemu_environ['LIBGL_DRIVERS_PATH'] = drivers_path
> > > > > >
> > > > > > def check_args(self):
> > > > > > for debug in ("-d", "--debug"):
> > > > > > --
> > > > > > 2.30.2
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > >
> > >
> > >
>
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#178478): https://lists.openembedded.org/g/openembedded-core/message/178478
> > Mute This Topic: https://lists.openembedded.org/mt/97560251/3617179
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>
>
> --
> Alexandre Belloni, co-owner and COO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2023-03-16 9:42 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-12 14:50 [PATCH 1/7] runqemu: direct mesa to use its own drivers, rather than ones provided by host distro Alexander Kanavin
2023-03-12 14:50 ` [PATCH 2/7] bitbake.conf: do not set native opengl distro feature from target Alexander Kanavin
2023-03-13 22:45 ` [OE-core] " Khem Raj
2023-03-13 23:10 ` Khem Raj
2023-03-14 8:37 ` Alexander Kanavin
[not found] ` <174C3C4C8B75F870.18998@lists.openembedded.org>
2023-03-14 9:30 ` Alexander Kanavin
2023-03-15 13:38 ` Alexandre Belloni
2023-03-16 9:42 ` Alexander Kanavin
2023-03-12 14:50 ` [PATCH 3/7] mesa: allow mesa-native/nativesdk only subject to opengl/vulkan DISTRO_FEATURE Alexander Kanavin
2023-03-12 14:50 ` [PATCH 4/7] mesa: enable a rich set of drivers for native builds Alexander Kanavin
2023-03-12 14:50 ` [PATCH 5/7] llvm: allow building libllvm in native builds, subject to PACKAGECONFIG Alexander Kanavin
2023-03-12 14:50 ` [PATCH 6/7] mesa: do not strip rpaths from dri drivers Alexander Kanavin
2023-03-12 14:50 ` [PATCH 7/7] mesa: update 22.3.5 -> 23.0.0 Alexander Kanavin
2023-03-13 6:15 ` [OE-core] " Böszörményi Zoltán
2023-03-13 7:52 ` Alexander Kanavin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox