mesa: upgrade to 25.0.2
v4 cover mesa: upgrade to 25.0.2
libclc is required in order to build Intel drivers in Mesa 24.1 and later. Thus OE-Core is currently locked to the 24.0.x branch, which is no longer maintained, having last release in June 2024.
A clean solution is to package Clang, then use it to build libclc and SPIRV-LLVM-Translator (required for Mesa OpenCL support). However creating proper recipes for Clang is a long process (ongoing by Khem Raj).
This patchset attempts to solve the issue in a simpler way: by building libclc and SPIRV-LLVM-Translator together with the LLVM. This way we don't have to create target Clang recipes, there is no extra toolchain to support, etc. Clang binaries are creted as a part of the build process (in order to support building target packages), however it only hits the LLVM sysroot-native and is only used by the LLVM target build.
Future work by Khem (once Clang is properly supported in OE-Core) should allow us to create proper recipes for libclc and spirv-llvm-translator and drop them from the llvm / clang recipe.
I think this approach provides a good balance between OE-Core being stuck with the outdated Mesa release and being able to upgrade it, bringing support for new hardware.
Last two patches of the series bring in RustiCL support, a new OpenCL implementation within Mesa. They are optional for the sake of the upgrade and can be dropped if there is any issue with those. RustiCL support is mostly compile-tested at this point.
---
Changes in v4:
- Fixed QA issues reported against lib32-mesa-megadriver (Richard)
- Removed release notes link from the mesa's commit message (Alexander)
- Added link to the rust.bindgen() issue to RustiCL-related cross-compilation patch (Alexander)
- Renamed 'spirv' PACKAGECONFIG option to 'spirv-llvm-translator' in
order to be more precise
- Link to v3: https://lore.kernel.org/r/[email protected]
Changes in v3:
- Dropped llvm/fix-native-compilation.patch and llvm/0001-cmake-modules-CrossCompile-pass-SPIR-V-headers-path-.patch
in favour of installing prepare_builtins into the sysroot, dropped
corresponding EXTRA_OECMAKE params
- Dropepd -DCLANG_TABLEGEN from llvm's EXTRA_OECMAKE
- Enabled llvm-config wrapper for nativesdk too, fixing QA errors for nativesdk-mesa
- Added --libdir handling to llvm-config, dropping the need for mesa/0001-meson-use-target-path-for-Clang-libdir.patch
- Dropped extra LIBCEXTENSION from BINDGEN_TARGET, it is already a part
of TARGET_OS
- Expanded commit messages to explain the patches
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- Dropped YOCTO_ALTERNATE_LIBDIR patch
- Reworked mesa / LLVM integration to always use get_option('libdir')
- Reenabled AMD Vulkan driver (got disabled because of c&p error)
- Moved mesa-clc options to the libclc PACKAGECONFIG to fix several
build errors
- Link to v1: https://lore.kernel.org/r/[email protected]/
---
Dmitry Baryshkov (8):
llvm: move libLLVM.so.N.M to llvm-libllvm package
llvm: use OECMAKE_SOURCEPATH to specify cmake dir
llvm: handle libdir in llvm-config
llvm: also use llvm-config wrapper for nativesdk recipes
llvm: support building libclc
llvm: add SPIRV-LLVM-Translator support
mesa: upgrade 24.0.7 -> 25.0.2
bindgen-cli: a tool to generate Rust bindings
Zoltán Böszörményi (1):
mesa: add support for RustiCL under PACKAGECONFIG "opencl"
meta/conf/distro/include/maintainers.inc | 1 + .../bindgen-cli/bindgen-cli-crates.inc | 186 +++++++++++++++++++++ .../bindgen-cli/bindgen-cli_0.71.1.bb | 19 +++ meta/recipes-devtools/llvm/llvm/llvm-config | 3 + .../llvm/llvm/spirv-internal-build.patch | 30 ++++ meta/recipes-devtools/llvm/llvm_20.1.0.bb | 77 ++++++++- ...evert-meson-do-not-pull-in-clc-for-clover.patch | 53 ------ ...d-Include-missing-llvm-IR-header-Module.h.patch | 41 ----- .../files/0001-drisw-fix-build-without-dri3.patch | 58 ------- ...eno-don-t-encode-build-path-into-binaries.patch | 46 ++++- ...vide-cross-compilation-arguments-to-LLVM-.patch | 67 ++++++++ ...ext-don-t-try-zink-if-not-enabled-in-mesa.patch | 42 ----- meta/recipes-graphics/mesa/mesa.inc | 101 ++++++----- 13 files changed, 470 insertions(+), 254 deletions(-)
---
base-commit: dc2ef2cc1183a14cd3a05d388a1d0485a1bc8d20
change-id: 20250328-mesa-25-6b78a0ce2c90
Best regards,
Signature · 1 line
Dmitry Baryshkov <[email protected]>
PATCH v4 1/9 llvm: move libLLVM.so.N.M to llvm-libllvm package
Neither MAJOR_VER nor MINOR_VER are defined, so libLLVM.so.N.M ends up in the main libllvm package rather than the llvm-libllvm package, as expected. Fix this by properly using two-component version.
--- meta/recipes-devtools/llvm/llvm_20.1.0.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-devtools/llvm/llvm_20.1.0.bb +2 -1
@@ -19,6 +19,7 @@ VER_SUFFIX = "" PV .= "${VER_SUFFIX}" MAJOR_VERSION = "${@oe.utils.trim_version("${PV}", 1)}" +MAJ_MIN_VERSION = "${@oe.utils.trim_version("${PV}", 2)}" LLVM_RELEASE = "${PV}"
@@ -152,7 +153,7 @@ FILES:${PN}-bugpointpasses = "\ FILES:${PN}-libllvm = "\ ${libdir}/libLLVM-${MAJOR_VERSION}.so \ - ${libdir}/libLLVM.so.${MAJOR_VER}.${MINOR_VER} \ + ${libdir}/libLLVM.so.${MAJ_MIN_VERSION} \ " FILES:${PN}-liblto += "\
Signature · 1 line
2.39.5
PATCH v4 2/9 llvm: use OECMAKE_SOURCEPATH to specify cmake dir
In reply to Dmitry BaryshkovInstead of pushing an llvm sourcedir into S, specify it through the OECMAKE_SOURCEPATH so that all the patches are applied to the topdir and debug paths also use top path to map.
--- meta/recipes-devtools/llvm/llvm_20.1.0.bb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
meta/recipes-devtools/llvm/llvm_20.1.0.bb +5 -3
@@ -24,15 +24,17 @@ MAJ_MIN_VERSION = "${@oe.utils.trim_version("${PV}", 2)}" LLVM_RELEASE = "${PV}" SRC_URI = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${PV}/llvm-project-${PV}.src.tar.xz \ - file://0007-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \ - file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2 \ + file://0007-llvm-allow-env-override-of-exe-path.patch \ + file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch \ file://llvm-config \ " SRC_URI[sha256sum] = "4579051e3c255fb4bb795d54324f5a7f3ef79bd9181e44293d7ee9a7f62aad9a" UPSTREAM_CHECK_URI = "https://github.com/llvm/llvm-project" UPSTREAM_CHECK_REGEX = "llvmorg-(?P<pver>\d+(\.\d+)+)" -S = "${WORKDIR}/llvm-project-${PV}.src/llvm" +S = "${WORKDIR}/llvm-project-${PV}.src" + +OECMAKE_SOURCEPATH = "${S}/llvm" LLVM_INSTALL_DIR = "${WORKDIR}/llvm-install"
Signature · 1 line
2.39.5
PATCH v4 3/9 llvm: handle libdir in llvm-config
In reply to Dmitry BaryshkovThe llvm-config wrapper also needs to override a --libdir switch, otherwise software (like mesa) end up using TMPDIR-based directory for Clang resource lookup (and also encoding TMPDIR into the target binary).
--- meta/recipes-devtools/llvm/llvm/llvm-config | 3 +++ 1 file changed, 3 insertions(+)
meta/recipes-devtools/llvm/llvm/llvm-config +3 -0
@@ -35,6 +35,9 @@ for arg in "$@"; do --libs) output="${output} -lLLVM" ;; + --libdir) + output="${output} ${libdir}" + ;; --link-shared) break ;;
Signature · 1 line
2.39.5
PATCH v4 4/9 llvm: also use llvm-config wrapper for nativesdk recipes
In reply to Dmitry BaryshkovThe recipes targeting the SDK (e.g. nativesdk-mesa) should also use the llvm-config wrapper, otherwise they get get a lot of incorrect flags, the most offensive being the rpath, as it results in TMPDIR being a part of the resulting binary.
--- meta/recipes-devtools/llvm/llvm_20.1.0.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-devtools/llvm/llvm_20.1.0.bb +1 -0
@@ -138,6 +138,7 @@ do_install:append:class-native() { } SYSROOT_PREPROCESS_FUNCS:append:class-target = " llvm_sysroot_preprocess" +SYSROOT_PREPROCESS_FUNCS:append:class-nativesdk = " llvm_sysroot_preprocess" llvm_sysroot_preprocess() { install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
Signature · 1 line
2.39.5
PATCH v4 5/9 llvm: support building libclc
In reply to Dmitry BaryshkovCurrent Mesa requires libclc in order to build Intel Gallium (iris) or Vulkan drivers. In order to unblock Mesa updates, build libclc as a part of the LLVM build process.
The libclc requires Clang for building, so enable Clang too via LLVM_PROJECTS. Remove clang from the DESTDIR, so that it is only used during the build process. Proper handling of Clang as a toolchain is a separate and much more complicated topic. Clang is enabled for all kinds of builds as it is a requirement for libclc to build.
Cleaning of ${datadir} has been moved to happen at the end of do_install to be performed after do clang removal and made not to fail if ${datadir} is not empty, as libclc install files into that location.
NVPTX and SPIRV targets are enabled since they are required for the libclc to link.
LLVM_NATIVE_TOOL_DIR is used to pass a path to the native tools built via llvm-native instead of building them during the target and/or nativesdk build.
The llvm-clc package is set to RPROVIDE libclc (and the recipe also PROVIDEs libclc) in order to be compatible with the meta-clang packages (and to be future-compatible with the split package after proper Clang support is introduced to OE-Core).
--- meta/recipes-devtools/llvm/llvm_20.1.0.bb | 40 +++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-)
meta/recipes-devtools/llvm/llvm_20.1.0.bb +36 -4
@@ -56,19 +56,22 @@ def get_llvm_arch(bb, d, arch_var): def get_llvm_host_arch(bb, d): return get_llvm_arch(bb, d, 'HOST_ARCH') -PACKAGECONFIG ??= "libllvm" +PACKAGECONFIG ??= "libllvm libclc" # 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] = "" +PACKAGECONFIG[libclc] = "" # # Default to build all OE-Core supported target arches (user overridable). # -LLVM_TARGETS ?= "AMDGPU;${@get_llvm_host_arch(bb, d)}" +LLVM_TARGETS ?= "AMDGPU;NVPTX;SPIRV;${@get_llvm_host_arch(bb, d)}" ARM_INSTRUCTION_SET:armv5 = "arm" ARM_INSTRUCTION_SET:armv4t = "arm" +LLVM_PROJECTS = "${@bb.utils.contains('PACKAGECONFIG', 'libclc', 'clang;libclc', '', d)}" + EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \ -DLLVM_ENABLE_EXPENSIVE_CHECKS=OFF \ -DLLVM_ENABLE_PIC=ON \
@@ -82,6 +85,7 @@ EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \ -DLLVM_VERSION_SUFFIX='${VER_SUFFIX}' \ -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \ -DCMAKE_BUILD_TYPE=Release \ + -DLLVM_ENABLE_PROJECTS='${LLVM_PROJECTS}' \ " EXTRA_OECMAKE:append:class-target = "\
@@ -89,6 +93,7 @@ EXTRA_OECMAKE:append:class-target = "\ -DLLVM_HOST_TRIPLE=${TARGET_SYS} \ -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen${PV} \ -DLLVM_CONFIG_PATH=${STAGING_BINDIR_NATIVE}/llvm-config${PV} \ + -DLLVM_NATIVE_TOOL_DIR=${STAGING_BINDIR_NATIVE} \ " EXTRA_OECMAKE:append:class-nativesdk = "\
@@ -96,6 +101,7 @@ EXTRA_OECMAKE:append:class-nativesdk = "\ -DLLVM_HOST_TRIPLE=${SDK_SYS} \ -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen${PV} \ -DLLVM_CONFIG_PATH=${STAGING_BINDIR_NATIVE}/llvm-config${PV} \ + -DLLVM_NATIVE_TOOL_DIR=${STAGING_BINDIR_NATIVE} \ " # patch out build host paths for reproducibility
@@ -124,17 +130,39 @@ do_install() { # Remove opt-viewer: https://llvm.org/docs/Remarks.html rm -rf ${D}${datadir}/opt-viewer - rmdir ${D}${datadir} # reproducibility sed -i -e 's,${WORKDIR},,g' ${D}/${libdir}/cmake/llvm/LLVMConfig.cmake fi + + # Remove clang bits from target packages, we are not providing it for the system + if ${@bb.utils.contains('PACKAGECONFIG', 'libclc', 'true', 'false', d)} && + [ "${CLASSOVERRIDE}" != "class-native" ] ; then + rm -f ${D}${bindir}/clang* + rm -fr ${D}${libdir}/clang + rm -fr ${D}${datadir}/clang + + rm -f ${D}${bindir}/scan* + rm -fr ${D}${libdir}/libscanbuild + rm -fr ${D}${datadir}/scan-build + rm -fr ${D}${datadir}/scan-view + + rm -fr ${D}${libdir}/libear + fi + + # Try to clean up datadir if it is empty, but don't fail if there are + # libclc files there + rmdir ${D}${datadir} || true } 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 + + if ${@bb.utils.contains('PACKAGECONFIG', 'libclc', 'true', 'false', d)} ; then + install -D -m 0755 ${B}/bin/prepare_builtins ${D}${bindir}/prepare_builtins + fi } SYSROOT_PREPROCESS_FUNCS:append:class-target = " llvm_sysroot_preprocess"
@@ -146,9 +174,11 @@ llvm_sysroot_preprocess() { ln -sf llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/llvm-config${PV} } -PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm ${PN}-liboptremarks ${PN}-liblto" +PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm ${PN}-liboptremarks ${PN}-liblto ${PN}-clc" +PROVIDES = "${@bb.utils.filter('PACKAGECONFIG', 'libclc', d)}" RRECOMMENDS:${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liboptremarks" +RPROVIDES:${PN}-clc += "libclc" FILES:${PN}-bugpointpasses = "\ ${libdir}/BugpointPasses.so \
@@ -181,6 +211,8 @@ FILES:${PN}-staticdev += "\ ${libdir}/*.a \ " +FILES:${PN}-clc += "${datadir}/clc" + INSANE_SKIP:${PN}-libllvm += "dev-so" BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.39.5
PATCH v4 6/9 llvm: add SPIRV-LLVM-Translator support
In reply to Dmitry BaryshkovMesa builds require SPIRV-LLVM-Translator in order to build CLC support. While it is possible to build it separately (like meta-clang does), it also requires a separate clang compiler (which OE-Core doesn't provide).
Use an alternative path and build SPIRV-LLVM-Translator as a part of the LLVM build process, lifting the requirement for the separate clang. Once Clang is properly integrated into the OE-Core layer, this can be split to a separate package and dropped. In order to ease migration from meta-clang and to ease future split, PROVIDE the spirv-llvm-translator and make the llvm-spirv package RPROVIDE spirv-llvm-translator.
--- .../llvm/llvm/spirv-internal-build.patch | 30 +++++++++++++++++++ meta/recipes-devtools/llvm/llvm_20.1.0.bb | 35 ++++++++++++++++++---- 2 files changed, 60 insertions(+), 5 deletions(-)
meta/recipes-devtools/llvm/llvm/spirv-internal-build.patch new file +30 -0
@@ -0,0 +1,30 @@ +From e94e529aefb28b65165e978daa2bfd89867ee8d0 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov <[email protected]> +Date: Fri, 21 Mar 2025 17:17:52 +0200 +Subject: [PATCH] SPIRV-LLVM-Translator: fix handling of built-in SPIRV targer + +If the SPIRV-LLVM-Translator is being built together with the LLVM, set +the defines declaring whether SPIRV target is also included into the +LLVM library or not. Otherwise llvm-spirv execution fails because +spirv-ext option is registered twice. + +Upstream-Status: Pending [will be submitted upstream after internal clearance] +Signed-off-by: Dmitry Baryshkov <[email protected]> + +Index: llvm-project-20.1.0.src/llvm/projects/SPIRV-LLVM-Translator/CMakeLists.txt +=================================================================== +--- llvm-project-20.1.0.src.orig/llvm/projects/SPIRV-LLVM-Translator/CMakeLists.txt ++++ llvm-project-20.1.0.src/llvm/projects/SPIRV-LLVM-Translator/CMakeLists.txt +@@ -116,6 +116,12 @@ if(LLVM_SPIRV_BUILD_EXTERNAL) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) + set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) + endif() ++else() ++ is_llvm_target_library("SPIRV" spirv_present_result INCLUDED_TARGETS) ++ if(spirv_present_result) ++ set(SPIRV_BACKEND_FOUND TRUE) ++ add_compile_definitions(LLVM_SPIRV_BACKEND_TARGET_PRESENT) ++ endif() + endif() + + set(LLVM_SPIRV_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include)
meta/recipes-devtools/llvm/llvm_20.1.0.bb +30 -5
@@ -23,9 +23,19 @@ MAJ_MIN_VERSION = "${@oe.utils.trim_version("${PV}", 2)}" LLVM_RELEASE = "${PV}" +SRCREV_spirv = "68edc9d3d10ff6ec6353803a1bc60a5c25e7b715" +# pattern: llvm_branch_200, currently there are no minor releases, so, no llvm_branch_201 +SPIRV_BRANCH = "llvm_release_${@oe.utils.trim_version('${PV}', 1).replace('.', '')}0" + +SRC_URI_SPIRV = " \ + git://github.com/KhronosGroup/SPIRV-LLVM-Translator;protocol=https;name=spirv;branch=${SPIRV_BRANCH};destsuffix=llvm-project-${PV}.src/llvm/projects/SPIRV-LLVM-Translator \ + file://spirv-internal-build.patch \ +" + SRC_URI = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${PV}/llvm-project-${PV}.src.tar.xz \ file://0007-llvm-allow-env-override-of-exe-path.patch \ file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch \ + ${@bb.utils.contains('PACKAGECONFIG', 'spirv-llvm-translator', '${SRC_URI_SPIRV}', '', d)} \ file://llvm-config \ " SRC_URI[sha256sum] = "4579051e3c255fb4bb795d54324f5a7f3ef79bd9181e44293d7ee9a7f62aad9a"
@@ -56,11 +66,12 @@ def get_llvm_arch(bb, d, arch_var): def get_llvm_host_arch(bb, d): return get_llvm_arch(bb, d, 'HOST_ARCH') -PACKAGECONFIG ??= "libllvm libclc" +PACKAGECONFIG ??= "libllvm libclc spirv-llvm-translator" # 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] = "" PACKAGECONFIG[libclc] = "" +PACKAGECONFIG[spirv-llvm-translator] = "-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=${STAGING_INCDIR}/.. ,,spirv-tools-native spirv-headers" # # Default to build all OE-Core supported target arches (user overridable).
@@ -70,7 +81,9 @@ LLVM_TARGETS ?= "AMDGPU;NVPTX;SPIRV;${@get_llvm_host_arch(bb, d)}" ARM_INSTRUCTION_SET:armv5 = "arm" ARM_INSTRUCTION_SET:armv4t = "arm" -LLVM_PROJECTS = "${@bb.utils.contains('PACKAGECONFIG', 'libclc', 'clang;libclc', '', d)}" +LLVM_PROJECTS_CLANG = "${@bb.utils.contains_any('PACKAGECONFIG', 'libclc spirv-llvm-translator', 'clang', '', d)}" +LLVM_PROJECTS_CLC = "${@bb.utils.contains('PACKAGECONFIG', 'libclc', ';libclc', '', d)}" +LLVM_PROJECTS = "${LLVM_PROJECTS_CLANG}${LLVM_PROJECTS_CLC}" EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \ -DLLVM_ENABLE_EXPENSIVE_CHECKS=OFF \
@@ -136,7 +149,7 @@ do_install() { fi # Remove clang bits from target packages, we are not providing it for the system - if ${@bb.utils.contains('PACKAGECONFIG', 'libclc', 'true', 'false', d)} && + if ${@bb.utils.contains_any('PACKAGECONFIG', 'libclc spirv-llvm-translator', 'true', 'false', d)} && [ "${CLASSOVERRIDE}" != "class-native" ] ; then rm -f ${D}${bindir}/clang* rm -fr ${D}${libdir}/clang
@@ -174,11 +187,12 @@ llvm_sysroot_preprocess() { ln -sf llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/llvm-config${PV} } -PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm ${PN}-liboptremarks ${PN}-liblto ${PN}-clc" -PROVIDES = "${@bb.utils.filter('PACKAGECONFIG', 'libclc', d)}" +PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm ${PN}-liboptremarks ${PN}-liblto ${PN}-clc ${PN}-spirv" +PROVIDES = "${@bb.utils.filter('PACKAGECONFIG', 'libclc spirv-llvm-translator', d)}" RRECOMMENDS:${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liboptremarks" RPROVIDES:${PN}-clc += "libclc" +RPROVIDES:${PN}-spirv += "spirv-llvm-translator" FILES:${PN}-bugpointpasses = "\ ${libdir}/BugpointPasses.so \
@@ -213,6 +227,17 @@ FILES:${PN}-staticdev += "\ FILES:${PN}-clc += "${datadir}/clc" +FILES:${PN}-spirv = " \ + ${bindir}/llvm-spirv \ + ${includedir}/LLVMSPIRVLib \ + ${libdir}/pkgconfig/LLVMSPIRVLib.pc \ + ${libdir}/libLLVMSPIRV* \ +" + INSANE_SKIP:${PN}-libllvm += "dev-so" +# SPIRV-LLVM-Translator provides only static libraries, they are included into +# the llvm-spirv package. +INSANE_SKIP:${PN}-spirv += "staticdev" + BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.39.5
PATCH v4 7/9 mesa: upgrade 24.0.7 -> 25.0.2
In reply to Dmitry BaryshkovUpgrade the Mesa package, dropping applied and refreshing outstanding patches. The dri3 config option is now gone, dependencies are merged into X11 deps. The swrast gallium driver has been split into softpipe and llvmpipe drivers. Reworked OpenCL support to use mesa_clc compiler.
License-Update: license text cleared and clarified.
--- ...evert-meson-do-not-pull-in-clc-for-clover.patch | 53 -------------- ...d-Include-missing-llvm-IR-header-Module.h.patch | 41 ----------- .../files/0001-drisw-fix-build-without-dri3.patch | 58 --------------- ...eno-don-t-encode-build-path-into-binaries.patch | 46 ++++++++++-- ...ext-don-t-try-zink-if-not-enabled-in-mesa.patch | 42 ----------- meta/recipes-graphics/mesa/mesa.inc | 83 +++++++++++----------- 6 files changed, 81 insertions(+), 242 deletions(-)
meta/recipes-graphics/mesa/files/0001-Revert-meson-do-not-pull-in-clc-for-clover.patch deleted +0 -53
@@ -1,53 +0,0 @@ -From 051f41beda540f0ae77b341db01a6de83c9e938a Mon Sep 17 00:00:00 2001 -From: Markus Volk <[email protected]> -Date: Fri, 8 Mar 2024 15:53:11 +0100 -Subject: [PATCH] Revert "meson: do not pull in clc for clover" - -This reverts commit 815a6647eb1383e9dc704ffcc266d85f3b13338a. -Upstream-Status: Inappropriate [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27783/diffs?commit_id=a976f2c9f0c07f9e06cc9affd9124b45bc60c2bd] - -Once the merge request above was added, it will only be possible to provide opencl spir-v with gallium-rusticl=true. This is not yet supported in the mesa recipe. -For now reverting this commit allows to still use clover with opencl-spirv, which would otherwise be broken starting from mesa 24.0.2. - -After it was merged, this patch needs to be removed and rusticl support will be required - -Signed-off-by: Markus Volk <[email protected]> ---- - meson.build | 3 ++- - src/compiler/meson.build | 2 +- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/meson.build b/meson.build -index 2db6185..741b5d1 100644 ---- a/meson.build -+++ b/meson.build -@@ -813,6 +813,7 @@ if _opencl != 'disabled' - error('The Clover OpenCL state tracker requires rtti') - endif - -+ with_clc = true - with_gallium_opencl = true - with_opencl_icd = _opencl == 'icd' - else -@@ -837,7 +838,7 @@ if with_gallium_rusticl - endif - - dep_clc = null_dep --if with_gallium_opencl or with_clc -+if with_clc - dep_clc = dependency('libclc') - endif - -diff --git a/src/compiler/meson.build b/src/compiler/meson.build -index 8d73544..1dae56d 100644 ---- a/src/compiler/meson.build -+++ b/src/compiler/meson.build -@@ -79,7 +79,7 @@ subdir('nir') - - subdir('spirv') - --if with_clc -+if with_opencl_spirv - subdir('clc') - endif - if with_gallium
meta/recipes-graphics/mesa/files/0001-amd-Include-missing-llvm-IR-header-Module.h.patch deleted +0 -41
41 lines not on this page · raw message
meta/recipes-graphics/mesa/files/0001-drisw-fix-build-without-dri3.patch deleted +0 -58
58 lines not on this page · raw message
meta/recipes-graphics/mesa/files/0001-freedreno-don-t-encode-build-path-into-binaries.patch +39 -7
65 lines not on this page · raw message
meta/recipes-graphics/mesa/files/0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch deleted +0 -42
42 lines not on this page · raw message
meta/recipes-graphics/mesa/mesa.inc +42 -41
192 lines not on this page · raw message
Signature · 1 line
2.39.5
PATCH v4 8/9 bindgen-cli: a tool to generate Rust bindings
In reply to Dmitry BaryshkovImport bindgen-cli from the meta-clang layer, as it is required to generate bindings for Mesa / RustiCL. Specify Khem as maintainer as he is maintaining the meta-clang layer, which included this recipe too.
--- meta/conf/distro/include/maintainers.inc | 1 + .../bindgen-cli/bindgen-cli-crates.inc | 186 +++++++++++++++++++++ .../bindgen-cli/bindgen-cli_0.71.1.bb | 19 +++ 3 files changed, 206 insertions(+)
meta/conf/distro/include/maintainers.inc +1 -0
@@ -64,6 +64,7 @@ RECIPE_MAINTAINER:pn-bash = "Hongxu Jia <[email protected]>" RECIPE_MAINTAINER:pn-bash-completion = "Unassigned <[email protected]>" RECIPE_MAINTAINER:pn-bc = "Anuj Mittal <[email protected]>" RECIPE_MAINTAINER:pn-bind = "Unassigned <[email protected]>" +RECIPE_MAINTAINER:pn-bindgen-cli = "Khem Raj <[email protected]>" RECIPE_MAINTAINER:pn-binutils = "Khem Raj <[email protected]>" RECIPE_MAINTAINER:pn-binutils-cross-${TARGET_ARCH} = "Khem Raj <[email protected]>" RECIPE_MAINTAINER:pn-binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Khem Raj <[email protected]>"
meta/recipes-devtools/bindgen-cli/bindgen-cli-crates.inc new file +186 -0
187 lines not on this page · raw message
meta/recipes-devtools/bindgen-cli/bindgen-cli_0.71.1.bb new file +19 -0
@@ -0,0 +1,19 @@ +SUMMARY = "Automatically generates Rust FFI bindings to C and C++ libraries." +HOMEPAGE = "https://rust-lang.github.io/rust-bindgen/" +LICENSE = "BSD-3-Clause" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=0b9a98cb3dcdefcceb145324693fda9b" + +inherit rust cargo cargo-update-recipe-crates + +SRC_URI += "git://github.com/rust-lang/rust-bindgen.git;protocol=https;branch=main" +SRCREV = "af7fd38d5e80514406fb6a8bba2d407d252c30b9" +S = "${WORKDIR}/git" + +require ${BPN}-crates.inc + +do_install:append:class-native() { + create_wrapper ${D}/${bindir}/bindgen LIBCLANG_PATH="${STAGING_LIBDIR_NATIVE}" +} + +BBCLASSEXTEND = "native"
Signature · 1 line
2.39.5
PATCH v4 9/9 mesa: add support for RustiCL under PACKAGECONFIG "opencl"
In reply to Dmitry BaryshkovFrom: Zoltán Böszörményi <[email protected]>
Mesa now has two OpenCL implementations: Clover (older one) and RustiCL (newer one). Extend the "opencl" package config to include both implementations into the libopencl-mesa (-dev) packages. As the Clover implementation is in maintenance mode and is expected to be removed at Mesa 25.2, it doesn't make sense to split the packages or to provide two config options.
--- ...vide-cross-compilation-arguments-to-LLVM-.patch | 67 ++++++++++++++++++++++ meta/recipes-graphics/mesa/mesa.inc | 20 +++++-- 2 files changed, 82 insertions(+), 5 deletions(-)
meta/recipes-graphics/mesa/files/0001-rusticl-provide-cross-compilation-arguments-to-LLVM-.patch new file +67 -0
@@ -0,0 +1,67 @@ +From b9cf34f39ca7e7546508ce2ab1f053edef5fc201 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov <[email protected]> +Date: Wed, 26 Mar 2025 17:47:09 +0200 +Subject: [PATCH] rusticl: provide cross-compilation arguments to LLVM bindgen + invocation + +Correctly generating LLVM bindings requires several croos-compilation +arguments. Provide them to rust.bindgen(). Karol Herbst on IRC suggested +that a proper fix should be to fix meson's rust.bindgen() to support +cross-compilation. Carry this patch until meson is fixed. + +Upstream-Status: Inappropriate [OE-Specific] +Link: https://github.com/mesonbuild/meson/issues/13591 +Signed-off-by: Dmitry Baryshkov <[email protected]> +--- + meson_options.txt | 14 ++++++++++++++ + src/gallium/frontends/rusticl/meson.build | 8 ++++++++ + 2 files changed, 22 insertions(+) + +diff --git a/meson_options.txt b/meson_options.txt +index 0147cafcb146..f73e83fded18 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -796,3 +796,17 @@ option( + value : false, + description : 'Install the drivers internal shader compilers (if needed for cross builds).' + ) ++ ++option( ++ 'bindgen-includedir', ++ type : 'string', ++ value : '', ++ description : 'system-wide include directory for cross-generating LLVM bindings' ++ ) ++ ++option( ++ 'bindgen-target', ++ type : 'string', ++ value : '', ++ description : 'Clang target for cross-generating LLVM bindings' ++ ) +diff --git a/src/gallium/frontends/rusticl/meson.build b/src/gallium/frontends/rusticl/meson.build +index a5d1dcf3abb9..480c220b7f5f 100644 +--- a/src/gallium/frontends/rusticl/meson.build ++++ b/src/gallium/frontends/rusticl/meson.build +@@ -180,13 +180,21 @@ rusticl_opencl_gen = static_library( + ], + ) + ++bindgen_c_args = [] ++bindgen_target = get_option('bindgen-target') ++if bindgen_target != '' ++ bindgen_c_args += [ '-target', bindgen_target ] ++endif ++ + rusticl_llvm_bindings_rs = rust.bindgen( + input : 'rusticl_llvm_bindings.hpp', + output : 'rusticl_llvm_bindings.rs', + c_args : [ + rusticl_bindgen_c_args, + pre_args, ++ bindgen_c_args, + ], ++ include_directories : get_option('bindgen-includedir'), + dependencies : [ + dep_clang, + dep_llvm,
meta/recipes-graphics/mesa/mesa.inc +15 -5
@@ -17,6 +17,7 @@ PE = "2" SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \ file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ file://0001-freedreno-don-t-encode-build-path-into-binaries.patch\ + file://0001-rusticl-provide-cross-compilation-arguments-to-LLVM-.patch \ " SRC_URI[sha256sum] = "adf904d083b308df95898600ffed435f4b5c600d95fb6ec6d4c45638627fdc97"
@@ -45,7 +46,7 @@ PROVIDES = " \ virtual/mesa \ " -inherit meson pkgconfig python3native gettext features_check +inherit meson pkgconfig python3native gettext features_check rust BBCLASSEXTEND = "native nativesdk"
@@ -84,6 +85,9 @@ PACKAGECONFIG = " \ ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 'zink', '', d)} \ " +# skip all Rust dependencies if we are not building OpenCL" +INHIBIT_DEFAULT_RUST_DEPS = "${@bb.utils.contains('PACKAGECONFIG', 'opencl', '', '1', d)}" + PACKAGECONFIG:append:x86 = " libclc gallium-llvm" PACKAGECONFIG:append:x86-64 = " libclc gallium-llvm" PACKAGECONFIG:append:class-native = " libclc gallium-llvm r600"
@@ -139,9 +143,15 @@ PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2 # "egl" requires "opengl" PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled" +BINDGEN_TARGET = "${TARGET_ARCH}-${TARGET_OS}${@['-gnu', ''][d.getVar('LIBCEXTENSION') != '']}" + # "opencl" also requires libclc and gallium-llvm to be present in PKGCONFIG! # Be sure to enable them both for the target and for the native build. -PACKAGECONFIG[opencl] = "-Dgallium-opencl=icd,-Dgallium-opencl=disabled," +PACKAGECONFIG[opencl] = " \ + -Dgallium-opencl=icd -Dgallium-rusticl=true -Dbindgen-includedir=${STAGING_INCDIR} -Dbindgen-target=${BINDGEN_TARGET},\ + -Dgallium-opencl=disabled -Dgallium-rusticl=false, \ + bindgen-cli-native \ +" PACKAGECONFIG[broadcom] = "" PACKAGECONFIG[etnaviv] = ",,python3-pycparser-native"
@@ -241,7 +251,7 @@ RDEPENDS:libgles3-mesa-dev += "libgles2-mesa-dev" RDEPENDS:libgles2-mesa += "libgles3-mesa" ALLOW_EMPTY:libgles3-mesa = "1" -RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools', '', d)}" +RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools spirv-llvm-translator', '', d)}" PACKAGES =+ "libegl-mesa libegl-mesa-dev \ libosmesa libosmesa-dev \
@@ -347,7 +357,7 @@ FILES:libgles1-mesa = "${libdir}/libGLESv1*.so.*" FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*" FILES:libgl-mesa = "${libdir}/libGL.so.*" FILES:libglx-mesa = "${libdir}/libGLX*.so.*" -FILES:libopencl-mesa = "${libdir}/libMesaOpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd" +FILES:libopencl-mesa = "${libdir}/lib*OpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/*.icd" FILES:libglapi = "${libdir}/libglapi.so.*" FILES:libosmesa = "${libdir}/libOSMesa.so.*" FILES:libxatracker = "${libdir}/libxatracker.so.*"
@@ -361,7 +371,7 @@ FILES:libglapi-dev = "${libdir}/libglapi.*" FILES:libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc" FILES:libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc" FILES:libgles3-mesa-dev = "${includedir}/GLES3" -FILES:libopencl-mesa-dev = "${libdir}/libMesaOpenCL.so" +FILES:libopencl-mesa-dev = "${libdir}/lib*OpenCL.so" FILES:libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc" FILES:libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \ ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \
Signature · 1 line
2.39.5
Quoted 24 lines · Dmitry Baryshkov via lists.openembedded.org
libclc is required in order to build Intel drivers in Mesa 24.1 and later. Thus OE-Core is currently locked to the 24.0.x branch, which is no longer maintained, having last release in June 2024.
A clean solution is to package Clang, then use it to build libclc and SPIRV-LLVM-Translator (required for Mesa OpenCL support). However creating proper recipes for Clang is a long process (ongoing by Khem Raj).
This patchset attempts to solve the issue in a simpler way: by building libclc and SPIRV-LLVM-Translator together with the LLVM. This way we don't have to create target Clang recipes, there is no extra toolchain to support, etc. Clang binaries are creted as a part of the build process (in order to support building target packages), however it only hits the LLVM sysroot-native and is only used by the LLVM target build.
Future work by Khem (once Clang is properly supported in OE-Core) should allow us to create proper recipes for libclc and spirv-llvm-translator and drop them from the llvm / clang recipe.
I think this approach provides a good balance between OE-Core being stuck with the outdated Mesa release and being able to upgrade it, bringing support for new hardware.
Quoted 7 lines
Last two patches of the series bring in RustiCL support, a new OpenCL implementation within Mesa. They are optional for the sake of the upgrade and can be dropped if there is any issue with those. RustiCL support is mostly compile-tested at this point.
Signed-off-by Dmitry Baryshkov <[email protected]>---
Hi Dmitry,
Thanks for the new version.
It looks like we still have issues on the autobuilder, now during oe-selftests. I truncated a bit the logs below.
ERROR: mesa-native-2_25.0.2-r0 do_compile: Execution of '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/temp/run.do_compile.506477' failed with exit code 1
...
| FAILED: src/intel/shaders/intel_gfx80_shaders.spv | /srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/build/src/compiler/clc/mesa_clc ../mesa-25.0.2/src/intel/shaders/libintel_shaders.h ../mesa-25.0.2/src/intel/shaders/generate.cl ../mesa-25.0.2/src/intel/shaders/generate_draws.cl ../mesa-25.0.2/src/intel/shaders/generate_draws_iris.cl ../mesa-25.0.2/src/intel/shaders/query_copy.cl ../mesa-25.0.2/src/intel/shaders/util.cl -o src/intel/shaders/intel_gfx80_shaders.spv -- -DNDEBUG=1 -DGFX_VERx10=80 -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/intel/shaders/. -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/compiler/libcl -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/intel -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/build/src/intel -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/intel/genxml | /bin/sh: 1: /srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/build/src/compiler/clc/mesa_clc: not found
But also a lot of issues with sstate tests:
2025-03-31 19:31:36,349 - oe-selftest - INFO - 6: 46/49 214/622 (88.62s) (0 failed) (sstatetests.SStateHashSameSigs.test_sstate_32_64_same_hash)
2025-03-31 19:31:36,349 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/meta/lib/oeqa/selftest/cases/sstatetests.py", line 418, in test_sstate_32_64_same_hash
self.sstate_hashtest("i686")
File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/meta/lib/oeqa/selftest/cases/sstatetests.py", line 409, in sstate_hashtest
self.assertCountEqual(files1, files2)
File "/usr/lib/python3.11/unittest/case.py", line 1233, in assertCountEqual
self.fail(msg)
File "/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: '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53795/tmp-sstatesamehash/stamps/core2-32-poky-linux/mesa/25.0.2.do_install.sigdata.f1121eb56f1f6b8335722e32d0e21eb777e95ab4af83b777971f3666d1265bed'
First has 1, Second has 0: '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53795/tmp-sstatesamehash/stamps/core2-32-poky-linux/mesa/25.0.2.do_create_spdx.sigdata.4c53505a0e3a5bba214d854ae8eea7c551f794d6b85392564d7c3923180e5d7f'
First has 1, Second has 0: '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53795/tmp-sstatesamehash/stamps/core2-32-poky-linux/mesa/25.0.2.do_create_package_spdx.sigdata.cefe11ad38c3c40968e4757314ad08b91f9584c9845cbcf08cc8635e1216912e'
First has 1, Second has 0: '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53795/tmp-sstatesamehash/stamps/core2-32-poky-linux/mesa/25.0.2.do_populate_sysroot.sigdata.2e3e3b9c17855a8a865dd9e99c002016e697024fc93cdfed690b7d54bb05e34e'
First has 1, Second has 0: '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53795/tmp-sstatesamehash/stamps/core2-32-poky-linux/mesa/25.0.2.do_prepare_recipe_sysroot.sigdata.73d0df5170ce762727a517856505f3505b2c47f479affdddb242ddcad34d5e29'...
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/1264
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/1350
https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/1214
Can you have a look a these please?
Signature · 3 lines
Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 8 lines · Mathieu Dubois-Briand via lists.openembedded.org
It looks like we still have issues on the autobuilder, now during oe-selftests. I truncated a bit the logs below.
ERROR: mesa-native-2_25.0.2-r0
do_compile: Execution of '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/temp/run.do_compile.506477' failed with exit code 1
...| FAILED: src/intel/shaders/intel_gfx80_shaders.spv | /srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/build/src/compiler/clc/mesa_clc ../mesa-25.0.2/src/intel/shaders/libintel_shaders.h ../mesa-25.0.2/src/intel/shaders/generate.cl ../mesa-25.0.2/src/intel/shaders/generate_draws.cl ../mesa-25.0.2/src/intel/shaders/generate_draws_iris.cl ../mesa-25.0.2/src/intel/shaders/query_copy.cl ../mesa-25.0.2/src/intel/shaders/util.cl -o src/intel/shaders/intel_gfx80_shaders.spv -- -DNDEBUG=1 -DGFX_VERx10=80 -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/intel/shaders/. -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/compiler/libcl -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/intel -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/build/src/intel -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/intel/genxml | /bin/sh: 1: /srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/build/src/compiler/clc/mesa_clc: not found
The particular failing selftests are:
2025-03-31 21:57:27,426 - oe-selftest - INFO - RESULTS - runtime_test.TestImage.test_testimage_virgl_headless: FAILED (348.30s) 2025-03-31 21:57:27,426 - oe-selftest - INFO - RESULTS - sstatetests.SStateHashSameSigs.test_sstate_32_64_same_hash: FAILED (88.63s) 2025-03-31 21:57:27,426 - oe-selftest - INFO - RESULTS -
sstatetests.SStateHashSameSigs.test_sstate_sdk_arch_same_hash: FAILED (102.40s)
On Fedora mesa-native seems to build ok in the virgl_headless test, but then there's a different error:
runqemu - ERROR - Failed to run qemu: MESA-LOADER: failed to open dri:/srv/pokybuild/yocto-worker/genericx86/build/build/tmp/work/x86_64-linux/mesa-native/25.0.2/recipe-sysroot-native/usr/lib/gbm/dri_gbm.so:
cannot open shared object file: No such file or directory (search
paths /srv/pokybuild/yocto-worker/genericx86/build/build/tmp/work/x86_64-linux/mesa-native/25.0.2/recipe-sysroot-native/usr/lib/gbm, suffix _gbm)
Alex
Quoted 64 lines · Mathieu Dubois-Briand
Quoted 24 lines · Dmitry Baryshkov via lists.openembedded.org
libclc is required in order to build Intel drivers in Mesa 24.1 and later. Thus OE-Core is currently locked to the 24.0.x branch, which is no longer maintained, having last release in June 2024.
A clean solution is to package Clang, then use it to build libclc and SPIRV-LLVM-Translator (required for Mesa OpenCL support). However creating proper recipes for Clang is a long process (ongoing by Khem Raj).
This patchset attempts to solve the issue in a simpler way: by building libclc and SPIRV-LLVM-Translator together with the LLVM. This way we don't have to create target Clang recipes, there is no extra toolchain to support, etc. Clang binaries are creted as a part of the build process (in order to support building target packages), however it only hits the LLVM sysroot-native and is only used by the LLVM target build.
Future work by Khem (once Clang is properly supported in OE-Core) should allow us to create proper recipes for libclc and spirv-llvm-translator and drop them from the llvm / clang recipe.
I think this approach provides a good balance between OE-Core being stuck with the outdated Mesa release and being able to upgrade it, bringing support for new hardware.
Quoted 7 lines
Last two patches of the series bring in RustiCL support, a new OpenCL implementation within Mesa. They are optional for the sake of the upgrade and can be dropped if there is any issue with those. RustiCL support is mostly compile-tested at this point.
Signed-off-by Dmitry Baryshkov <[email protected]>---
Hi Dmitry,
Thanks for the new version.
It looks like we still have issues on the autobuilder, now during oe-selftests. I truncated a bit the logs below.
ERROR: mesa-native-2_25.0.2-r0
do_compile: Execution of '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/temp/run.do_compile.506477' failed with exit code 1
...| FAILED: src/intel/shaders/intel_gfx80_shaders.spv | /srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/build/src/compiler/clc/mesa_clc ../mesa-25.0.2/src/intel/shaders/libintel_shaders.h ../mesa-25.0.2/src/intel/shaders/generate.cl ../mesa-25.0.2/src/intel/shaders/generate_draws.cl ../mesa-25.0.2/src/intel/shaders/generate_draws_iris.cl ../mesa-25.0.2/src/intel/shaders/query_copy.cl ../mesa-25.0.2/src/intel/shaders/util.cl -o src/intel/shaders/intel_gfx80_shaders.spv -- -DNDEBUG=1 -DGFX_VERx10=80 -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/intel/shaders/. -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/compiler/libcl -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/intel -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/build/src/intel -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/intel/genxml | /bin/sh: 1: /srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/build/src/compiler/clc/mesa_clc: not foundBut also a lot of issues with sstate tests:
2025-03-31 19:31:36,349 - oe-selftest - INFO - 6: 46/49 214/622 (88.62s) (0 failed) (sstatetests.SStateHashSameSigs.test_sstate_32_64_same_hash) 2025-03-31 19:31:36,349 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last): File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/meta/lib/oeqa/selftest/cases/sstatetests.py", line 418, in test_sstate_32_64_same_hash self.sstate_hashtest("i686") File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/meta/lib/oeqa/selftest/cases/sstatetests.py", line 409, in sstate_hashtest self.assertCountEqual(files1, files2) File "/usr/lib/python3.11/unittest/case.py", line 1233, in assertCountEqual self.fail(msg) File "/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: '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53795/tmp-sstatesamehash/stamps/core2-32-poky-linux/mesa/25.0.2.do_install.sigdata.f1121eb56f1f6b8335722e32d0e21eb777e95ab4af83b777971f3666d1265bed' First has 1, Second has 0: '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53795/tmp-sstatesamehash/stamps/core2-32-poky-linux/mesa/25.0.2.do_create_spdx.sigdata.4c53505a0e3a5bba214d854ae8eea7c551f794d6b85392564d7c3923180e5d7f' First has 1, Second has 0: '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53795/tmp-sstatesamehash/stamps/core2-32-poky-linux/mesa/25.0.2.do_create_package_spdx.sigdata.cefe11ad38c3c40968e4757314ad08b91f9584c9845cbcf08cc8635e1216912e' First has 1, Second has 0: '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53795/tmp-sstatesamehash/stamps/core2-32-poky-linux/mesa/25.0.2.do_populate_sysroot.sigdata.2e3e3b9c17855a8a865dd9e99c002016e697024fc93cdfed690b7d54bb05e34e' First has 1, Second has 0: '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53795/tmp-sstatesamehash/stamps/core2-32-poky-linux/mesa/25.0.2.do_prepare_recipe_sysroot.sigdata.73d0df5170ce762727a517856505f3505b2c47f479affdddb242ddcad34d5e29'
Quoted 7 lines
...
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/1264
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/1350
https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/1214Can you have a look a these please?
Also, I suspect this series is linked with this Xorg segfault in parselogs.ParseLogsTest.test_parselogs:
Central error: Fatal server error:
***********************
[ 1.468] compiled for 1.21.1.16, module version = 1.0.1 [ 1.468] ABI class: X.Org ANSI C Emulation, version 0.4 [ 1.512] (EE) [ 1.512] (EE) Backtrace: [ 1.512] (EE) 0: /usr/bin/Xorg (xorg_backtrace+0x52) [0x566b2522] [ 1.512] (EE) 1: /usr/bin/Xorg (0x56583000+0x1332b5) [0x566b62b5] [ 1.512] (EE) 2: /lib/libc.so.6 (0xf75e8000+0x34060) [0xf761c060] [ 1.512] (EE) 3: /usr/lib/libgallium-25.0.2.so (0xf5140000+0x512634) [0xf5652634] [ 1.512] (EE) [ 1.512] (EE) Segmentation fault at address 0x0 [ 1.512] (EE) Fatal server error: [ 1.512] (EE) Caught signal 11 (Segmentation fault). Server aborting
https://autobuilder.yoctoproject.org/valkyrie/#/builders/11/builds/1274
Signature · 3 lines
Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 19 lines · Mathieu Dubois-Briand via lists.openembedded.org
Also, I suspect this series is linked with this Xorg segfault in parselogs.ParseLogsTest.test_parselogs:
Central error: Fatal server error:
***********************[ 1.468] compiled for 1.21.1.16, module version = 1.0.1 [ 1.468] ABI class: X.Org ANSI C Emulation, version 0.4 [ 1.512] (EE) [ 1.512] (EE) Backtrace: [ 1.512] (EE) 0: /usr/bin/Xorg (xorg_backtrace+0x52) [0x566b2522] [ 1.512] (EE) 1: /usr/bin/Xorg (0x56583000+0x1332b5) [0x566b62b5] [ 1.512] (EE) 2: /lib/libc.so.6 (0xf75e8000+0x34060) [0xf761c060] [ 1.512] (EE) 3: /usr/lib/libgallium-25.0.2.so (0xf5140000+0x512634) [0xf5652634] [ 1.512] (EE) [ 1.512] (EE) Segmentation fault at address 0x0 [ 1.512] (EE) Fatal server error: [ 1.512] (EE) Caught signal 11 (Segmentation fault). Server aborting
This one is specific to x86-x32. We've had to do this previously, maybe it's not enough, or there's some other issue:
https://web.git.yoctoproject.org/poky/commit/?id=f32128bda2a035b01d2dbf7bc73738a310eb955c
I'd say we drop testing anything graphical from that platform, as the only way to get it started is with fbdev. No one's using it.
Alex
Hello Mathieu,
Quoted 37 lines · Mathieu Dubois-Briand
Quoted 24 lines · Dmitry Baryshkov via lists.openembedded.org
libclc is required in order to build Intel drivers in Mesa 24.1 and later. Thus OE-Core is currently locked to the 24.0.x branch, which is no longer maintained, having last release in June 2024.
A clean solution is to package Clang, then use it to build libclc and SPIRV-LLVM-Translator (required for Mesa OpenCL support). However creating proper recipes for Clang is a long process (ongoing by Khem Raj).
This patchset attempts to solve the issue in a simpler way: by building libclc and SPIRV-LLVM-Translator together with the LLVM. This way we don't have to create target Clang recipes, there is no extra toolchain to support, etc. Clang binaries are creted as a part of the build process (in order to support building target packages), however it only hits the LLVM sysroot-native and is only used by the LLVM target build.
Future work by Khem (once Clang is properly supported in OE-Core) should allow us to create proper recipes for libclc and spirv-llvm-translator and drop them from the llvm / clang recipe.
I think this approach provides a good balance between OE-Core being stuck with the outdated Mesa release and being able to upgrade it, bringing support for new hardware.
Quoted 7 lines
Last two patches of the series bring in RustiCL support, a new OpenCL implementation within Mesa. They are optional for the sake of the upgrade and can be dropped if there is any issue with those. RustiCL support is mostly compile-tested at this point.
Signed-off-by Dmitry Baryshkov <[email protected]>---
Hi Dmitry,
Thanks for the new version.
Quoted 8 lines
It looks like we still have issues on the autobuilder, now during oe-selftests. I truncated a bit the logs below.
ERROR: mesa-native-2_25.0.2-r0
do_compile: Execution of '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/temp/run.do_compile.506477' failed with exit code 1
...| FAILED: src/intel/shaders/intel_gfx80_shaders.spv | /srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/build/src/compiler/clc/mesa_clc ../mesa-25.0.2/src/intel/shaders/libintel_shaders.h ../mesa-25.0.2/src/intel/shaders/generate.cl ../mesa-25.0.2/src/intel/shaders/generate_draws.cl ../mesa-25.0.2/src/intel/shaders/generate_draws_iris.cl ../mesa-25.0.2/src/intel/shaders/query_copy.cl ../mesa-25.0.2/src/intel/shaders/util.cl -o src/intel/shaders/intel_gfx80_shaders.spv -- -DNDEBUG=1 -DGFX_VERx10=80 -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/intel/shaders/. -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/compiler/libcl -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/intel -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/build/src/intel -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/intel/genxml | /bin/sh: 1: /srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/build/src/compiler/clc/mesa_clc: not found
I've fixed all other issues, except the x32 (working on reproducing it now) and this one. Would you have a pointer to the build job?
Quoted 27 lines
But also a lot of issues with sstate tests:
2025-03-31 19:31:36,349 - oe-selftest - INFO - 6: 46/49 214/622 (88.62s) (0 failed) (sstatetests.SStateHashSameSigs.test_sstate_32_64_same_hash) 2025-03-31 19:31:36,349 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last): File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/meta/lib/oeqa/selftest/cases/sstatetests.py", line 418, in test_sstate_32_64_same_hash self.sstate_hashtest("i686") File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/meta/lib/oeqa/selftest/cases/sstatetests.py", line 409, in sstate_hashtest self.assertCountEqual(files1, files2) File "/usr/lib/python3.11/unittest/case.py", line 1233, in assertCountEqual self.fail(msg) File "/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: '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53795/tmp-sstatesamehash/stamps/core2-32-poky-linux/mesa/25.0.2.do_install.sigdata.f1121eb56f1f6b8335722e32d0e21eb777e95ab4af83b777971f3666d1265bed' First has 1, Second has 0: '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53795/tmp-sstatesamehash/stamps/core2-32-poky-linux/mesa/25.0.2.do_create_spdx.sigdata.4c53505a0e3a5bba214d854ae8eea7c551f794d6b85392564d7c3923180e5d7f' First has 1, Second has 0: '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53795/tmp-sstatesamehash/stamps/core2-32-poky-linux/mesa/25.0.2.do_create_package_spdx.sigdata.cefe11ad38c3c40968e4757314ad08b91f9584c9845cbcf08cc8635e1216912e' First has 1, Second has 0: '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53795/tmp-sstatesamehash/stamps/core2-32-poky-linux/mesa/25.0.2.do_populate_sysroot.sigdata.2e3e3b9c17855a8a865dd9e99c002016e697024fc93cdfed690b7d54bb05e34e' First has 1, Second has 0: '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53795/tmp-sstatesamehash/stamps/core2-32-poky-linux/mesa/25.0.2.do_prepare_recipe_sysroot.sigdata.73d0df5170ce762727a517856505f3505b2c47f479affdddb242ddcad34d5e29'...
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/1264
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/1350
https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/1214Can you have a look a these please?
Signature · 2 lines
With best wishes Dmitry
Quoted 9 lines · Dmitry Baryshkov via lists.openembedded.org
Quoted 5 lines
ERROR: mesa-native-2_25.0.2-r0
do_compile: Execution of '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/temp/run.do_compile.506477' failed with exit code 1
...| FAILED: src/intel/shaders/intel_gfx80_shaders.spv | /srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/build/src/compiler/clc/mesa_clc ../mesa-25.0.2/src/intel/shaders/libintel_shaders.h ../mesa-25.0.2/src/intel/shaders/generate.cl ../mesa-25.0.2/src/intel/shaders/generate_draws.cl ../mesa-25.0.2/src/intel/shaders/generate_draws_iris.cl ../mesa-25.0.2/src/intel/shaders/query_copy.cl ../mesa-25.0.2/src/intel/shaders/util.cl -o src/intel/shaders/intel_gfx80_shaders.spv -- -DNDEBUG=1 -DGFX_VERx10=80 -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/intel/shaders/. -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/compiler/libcl -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/intel -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/build/src/intel -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/intel/genxml | /bin/sh: 1: /srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/build/src/compiler/clc/mesa_clc: not foundI've fixed all other issues, except the x32 (working on reproducing it now) and this one. Would you have a pointer to the build job?
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/1264/steps/14/logs/stdio
This is in context of oe-selftest, but it is simply building qemu-system-native on debian 12 - I suspect the mesa-native fail is specific to that host distro. I can try to reproduce if you need help with it.
Alex
Quoted 13 lines · Alexander Kanavin
Quoted 9 lines · Dmitry Baryshkov via lists.openembedded.org
Quoted 5 lines
ERROR: mesa-native-2_25.0.2-r0
do_compile: Execution of '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/temp/run.do_compile.506477' failed with exit code 1
...| FAILED: src/intel/shaders/intel_gfx80_shaders.spv | /srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/build/src/compiler/clc/mesa_clc ../mesa-25.0.2/src/intel/shaders/libintel_shaders.h ../mesa-25.0.2/src/intel/shaders/generate.cl ../mesa-25.0.2/src/intel/shaders/generate_draws.cl ../mesa-25.0.2/src/intel/shaders/generate_draws_iris.cl ../mesa-25.0.2/src/intel/shaders/query_copy.cl ../mesa-25.0.2/src/intel/shaders/util.cl -o src/intel/shaders/intel_gfx80_shaders.spv -- -DNDEBUG=1 -DGFX_VERx10=80 -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/intel/shaders/. -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/compiler/libcl -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/intel -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/build/src/intel -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/intel/genxml | /bin/sh: 1: /srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/build/src/compiler/clc/mesa_clc: not foundI've fixed all other issues, except the x32 (working on reproducing it now) and this one. Would you have a pointer to the build job?
Quoted 6 lines
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/1264/steps/14/logs/stdio
This is in context of oe-selftest, but it is simply building qemu-system-native on debian 12 - I suspect the mesa-native fail is specific to that host distro. I can try to reproduce if you need help with it.
It's really strange as my build host is Debian 12. And it's even more strange as mesa-clc was built few lines above (16406).
Signature · 2 lines
With best wishes Dmitry
Quoted 16 lines · Dmitry Baryshkov
Quoted 15 lines · Alexander Kanavin
Quoted 9 lines · Dmitry Baryshkov via lists.openembedded.org
Quoted 5 lines
ERROR: mesa-native-2_25.0.2-r0
do_compile: Execution of '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/temp/run.do_compile.506477' failed with exit code 1
...| FAILED: src/intel/shaders/intel_gfx80_shaders.spv | /srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/build/src/compiler/clc/mesa_clc ../mesa-25.0.2/src/intel/shaders/libintel_shaders.h ../mesa-25.0.2/src/intel/shaders/generate.cl ../mesa-25.0.2/src/intel/shaders/generate_draws.cl ../mesa-25.0.2/src/intel/shaders/generate_draws_iris.cl ../mesa-25.0.2/src/intel/shaders/query_copy.cl ../mesa-25.0.2/src/intel/shaders/util.cl -o src/intel/shaders/intel_gfx80_shaders.spv -- -DNDEBUG=1 -DGFX_VERx10=80 -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/intel/shaders/. -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/compiler/libcl -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/intel -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/build/src/intel -I/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/mesa-25.0.2/src/intel/genxml | /bin/sh: 1: /srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-53842/tmp/work/x86_64-linux/mesa-native/25.0.2/build/src/compiler/clc/mesa_clc: not foundI've fixed all other issues, except the x32 (working on reproducing it now) and this one. Would you have a pointer to the build job?
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/1264/steps/14/logs/stdio
Quoted 7 lines
Quoted 4 lines
This is in context of oe-selftest, but it is simply building qemu-system-native on debian 12 - I suspect the mesa-native fail is specific to that host distro. I can try to reproduce if you need help with it.
It's really strange as my build host is Debian 12. And it's even more strange as mesa-clc was built few lines above (16406).
Ok, I will try to play a bit with it today, let's see if I can reproduce easily.
I launched a rebuild of the previous job there:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/1274
I will try to reproduce it locally a bit later today.
Also, maybe this is linked with other fails. So if you have a new version of your series fixing them, feel free to send it, I will be happy to test it.
Signature · 3 lines
Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 6 lines · Mathieu Dubois-Briand
Quoted 3 lines
It's really strange as my build host is Debian 12. And it's even more strange as mesa-clc was built few lines above (16406).
Ok, I will try to play a bit with it today, let's see if I can reproduce easily.
I took v4, and ran 'bitbake mesa-native' on the exact build host (debian-12-vk-1) where it happened, and it built without issues. mesa_clc is built and used in build logs.
If this happens again, we should take care to preserve the failing build directory, so it can be inspected post-mortem. 'Not found' error can be misleading: it may mean there's a problem with one of the libraries, or the executable is somehow in an incorrect format, etc.
Alex
Quoted 9 lines · Alexander Kanavin
Quoted 6 lines · Mathieu Dubois-Briand
Quoted 3 lines
It's really strange as my build host is Debian 12. And it's even more strange as mesa-clc was built few lines above (16406).
Ok, I will try to play a bit with it today, let's see if I can reproduce easily.
Quoted 8 lines
I took v4, and ran 'bitbake mesa-native' on the exact build host (debian-12-vk-1) where it happened, and it built without issues.
mesa_clcis built and used in build logs.If this happens again, we should take care to preserve the failing build directory, so it can be inspected post-mortem. 'Not found' error can be misleading: it may mean there's a problem with one of the libraries, or the executable is somehow in an incorrect format, etc.
Okay, I was able to reproduce the issue. It happens when the llvm-native was built with a different build-dir as the current build, because then the other build-dir (which might not exist ATM) crawls into llvm-config --ldflags.
For example, I caught this while doing builds in build-test, while the sstate-cache contained llvm-native build from the build-test-st (from selftests builds).
Signature · 2 lines
With best wishes Dmitry