mesa: fold mesa-gl variant into the main recipe using mcextend class
PATCH 1/8 mesa: fold mesa-gl variant into the main recipe using mcextend class
This reduces friction in version updates and allows fully automated ones.
There was a concern that using mcextend this way may clash with proper multiconfig setups; I have tweaked the multiconfig selftest to include mesa packages in both multiconfig images, and ran the test with preferred provider set to mesa, and then to mesa-gl - all passed.
--- meta/recipes-graphics/mesa/mesa-gl_21.3.5.bb | 16 - meta/recipes-graphics/mesa/mesa.inc | 316 ----------------- meta/recipes-graphics/mesa/mesa_21.3.5.bb | 337 ++++++++++++++++++- 3 files changed, 336 insertions(+), 333 deletions(-) delete mode 100644 meta/recipes-graphics/mesa/mesa-gl_21.3.5.bb delete mode 100644 meta/recipes-graphics/mesa/mesa.inc
meta/recipes-graphics/mesa/mesa-gl_21.3.5.bb deleted +0 -16
@@ -1,16 +0,0 @@ -require mesa.inc - -SUMMARY += " (OpenGL only, no EGL/GLES)" - -PROVIDES = "virtual/libgl virtual/mesa" - -S = "${WORKDIR}/mesa-${PV}" - -# At least one DRI rendering engine is required to build mesa. -# When no X11 is available, use osmesa for the rendering engine. -PACKAGECONFIG ??= "opengl dri ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa gallium', d)}" -PACKAGECONFIG:class-target = "opengl dri ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa gallium', d)}" - -# 21.0.0 version fails to build when any driver is enabled in DRIDRIVERS -# ./mesa-21.0.0/meson.build:519:4: ERROR: Problem encountered: building dri drivers require at least one windowing system -DRIDRIVERS ?= ""
meta/recipes-graphics/mesa/mesa.inc deleted +0 -316
316 lines not on this page · raw message
meta/recipes-graphics/mesa/mesa_21.3.5.bb +336 -1
341 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH 2/8 gdb: update 11.1 -> 11.2
Simplyfy .inc structure: merge gdb.inc into gdb_11.2.bb, rename gdb-${PV}.inc to gdb.inc. This will allow easier automatic updates.
Drop upstreamed patch.
---
meta/recipes-devtools/gdb/gdb-11.1.inc | 19 --
...ian_11.1.bb => gdb-cross-canadian_11.2.bb} | 2 +-
.../{gdb-cross_11.1.bb => gdb-cross_11.2.bb} | 2 +-
meta/recipes-devtools/gdb/gdb.inc | 27 +-
...erver-register-set-selection-dynamic.patch | 317 ------------------
.../gdb/{gdb_11.1.bb => gdb_11.2.bb} | 13 +-
6 files changed, 31 insertions(+), 349 deletions(-)
delete mode 100644 meta/recipes-devtools/gdb/gdb-11.1.inc
rename meta/recipes-devtools/gdb/{gdb-cross-canadian_11.1.bb => gdb-cross-canadian_11.2.bb} (71%)
rename meta/recipes-devtools/gdb/{gdb-cross_11.1.bb => gdb-cross_11.2.bb} (50%)
delete mode 100644 meta/recipes-devtools/gdb/gdb/0011-AArch64-Make-gdbserver-register-set-selection-dynamic.patch
rename meta/recipes-devtools/gdb/{gdb_11.1.bb => gdb_11.2.bb} (80%)meta/recipes-devtools/gdb/gdb-11.1.inc deleted +0 -19
@@ -1,19 +0,0 @@ -LICENSE = "GPLv2 & GPLv3 & LGPLv2 & LGPLv3" -LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ - file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ - file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ - file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674" - -SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.xz \ - file://0001-make-man-install-relative-to-DESTDIR.patch \ - file://0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \ - file://0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \ - file://0005-Dont-disable-libreadline.a-when-using-disable-static.patch \ - file://0006-use-asm-sgidefs.h.patch \ - file://0007-Change-order-of-CFLAGS.patch \ - file://0008-resolve-restrict-keyword-conflict.patch \ - file://0009-Fix-invalid-sigprocmask-call.patch \ - file://0010-gdbserver-ctrl-c-handling.patch \ - file://0011-AArch64-Make-gdbserver-register-set-selection-dynamic.patch \ - " -SRC_URI[sha256sum] = "cccfcc407b20d343fb320d4a9a2110776dd3165118ffd41f4b1b162340333f94"
meta/recipes-devtools/gdb/gdb-cross-canadian_11.2.bb renamed from meta/recipes-devtools/gdb/gdb-cross-canadian_11.1.bb +1 -1
@@ -1,3 +1,3 @@ require gdb-common.inc require gdb-cross-canadian.inc -require gdb-${PV}.inc +require gdb.inc
meta/recipes-devtools/gdb/gdb-cross_11.2.bb renamed from meta/recipes-devtools/gdb/gdb-cross_11.1.bb +1 -1
@@ -1,2 +1,2 @@ require gdb-cross.inc -require gdb-${PV}.inc +require gdb.inc
meta/recipes-devtools/gdb/gdb.inc +17 -10
@@ -1,11 +1,18 @@ -require gdb-common.inc - -inherit gettext pkgconfig - -#LDFLAGS:append = " -s" -#export CFLAGS:append=" -L${STAGING_LIBDIR}" - -# cross-canadian must not see this -PACKAGES =+ "gdbserver" -FILES:gdbserver = "${bindir}/gdbserver" +LICENSE = "GPLv2 & GPLv3 & LGPLv2 & LGPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ + file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ + file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674" +SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.xz \ + file://0001-make-man-install-relative-to-DESTDIR.patch \ + file://0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \ + file://0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \ + file://0005-Dont-disable-libreadline.a-when-using-disable-static.patch \ + file://0006-use-asm-sgidefs.h.patch \ + file://0007-Change-order-of-CFLAGS.patch \ + file://0008-resolve-restrict-keyword-conflict.patch \ + file://0009-Fix-invalid-sigprocmask-call.patch \ + file://0010-gdbserver-ctrl-c-handling.patch \ + " +SRC_URI[sha256sum] = "1497c36a71881b8671a9a84a0ee40faab788ca30d7ba19d8463c3cc787152e32"
meta/recipes-devtools/gdb/gdb/0011-AArch64-Make-gdbserver-register-set-selection-dynamic.patch deleted +0 -317
317 lines not on this page · raw message
meta/recipes-devtools/gdb/gdb_11.2.bb renamed from meta/recipes-devtools/gdb/gdb_11.1.bb +12 -1
@@ -1,5 +1,15 @@ +require gdb-common.inc + +inherit gettext pkgconfig + +#LDFLAGS:append = " -s" +#export CFLAGS:append=" -L${STAGING_LIBDIR}" + +# cross-canadian must not see this +PACKAGES =+ "gdbserver" +FILES:gdbserver = "${bindir}/gdbserver" + require gdb.inc -require gdb-${PV}.inc inherit python3-dir
@@ -26,3 +36,4 @@ EOF chmod +x ${WORKDIR}/python fi } +
Signature · 1 line
2.20.1
PATCH 3/8 insane.bbclass: use multiprocessing for collecting 'objdump -p' output
In reply to Alexander KanavinThis was prompted by ltp's unreasonably long package_qa times; it has a massive amount of executables and insane runs objdump for all of them, serially.
This reduces the time from 4 minutes to 1m20s on my machine.
--- meta/classes/insane.bbclass | 22 ++++++++++++++++++++-- meta/lib/oe/qa.py | 6 ++++++ 2 files changed, 26 insertions(+), 2 deletions(-)
meta/classes/insane.bbclass +20 -2
@@ -684,6 +684,10 @@ def package_qa_recipe(warnfuncs, errorfuncs, pn, d): return len(errors) == 0 +def prepopulate_objdump_p(elf, d): + output = elf.run_objdump("-p", d) + return (elf.name, output) + # Walk over all files in a directory and call func def package_qa_walk(warnfuncs, errorfuncs, package, d): #if this will throw an exception, then fix the dict above
@@ -692,18 +696,32 @@ def package_qa_walk(warnfuncs, errorfuncs, package, d): warnings = {} errors = {} + elves = {} for path in pkgfiles[package]: elf = None if os.path.isfile(path): elf = oe.qa.ELFFile(path) try: elf.open() + elf.close() except oe.qa.NotELFFileError: elf = None + if elf: + elves[path] = elf + + results = oe.utils.multiprocess_launch(prepopulate_objdump_p, elves.values(), d, extraargs=(d,)) + for item in results: + elves[item[0]].set_objdump("-p", item[1]) + + for path in pkgfiles[package]: + if path in elves: + elves[path].open() for func in warnfuncs: - func(path, package, d, elf, warnings) + func(path, package, d, elves.get(path), warnings) for func in errorfuncs: - func(path, package, d, elf, errors) + func(path, package, d, elves.get(path), errors) + if path in elves: + elves[path].close() for w in warnings: oe.qa.handle_error(w, warnings[w], d)
meta/lib/oe/qa.py +6 -0
@@ -48,6 +48,9 @@ class ELFFile: return self def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): if self.data: self.data.close()
@@ -128,6 +131,9 @@ class ELFFile: """ return self.getShort(ELFFile.E_MACHINE) + def set_objdump(self, cmd, output): + self.objdump_output[cmd] = output + def run_objdump(self, cmd, d): import bb.process import sys
Signature · 1 line
2.20.1
PATCH 4/8 llvm: update 12.0.1 -> 13.0.1
In reply to Alexander Kanavin--- meta/conf/distro/include/tcmode-default.inc | 2 +- meta/recipes-devtools/llvm/llvm_git.bb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
meta/conf/distro/include/tcmode-default.inc +1 -1
@@ -26,7 +26,7 @@ QEMUVERSION ?= "6.2%" GOVERSION ?= "1.17%" # This can not use wildcards like 8.0.% since it is also used in mesa to denote # llvm version being used, so always bump it with llvm recipe version bump -LLVMVERSION ?= "12.0.1" +LLVMVERSION ?= "13.0.1" RUSTVERSION ?= "1.58%" PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
meta/recipes-devtools/llvm/llvm_git.bb +2 -2
@@ -19,7 +19,7 @@ inherit cmake pkgconfig PROVIDES += "llvm${PV}" -PV = "12.0.1" +PV = "13.0.1" MAJOR_VERSION = "${@oe.utils.trim_version("${PV}", 1)}"
@@ -27,7 +27,7 @@ LLVM_RELEASE = "${PV}" LLVM_DIR = "llvm${LLVM_RELEASE}" BRANCH = "release/${MAJOR_VERSION}.x" -SRCREV = "fed41342a82f5a3a9201819a82bf7a48313e296b" +SRCREV = "75e33f71c2dae584b13a7d1186ae0a038ba98838" SRC_URI = "git://github.com/llvm/llvm-project.git;branch=${BRANCH};protocol=https \ file://0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch;striplevel=2 \ file://0007-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \
Signature · 1 line
2.20.1
PATCH 5/8 python3-numpy: update 1.22.1 -> 1.22.2
In reply to Alexander KanavinReplace an ad hoc fix via patch with an upstream one.
---
...y-core-setup.py-disable-svml-for-now.patch | 29 -------------------
...umpy_1.22.1.bb => python3-numpy_1.22.2.bb} | 7 +++--
2 files changed, 5 insertions(+), 31 deletions(-)
delete mode 100644 meta/recipes-devtools/python/python3-numpy/0001-numpy-core-setup.py-disable-svml-for-now.patch
rename meta/recipes-devtools/python/{python3-numpy_1.22.1.bb => python3-numpy_1.22.2.bb} (93%)meta/recipes-devtools/python/python3-numpy/0001-numpy-core-setup.py-disable-svml-for-now.patch deleted +0 -29
@@ -1,29 +0,0 @@ -From 0f0601e79f9ce7614d157284523e6cd8af2259d5 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -Date: Wed, 5 Jan 2022 12:12:47 +0100 -Subject: [PATCH] numpy/core/setup.py: disable svml for now - -The check really doesn't work in cross compiling, -as it is using host python to see what arch we're -building on. Issue reported upstream: -https://github.com/numpy/numpy/issues/20736 - -Upstream-Status: Inappropriate [needs upstream fix] -Signed-off-by: Alexander Kanavin <[email protected]> ---- - numpy/core/setup.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/numpy/core/setup.py b/numpy/core/setup.py -index a5f423d..945f2dd 100644 ---- a/numpy/core/setup.py -+++ b/numpy/core/setup.py -@@ -70,7 +70,7 @@ def can_link_svml(): - """ - machine = platform.machine() - system = platform.system() -- return "x86_64" in machine and system == "Linux" -+ return False - - def check_svml_submodule(svmlpath): - if not os.path.exists(svmlpath + "/README.md"):
meta/recipes-devtools/python/python3-numpy_1.22.2.bb renamed from meta/recipes-devtools/python/python3-numpy_1.22.1.bb +5 -2
@@ -11,9 +11,8 @@ SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${S file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \ file://0001-numpy-core-Define-RISCV-32-support.patch \ file://run-ptest \ - file://0001-numpy-core-setup.py-disable-svml-for-now.patch \ " -SRC_URI[sha256sum] = "dd1968402ae20dfd59b34acd799b494be340c774f6295e9bf1c2b9842a5e416d" +SRC_URI[sha256sum] = "093d513a460fd94f94c16193c3ef29b2d69a33e482071e3d6d6e561a700587a6" UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases" UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
@@ -26,6 +25,10 @@ S = "${WORKDIR}/numpy-${PV}" CLEANBROKEN = "1" +do_compile:prepend() { + export NPY_DISABLE_SVML=1 +} + FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a ${PYTHON_SITEPACKAGES_DIR}/numpy/random/lib/*.a" # install what is needed for numpy.test()
Signature · 1 line
2.20.1
PATCH 6/8 runqemu: preload uninative libraries when host gl drivers are in use
In reply to Alexander KanavinSome of the host distributions build the drivers in a way (RPATH/RUNPATH) that tricks uninative loader into loading pieces of the host libc, if the same pieces haven't been previously loaded by native binaries. Mixing the two libc versions leads to failures.
This change ensures that the correct (uninative) versions are always in use.
--- meta/classes/qemuboot.bbclass | 2 +- scripts/runqemu | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-)
meta/classes/qemuboot.bbclass +1 -1
@@ -109,7 +109,7 @@ def qemuboot_vars(d): build_vars = ['MACHINE', 'TUNE_ARCH', 'DEPLOY_DIR_IMAGE', 'KERNEL_IMAGETYPE', 'IMAGE_NAME', 'IMAGE_LINK_NAME', 'STAGING_DIR_NATIVE', 'STAGING_BINDIR_NATIVE', - 'STAGING_DIR_HOST', 'SERIAL_CONSOLES'] + 'STAGING_DIR_HOST', 'SERIAL_CONSOLES', 'UNINATIVE_LOADER'] return build_vars + [k for k in d.keys() if k.startswith('QB_')] do_write_qemuboot_conf[vardeps] += "${@' '.join(qemuboot_vars(d))}"
scripts/runqemu +8 -0
@@ -461,6 +461,14 @@ class BaseConfig(object): 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.") os.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] + os.environ['LD_PRELOAD'] = " ".join(preload_paths) + def check_args(self): for debug in ("-d", "--debug"): if debug in sys.argv:
Signature · 1 line
2.20.1
PATCH 7/8 qemu: replace a gtk wrapper with directly setting environment from runqemu
In reply to Alexander KanavinThe wrapper is executed by host bash, and host bash refuses to run when pseudo libc is preloaded via LD_PRELOAD (which is the case when gl is enabled).
Only the fontconfig setting is carried over as local testing showed that only that is necessary for the gui to look ok nowadays; adjust further if necessary.
--- meta/recipes-devtools/qemu/qemu-native.inc | 4 ---- meta/recipes-devtools/qemu/qemu.inc | 11 ----------- meta/recipes-devtools/qemu/qemu_6.2.0.bb | 4 ---- scripts/runqemu | 1 + 4 files changed, 1 insertion(+), 19 deletions(-)
meta/recipes-devtools/qemu/qemu-native.inc +0 -4
@@ -5,7 +5,3 @@ inherit native EXTRA_OEMAKE:append = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'" LDFLAGS:append = " -fuse-ld=bfd" - -do_install:append() { - ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} -}
meta/recipes-devtools/qemu/qemu.inc +0 -11
@@ -138,17 +138,6 @@ do_install:append() { } # END of qemu-mips workaround -make_qemu_wrapper() { - gdk_pixbuf_module_file=`pkg-config --variable=gdk_pixbuf_cache_file gdk-pixbuf-2.0` - - for tool in `ls ${D}${bindir}/qemu-system-*`; do - create_wrapper $tool \ - GDK_PIXBUF_MODULE_FILE=$gdk_pixbuf_module_file \ - FONTCONFIG_PATH=/etc/fonts \ - GTK_THEME=Adwaita - done -} - # Disable kvm/virgl/mesa on targets that do not support it PACKAGECONFIG:remove:darwin = "kvm virglrenderer glx gtk+" PACKAGECONFIG:remove:mingw32 = "kvm virglrenderer glx gtk+"
meta/recipes-devtools/qemu/qemu_6.2.0.bb +0 -4
@@ -12,10 +12,6 @@ EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" -do_install:append:class-nativesdk() { - ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} -} - PACKAGECONFIG ??= " \ fdt sdl kvm pie \ ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
scripts/runqemu +1 -0
@@ -1377,6 +1377,7 @@ class BaseConfig(object): if self.sdl == True: self.qemu_opt += 'sdl,' elif self.gtk == True: + os.environ['FONTCONFIG_PATH'] = '/etc/fonts' self.qemu_opt += 'gtk,' if self.gl == True:
Signature · 1 line
2.20.1
PATCH 8/8 sstate: additional debugging when fetch fails occur
In reply to Alexander KanavinAutobuilder has been showing things like:
Checking sstate mirror object availability...ERROR: SState: cannot test file://universal/d9/bc/sstate:xz-native:x86_64-linux:5.2.5:r0:x86_64:8:d9bced04b194d5fc8d778eb8a0d674fa7375a42c8c50a9237e6d7672e9e7a00c_deploy_source_date_epoch.tar.zst: TimeoutError('timed out')
ERROR: SState: cannot test file://37/a0/sstate:libgcc-initial:core2-64-poky-linux:11.2.0:r0:core2-64:8:37a0a5aec105a0822df098f15ff2b67d0e7220204742b5d2b1f7958dda6fa5ce_deploy_source_date_epoch.tar.zst: TimeoutError('timed out')
ERROR: SState: cannot test file://universal/11/a4/sstate:libpciaccess-native:x86_64-linux:0.16:r0:x86_64:8:11a4d6c3a2e147ef7dd5f31c0ff2a91271dad49b561d8aa24849115081cf1842_deploy_source_date_epoch.tar.zst: TimeoutError('timed out') done.
which is not helpful. To find out what really happened and where, the original traceback is needed too.
--- meta/classes/sstate.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/sstate.bbclass +2 -2
@@ -1000,9 +1000,9 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, found.add(tid) missed.remove(tid) except bb.fetch2.FetchError as e: - bb.debug(2, "SState: Unsuccessful fetch test for %s (%s)" % (srcuri, repr(e))) + bb.debug(2, "SState: Unsuccessful fetch test for %s (%s)\n%s" % (srcuri, repr(e), e.__traceback__)) except Exception as e: - bb.error("SState: cannot test %s: %s" % (srcuri, repr(e))) + bb.error("SState: cannot test %s: %s\n%s" % (srcuri, repr(e), e.__traceback__)) if progress: bb.event.fire(bb.event.ProcessProgress(msg, len(tasklist) - thread_worker.tasks.qsize()), d)
Signature · 1 line
2.20.1