llvm/mesa/rust: simplify llvm-config handling
PATCH v3 1/1 llvm/mesa/rust: simplify llvm-config handling
From: Deepesh Varatharajan <[email protected]>
Replace PATH-based llvm-config discovery with explicit sysroot-native resolution and simplify the target llvm-config wrapper to act as a pure pass-through while preserving Yocto alternate path handling.
The previous implementation relied on:
* which -a llvm-config | sed -n 2p
which is unreliable in cross-build environments because it only searches executables present in $PATH. Native sysroot tools (e.g. recipe-sysroot-native llvm-config) are not guaranteed to be exposed via PATH, so they may not be discovered at all.
* echo $base_libdir | sed -n '/lib64/p'
which depends on a BitBake variable that may be empty or unset in certain build contexts, leading to incorrect libdir selection.
Update the wrapper to:
* Use an @LLVM_CONFIG_PATH@ placeholder that is replaced during the build with the appropriate native llvm-config path.
* Detect libdir using filesystem inspection rather than variable parsing.
* Preserve YOCTO_ALTERNATE_EXE_PATH and YOCTO_ALTERNATE_LIBDIR handling.
* Delegate all arguments directly to the native llvm-config.
Update rust and mesa recipes to replace the placeholder with the native llvm-config path during target and nativesdk builds.
Also remove the native llvm-config copy logic and lib/lib64 symlink workarounds, relying instead on explicit native tool resolution.
--- ...unwind.pc.in-and-llvm-config-scripts.patch | 52 +++---------------- meta/recipes-devtools/rust/rust_1.96.0.bb | 52 ++++++------------- meta/recipes-graphics/mesa/mesa.inc | 16 ++++++ 3 files changed, 39 insertions(+), 81 deletions(-)
meta/recipes-devtools/clang/clang/0026-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch +8 -44
@@ -8,6 +8,7 @@ These are added by OE project Upstream-Status: Inappropriate [ OE-Specific ] Signed-off-by: Khem Raj <[email protected]> +Signed-off-by: Deepesh Varatharajan <[email protected]> --- libunwind/libunwind.pc.in | 9 ++++++ llvm/tools/llvm-config/llvm-config | 52 ++++++++++++++++++++++++++++++
@@ -35,56 +36,19 @@ new file mode 100644 index 000000000000..6a0dd54b8eab --- /dev/null +++ b/llvm/tools/llvm-config/llvm-config -@@ -0,0 +1,52 @@ +@@ -0,0 +1,15 @@ +#!/bin/bash +# -+# Wrapper script for llvm-config. Supplies the right environment variables -+# for the target and delegates to the native llvm-config for anything else. This -+# is needed because arguments like --ldflags, --cxxflags, etc. are set by the -+# native compile rather than the target compile. ++# The llvm-config wrapper will act as a pure pass-through to the native llvm-config ++# while preserving Yocto-specific environment variables used for alternate executable ++# and library path resolution. +# +SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" -+NEXT_LLVM_CONFIG="$(which -a llvm-config | sed -n 2p)" ++NEXT_LLVM_CONFIG="@LLVM_CONFIG_PATH@" +export YOCTO_ALTERNATE_EXE_PATH="${YOCTO_ALTERNATE_EXE_PATH:="$(readlink -f "$SCRIPT_DIR/../llvm-config")"}" -+if [ -n "$( echo $base_libdir | sed -n '/lib64/p')" ]; then ++if [ -d "$(readlink -f "$SCRIPT_DIR/../../lib64")" ]; then + export YOCTO_ALTERNATE_LIBDIR="${YOCTO_ALTERNATE_LIBDIR:="/lib64"}" +else + export YOCTO_ALTERNATE_LIBDIR="${YOCTO_ALTERNATE_LIBDIR:="/lib"}" +fi -+if [[ $# == 0 ]]; then -+ exec "$NEXT_LLVM_CONFIG" -+fi -+ -+remain="" -+output="" -+for arg in "$@"; do -+ case "$arg" in -+ --cppflags) -+ output="${output} ${CPPFLAGS}" -+ ;; -+ --cflags) -+ output="${output} ${CFLAGS}" -+ ;; -+ --cxxflags) -+ output="${output} ${CXXFLAGS}" -+ ;; -+ --ldflags) -+ output="${output} ${LDFLAGS}" -+ ;; -+ --shared-mode) -+ output="${output} shared" -+ ;; -+ --link-shared) -+ break -+ ;; -+ *) -+ remain="${remain} ${arg}" -+ ;; -+ esac -+done -+ -+if [ "${remain}" != "" ]; then -+ output="${output} "$("$NEXT_LLVM_CONFIG" ${remain}) -+fi -+ -+echo "${output}" ++exec "$NEXT_LLVM_CONFIG" "$@"
meta/recipes-devtools/rust/rust_1.96.0.bb +15 -37
79 lines not on this page · raw message
meta/recipes-graphics/mesa/mesa.inc +16 -0
@@ -51,6 +51,22 @@ ANY_OF_DISTRO_FEATURES = "opencl opengl vulkan" PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)}" +replace_llvm_config_path() { + if [ -f "${STAGING_BINDIR_CROSS}/llvm-config" ]; then + sed -i \ + 's#@LLVM_CONFIG_PATH@#${STAGING_BINDIR_NATIVE}/llvm-config#g' \ + ${STAGING_BINDIR_CROSS}/llvm-config + fi +} + +do_configure:prepend:class-target() { + replace_llvm_config_path +} + +do_configure:prepend:class-nativesdk() { + replace_llvm_config_path +} + # set the MESA_BUILD_TYPE to either 'release' (default) or 'debug' # by default the upstream mesa sources build a debug release # here we assume the user will want a release build by default
Signature · 1 line
2.49.0
Quoted 6 lines · On Thu, 2026-06-11 at 20:46 -0700, [email protected] wrote:
From: Deepesh Varatharajan <[email protected]>
Replace PATH-based llvm-config discovery with explicit sysroot-native resolution and simplify the target llvm-config wrapper to act as a pure pass-through while preserving Yocto alternate path handling.
Quoted 7 lines
The previous implementation relied on:
*
which -a llvm-config | sed -n 2p
which is unreliable in cross-build environments because it only searches executables present in $PATH. Native sysroot tools (e.g. recipe-sysroot-native llvm-config) are not guaranteed to be exposed via PATH, so they may not be discovered at all.
We always configure PATH to contain the cross scripts and native sysroot. Is there something which is reconfiguring PATH to skip the native sysroot?
Quoted 50 lines
*
echo $base_libdir | sed -n '/lib64/p'
which depends on a BitBake variable that may be empty or unset in certain build contexts, leading to incorrect libdir selection.Update the wrapper to:
* Use an @LLVM_CONFIG_PATH@ placeholder that is replaced during the build with the appropriate native llvm-config path.
* Detect libdir using filesystem inspection rather than variable parsing.
* PreserveYOCTO_ALTERNATE_EXE_PATHandYOCTO_ALTERNATE_LIBDIRhandling.
* Delegate all arguments directly to the native llvm-config.Update rust and mesa recipes to replace the placeholder with the native llvm-config path during target and nativesdk builds.
Also remove the native llvm-config copy logic and lib/lib64 symlink workarounds, relying instead on explicit native tool resolution.
Signed-off-by Deepesh Varatharajan <[email protected]>---
...unwind.pc.in-and-llvm-config-scripts.patch | 52 +++---------------- meta/recipes-devtools/rust/rust_1.96.0.bb | 52 ++++++------------- meta/recipes-graphics/mesa/mesa.inc | 16 ++++++3 files changed, 39 insertions(+), 81 deletions(-)meta/recipes-devtools/clang/clang/0026-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch +0
-0@@ -8,6 +8,7 @@ These are added by OE projectUpstream-Status: Inappropriate [ OE-Specific ]
Signed-off-by Khem Raj <[email protected]>+Signed-off-by: Deepesh Varatharajan <[email protected]>
---
libunwind/libunwind.pc.in | 9 ++++++ llvm/tools/llvm-config/llvm-config | 52 ++++++++++++++++++++++++++++++meta/recipes-devtools/clang/clang/0026-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch +0
-0@@ -35,56 +36,19 @@ new file mode 100644index 000000000000..6a0dd54b8eab
---/dev/null
+++ b/llvm/tools/llvm-config/llvm-config
-@@ -0,0 +1,52 @@
+@@ -0,0 +1,15 @@
+#!/bin/bash
+#
-+# Wrapper script for llvm-config. Supplies the right environment variables -+# for the target and delegates to the native llvm-config for anything else. This -+# is needed because arguments like --ldflags, --cxxflags, etc. are set by the
Quoted 8 lines
-+# native compile rather than the target compile.
++# The llvm-config wrapper will act as a pure pass-through to the native llvm-config ++# while preserving Yocto-specific environment variables used for alternate executable ++# and library path resolution.
+#
+SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" -+NEXT_LLVM_CONFIG="$(which -a llvm-config | sed -n 2p)" ++NEXT_LLVM_CONFIG="@LLVM_CONFIG_PATH@"
As I understand it, this is always being configured to point at the llvm-config in the native sysroot?
I think this script is only ever installed into STAGING_BINDIR_CROSS?
If that is the case, could we just set this to a relative path to SCRIPT_DIR, which would then always point at the right places without needing to be adjusted each time?
Quoted 13 lines
+export YOCTO_ALTERNATE_EXE_PATH="${YOCTO_ALTERNATE_EXE_PATH:="$(readlink -f "$SCRIPT_DIR/../llvm-config")"}" -+if [ -n "$( echo $base_libdir | sed -n '
/lib64/p')" ]; then
++if [ -d "$(readlink -f "$SCRIPT_DIR/../../lib64")" ]; then
+ export YOCTO_ALTERNATE_LIBDIR="${YOCTO_ALTERNATE_LIBDIR:="/lib64"}"
+else
+ export YOCTO_ALTERNATE_LIBDIR="${YOCTO_ALTERNATE_LIBDIR:="/lib"}"
+fi
-+if [[ $# == 0 ]]; then
-+ exec "$NEXT_LLVM_CONFIG"
-+fi
-+
-+remain=""
-+output=""
Quoted 8 lines
-+for arg in "$@"; do
-+ case "$arg" in
-+ --cppflags)
-+ output="${output} ${CPPFLAGS}"
-+ ;;
-+ --cflags)
-+ output="${output} ${CFLAGS}"
-+ ;;
Can you remind me, how does the native llvm-config provide the target cflags? Is that triggered by setting the YOCTO_ALTERNATE_LIBDIR above?
Cheers,
Richard
Quoted 12 lines · Richard Purdie
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.Quoted 8 lines · On Thu, 2026-06-11 at 20:46 -0700, [email protected] wrote:
From: Deepesh Varatharajan <[email protected]>
Replace PATH-based llvm-config discovery with explicit sysroot-native resolution and simplify the target llvm-config wrapper to act as a pure pass-through while preserving Yocto alternate path handling.
The previous implementation relied on:
Quoted 8 lines
Quoted 5 lines
*
which -a llvm-config | sed -n 2p
which is unreliable in cross-build environments because it only searches executables present in $PATH. Native sysroot tools (e.g. recipe-sysroot-native llvm-config) are not guaranteed to be exposed via PATH, so they may not be discovered at all.We always configure PATH to contain the cross scripts and native sysroot. Is there something which is reconfiguring PATH to skip the native sysroot?
After running bitbake rust -c devshell, I checked echo $PATH and seen native sysroot path present there.
In this case, since we already know the exact location from which llvm-config should be used, would it make sense to reference that path directly instead of recursively searching for llvm-config from the current directory?
Quoted 53 lines
Quoted 53 lines
*
echo $base_libdir | sed -n '/lib64/p'
which depends on a BitBake variable that may be empty or unset in certain build contexts, leading to incorrect libdir selection.Update the wrapper to:
* Use an @LLVM_CONFIG_PATH@ placeholder that is replaced during the build with the appropriate native llvm-config path.
* Detect libdir using filesystem inspection rather than variable parsing.
* PreserveYOCTO_ALTERNATE_EXE_PATHandYOCTO_ALTERNATE_LIBDIRhandling.
* Delegate all arguments directly to the native llvm-config.Update rust and mesa recipes to replace the placeholder with the native llvm-config path during target and nativesdk builds.
Also remove the native llvm-config copy logic and lib/lib64 symlink workarounds, relying instead on explicit native tool resolution.
Signed-off-by Deepesh Varatharajan <[email protected]>--- ...unwind.pc.in-and-llvm-config-scripts.patch | 52 +++---------------- meta/recipes-devtools/rust/rust_1.96.0.bb | 52 ++++++------------- meta/recipes-graphics/mesa/mesa.inc | 16 ++++++ 3 files changed, 39 insertions(+), 81 deletions(-)meta/recipes-devtools/clang/clang/0026-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch +3
-5@@ -8,6 +8,7 @@ These are added by OE project Upstream-Status: Inappropriate [ OE-Specific ] Signed-off-by: Khem Raj <[email protected]> +Signed-off-by: Deepesh Varatharajan <[email protected]> --- libunwind/libunwind.pc.in | 9 ++++++ llvm/tools/llvm-config/llvm-config | 52 ++++++++++++++++++++++++++++++@@ -35,56 +36,19 @@ new file mode 100644 index 000000000000..6a0dd54b8eab --- /dev/null +++ b/llvm/tools/llvm-config/llvm-config -@@ -0,0 +1,52 @@ +@@ -0,0 +1,15 @@ +#!/bin/bash +# -+# Wrapper script for llvm-config. Supplies the right environment variables -+# for the target and delegates to the native llvm-config for anything else. This -+# is needed because arguments like --ldflags, --cxxflags, etc. are set by the -+# native compile rather than the target compile. ++# The llvm-config wrapper will act as a pure pass-through to the native llvm-config
Quoted 8 lines
meta/recipes-devtools/clang/clang/0026-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch new file mode 100644 · line 47
Quoted 6 lines
meta/recipes-devtools/clang/clang/0026-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch +3
-1++# while preserving Yocto-specific environment variables used for alternate executable ++# and library path resolution. +# +SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" -+NEXT_LLVM_CONFIG="$(which -a llvm-config | sed -n 2p)" ++NEXT_LLVM_CONFIG="@LLVM_CONFIG_PATH@"As I understand it, this is always being configured to point at the llvm-config in the native sysroot?
yes
Quoted 2 lines
I think this script is only ever installed into
STAGING_BINDIR_CROSS?
yes
Quoted 4 lines
If that is the case, could we just set this to a relative path to
SCRIPT_DIR, which would then always point at the right places without needing to be adjusted each time?
This script is used in both target and nativesdk builds, and the directory layout differs between them. For example:
target : "../recipe-sysroot/usr/bin/crossscripts"
nativesdk : "../recipe-sysroot/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-oesdk-linux/usr/bin/crossscripts"
Because the relative location of native llvm-config with respect to SCRIPT_DIR is not the same in these two environments, a single path relative from SCRIPT_DIR would not resolve correctly in both cases. Therefore, the path cannot be expressed as one fixed relative path and still work for both target and nativesdk builds.
Quoted 22 lines
Quoted 12 lines
meta/recipes-devtools/clang/clang/0026-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch +1
-5+export YOCTO_ALTERNATE_EXE_PATH="${YOCTO_ALTERNATE_EXE_PATH:="$(readlink -f "$SCRIPT_DIR/../llvm-config")"}" -+if [ -n "$( echo $base_libdir | sed -n '/lib64/p')" ]; then ++if [ -d "$(readlink -f "$SCRIPT_DIR/../../lib64")" ]; then + export YOCTO_ALTERNATE_LIBDIR="${YOCTO_ALTERNATE_LIBDIR:="/lib64"}" +else + export YOCTO_ALTERNATE_LIBDIR="${YOCTO_ALTERNATE_LIBDIR:="/lib"}" +fi -+if [[ $# == 0 ]]; then -+ exec "$NEXT_LLVM_CONFIG" -+fi -+meta/recipes-devtools/clang/clang/0026-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch new file mode 100644 · line 67
Quoted 10 lines
meta/recipes-devtools/clang/clang/0026-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch +0
-10-+remain="" -+output="" -+for arg in "$@"; do -+ case "$arg" in -+ --cppflags) -+ output="${output} ${CPPFLAGS}" -+ ;; -+ --cflags) -+ output="${output} ${CFLAGS}" -+ ;;
Quoted 2 lines
Can you remind me, how does the native llvm-config provide the target cflags? Is that triggered by setting the
YOCTO_ALTERNATE_LIBDIRabove?
Yes.
Quoted 4 lines
Cheers,
Richard
Quoted 34 lines · On Thu, Jun 11, 2026 at 08:46:43PM -0700, [email protected]…
From: Deepesh Varatharajan <[email protected]>
Replace PATH-based llvm-config discovery with explicit sysroot-native resolution and simplify the target llvm-config wrapper to act as a pure pass-through while preserving Yocto alternate path handling.
The previous implementation relied on:
*
which -a llvm-config | sed -n 2p
which is unreliable in cross-build environments because it only searches executables present in $PATH. Native sysroot tools (e.g. recipe-sysroot-native llvm-config) are not guaranteed to be exposed via PATH, so they may not be discovered at all.*
echo $base_libdir | sed -n '/lib64/p'
which depends on a BitBake variable that may be empty or unset in certain build contexts, leading to incorrect libdir selection.Update the wrapper to:
* Use an @LLVM_CONFIG_PATH@ placeholder that is replaced during the build with the appropriate native llvm-config path.
* Detect libdir using filesystem inspection rather than variable parsing.
* PreserveYOCTO_ALTERNATE_EXE_PATHandYOCTO_ALTERNATE_LIBDIRhandling.
* Delegate all arguments directly to the native llvm-config.Update rust and mesa recipes to replace the placeholder with the native llvm-config path during target and nativesdk builds.
Also remove the native llvm-config copy logic and lib/lib64 symlink workarounds, relying instead on explicit native tool resolution.
Quoted 6 lines
Signed-off-by Deepesh Varatharajan <[email protected]>--- ...unwind.pc.in-and-llvm-config-scripts.patch | 52 +++---------------- meta/recipes-devtools/rust/rust_1.96.0.bb | 52 ++++++------------- meta/recipes-graphics/mesa/mesa.inc | 16 ++++++ 3 files changed, 39 insertions(+), 81 deletions(-)
This got applied and now it broken building of OpenCL:
FAILED: [code=1] src/gallium/frontends/rusticl/rusticl_llvm_bindings.rs/home/lumag/Projects/RPB/build/tmp-qcom-distro/work/armv8a-qcom-linux/mesa/26.1.2/recipe-sysroot-native/usr/bin/bindgen ../sources/mesa-26.1.2/src/gallium/frontends/rusticl/rusticl_llvm_bindings.hpp --output /home/lumag/Projects/RPB/build/tmp-qcom-distro/work/armv8a-qcom-linux/mesa/26.1.2/build/src/gallium/frontends/rusticl/rusticl_llvm_bindings.rs --wrap-unsafe-ops --raw-line '#![allow(clippy::all)]' --raw-line '#![allow(improper_ctypes)]' --raw-line '#![allow(unused_unsafe)]' --raw-line '#![allow(non_camel_case_types)]' --raw-line '#![allow(non_snake_case)]' --raw-line '#![allow(non_upper_case_globals)]' --raw-line '#![allow(unsafe_op_in_unsafe_fn)]' --raw-line '#![allow(unnecessary_transmutes)]' --generate constructors,functions,types,vars --opaque-type '.*' --allowlist-function clang::getClangFullVersion --allowlist-function llvm::LLVMContext::LLVMContext --allowlist-function llvm::writeSpirv --allowlist-var 'LLVM_VERSION_.*' --rust-target 1.96.0 --rust-edition 2021 -- -fno-builtin-malloc -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="26.1.2"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"' -DHAVE_OPENGL=1 -DHAVE_OPENGL_ES_1=1 -DHAVE_OPENGL_ES_2=1 -DHAVE_FREEDRENO -DHAVE_LLVMPIPE -DHAVE_SOFTPIPE -DHAVE_VIRGL -DHAVE_ZINK -DHAVE_SWRAST -DMESA_SYSTEM_HAS_KMS_DRM=1 -DVIDEO_CODEC_VC1DEC=0 -DVIDEO_CODEC_H264DEC=0 -DVIDEO_CODEC_H264ENC=0 -DVIDEO_CODEC_H265DEC=0 -DVIDEO_CODEC_H265ENC=0 -DVIDEO_CODEC_AV1DEC=1 -DVIDEO_CODEC_AV1ENC=1 -DVIDEO_CODEC_VP9DEC=1 -DVIDEO_CODEC_MPEG12DEC=1 -DVIDEO_CODEC_JPEGDEC=1 -DHAVE_LIBGBM -DHAVE_WAYLAND_PLATFORM -DHAVE_X11_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DHAVE_DRM_PLATFORM -DHAVE_XCB_PLATFORM -DUSE_LIBGLVND=1 -DHAVE_GFX_COMPUTE -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM -DGLAPI_EXPORT_PROTO_ENTRY_POINTS=0 -DALLOW_KCMP -DMESA_DEBUG=0 -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE___BUILTIN_TYPES_COMPATIBLE_P -DHAVE___BUILTIN_ADD_OVERFLOW -DHAVE___BUILTIN_ADD_OVERFLOW_P -DHAVE___BUILTIN_SUB_OVERFLOW_P -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_FUNC_ATTRIBUTE_OPTIMIZE -DHAVE_FUNC_ATTRIBUTE_COLD -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_UINT128 -DHAVE_REALLOCARRAY -DHAVE_FMEMOPEN -D_GNU_SOURCE -DUSE_GCC_ATOMIC_BUILTINS -DMAJOR_IN_SYSMACROS -DHAS_SCHED_H -DHAS_SCHED_GETAFFINITY -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_SYS_SHM_H -DHAVE_POLL_H -DHAVE_SYS_INOTIFY_H -DHAVE_LINUX_UDMABUF_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_MEMFD_CREATE -DHAVE_RANDOM_R -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM -DHAVE_POSIX_FALLOCATE -DHAVE_SECURE_GETENV -DHAVE_SYSCONF -DHAVE_GNU_QSORT_R -DHAVE_STRUCT_TIMESPEC -DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_ISSIGNALING -DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_ZSTD -DHAVE_COMPRESSION -DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM '-DMESA_LLVM_VERSION_STRING="22.1.8"' -DLLVM_IS_SHARED=1 -DDRAW_LLVM_AVAILABLE=1 -DAMD_LLVM_AVAILABLE=1 -DGALLIVM_USE_ORCJIT=0 -DHAVE_SPIRV_TOOLS -DUSE_LIBELF -DTHREAD_SANITIZER=0 -DWL_HIDE_DEPRECATED -DHAVE_WL_DISPATCH_QUEUE_TIMEOUT -DHAVE_WL_CREATE_QUEUE_WITH_NAME -DHAVE_X11_DRM -DHAVE_DRI -DHAVE_DRI2 -DHAVE_DRI3_EXPLICIT_SYNC -DHAVE_DRISW_KMS -DHAVE_RENDERDOC_INTEGRATION=1 -march=armv8-a+crc -mbranch-protection=standard -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/lumag/Projects/RPB/build/tmp-qcom-distro/work/armv8a-qcom-linux/mesa/26.1.2/recipe-sysroot --target=aarch64-qcom-linux -D_FILE_OFFSET_BITS=64 -DNDEBUG -D_GNU_SOURCE -D_GLIBCXX_USE_CXX11_ABI=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -pthread -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="26.1.2"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"' -DHAVE_OPENGL=1 -DHAVE_OPENGL_ES_1=1 -DHAVE_OPENGL_ES_2=1 -DHAVE_FREEDRENO -DHAVE_LLVMPIPE -DHAVE_SOFTPIPE -DHAVE_VIRGL -DHAVE_ZINK -DHAVE_SWRAST -DMESA_SYSTEM_HAS_KMS_DRM=1 -DVIDEO_CODEC_VC1DEC=0 -DVIDEO_CODEC_H264DEC=0 -DVIDEO_CODEC_H264ENC=0 -DVIDEO_CODEC_H265DEC=0 -DVIDEO_CODEC_H265ENC=0 -DVIDEO_CODEC_AV1DEC=1 -DVIDEO_CODEC_AV1ENC=1 -DVIDEO_CODEC_VP9DEC=1 -DVIDEO_CODEC_MPEG12DEC=1 -DVIDEO_CODEC_JPEGDEC=1 -DHAVE_LIBGBM -DHAVE_WAYLAND_PLATFORM -DHAVE_X11_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DHAVE_DRM_PLATFORM -DHAVE_XCB_PLATFORM -DUSE_LIBGLVND=1 -DHAVE_GFX_COMPUTE -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM -DGLAPI_EXPORT_PROTO_ENTRY_POINTS=0 -DALLOW_KCMP -DMESA_DEBUG=0 -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE___BUILTIN_TYPES_COMPATIBLE_P -DHAVE___BUILTIN_ADD_OVERFLOW -DHAVE___BUILTIN_ADD_OVERFLOW_P -DHAVE___BUILTIN_SUB_OVERFLOW_P -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_FUNC_ATTRIBUTE_OPTIMIZE -DHAVE_FUNC_ATTRIBUTE_COLD -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_UINT128 -DHAVE_REALLOCARRAY -DHAVE_FMEMOPEN -D_GNU_SOURCE -DUSE_GCC_ATOMIC_BUILTINS -DMAJOR_IN_SYSMACROS -DHAS_SCHED_H -DHAS_SCHED_GETAFFINITY -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_SYS_SHM_H -DHAVE_POLL_H -DHAVE_SYS_INOTIFY_H -DHAVE_LINUX_UDMABUF_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_MEMFD_CREATE -DHAVE_RANDOM_R -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM -DHAVE_POSIX_FALLOCATE -DHAVE_SECURE_GETENV -DHAVE_SYSCONF -DHAVE_GNU_QSORT_R -DHAVE_STRUCT_TIMESPEC -DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_ISSIGNALING -DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_ZSTD -DHAVE_COMPRESSION -DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM '-DMESA_LLVM_VERSION_STRING="22.1.8"' -DLLVM_IS_SHARED=1 -DDRAW_LLVM_AVAILABLE=1 -DAMD_LLVM_AVAILABLE=1 -DGALLIVM_USE_ORCJIT=0 -DHAVE_SPIRV_TOOLS -DUSE_LIBELF -DTHREAD_SANITIZER=0 -DWL_HIDE_DEPRECATED -DHAVE_WL_DISPATCH_QUEUE_TIMEOUT -DHAVE_WL_CREATE_QUEUE_WITH_NAME -DHAVE_X11_DRM -DHAVE_DRI -DHAVE_DRI2 -DHAVE_DRI3_EXPLICIT_SYNC -DHAVE_DRISW_KMS -DHAVE_RENDERDOC_INTEGRATION=1 -x c++ -std=c++17 -MD -MQ ../sources/mesa-26.1.2/src/gallium/frontends/rusticl/rusticl_llvm_bindings.hpp -MF src/gallium/frontends/rusticl/rusticl_llvm_bindings.hpp.d /home/lumag/Projects/RPB/build/tmp-qcom-distro/work/armv8a-qcom-linux/mesa/26.1.2/recipe-sysroot/usr/lib/aarch64-qcom-linux/16.1.0/../../../include/c++/16.1.0/cstddef:5
2:10: fatal error: 'stddef.h' file not found
Unable to generate bindings: clang diagnosed error: /home/lumag/Projects/RPB/build/tmp-qcom-distro/work/armv8a-qcom-linux/mesa/26.1.2/recipe-sysroot/usr/lib/aarch64-qcom-linux/16.1.0/../../../include/c++/16.1.0/cstddef:52:10: fatal error: 'stddef.h' file not found
$ git bisect log git bisect start # status: waiting for both good and bad commits # good: [dfc5720ac709828543e9599597ff836021bd1561] bitbake.conf: drop opencl from DISTRO_FEATURES_FILTER_NATIVE/_NATIVESDK git bisect good dfc5720ac709828543e9599597ff836021bd1561 # status: waiting for bad commit, 1 good commit known # bad: [cddc75dcf041c0e1c86baa36840caf1a8073e40f] glib-2.0: add back Signed-off-by in CVE-2026-58016 patch git bisect bad cddc75dcf041c0e1c86baa36840caf1a8073e40f # good: [5b718f4c044147dfa0742caacbc20133ead53f10] ptest-packagelists.inc: disable glib-2.0 for RISCV64 git bisect good 5b718f4c044147dfa0742caacbc20133ead53f10 # bad: [a82e2ac1d08439c2c19015632f622940a15d00c3] python3-uv-build: upgrade 0.11.21 -> 0.11.26 git bisect bad a82e2ac1d08439c2c19015632f622940a15d00c3 # good: [d3eb9f2ae9e887dcb70cf3bb6e284c0f861546c0] python3-certifi: upgrade 2026.5.20 -> 2026.6.17 git bisect good d3eb9f2ae9e887dcb70cf3bb6e284c0f861546c0 # bad: [9e1513b29849c56fe372e0d73ce229cebed32d9e] classes/meson: use ninja explicitly when compiling git bisect bad 9e1513b29849c56fe372e0d73ce229cebed32d9e # bad: [a02059069443cfe0dc5860eae4aebba68b9a4ec4] baremetal-helloworld: Fix override order git bisect bad a02059069443cfe0dc5860eae4aebba68b9a4ec4 # good: [46b79c40c7ee5fa79e3889b77ca71bebc3136b9c] classes/gtk-doc: inherit python3native only if gtk-doc is enabled git bisect good 46b79c40c7ee5fa79e3889b77ca71bebc3136b9c # bad: [8337a9330c1fdbe36575c5e7495046b3df7f69d2] package: replace copydebugsources shell pipelines git bisect bad 8337a9330c1fdbe36575c5e7495046b3df7f69d2 # good: [f810998ac90f7a3e20e26555f39d754b16ce8b69] bitbake.conf: drop opencl from DISTRO_FEATURES_FILTER_NATIVE/_NATIVESDK git bisect good f810998ac90f7a3e20e26555f39d754b16ce8b69 # bad: [8aace29b692a8f3902a675fb4c022c223ba49531] llvm/mesa/rust: simplify llvm-config handling git bisect bad 8aace29b692a8f3902a675fb4c022c223ba49531 # first bad commit: [8aace29b692a8f3902a675fb4c022c223ba49531] llvm/mesa/rust: simplify llvm-config handling
Signature · 2 lines
With best wishes Dmitry
Hi Dmitry,
Yogesh has already posted a potential fix for this issue, and it is currently available in Mathieu's master-next branch.
https://git.openembedded.org/openembedded-core-contrib/commit/?h=mathieu/master-next&id=2e8ada1cb07d6dce8a0894b427b18b2bc585a2c8
I tested it locally, and it appears to resolve the issue. Could you please give it a try on your side and let us know if it fixes the problem for you?
Regards,
Deepesh
Quoted 24 lines · Dmitry Baryshkov
This got applied and now it broken building of OpenCL:
FAILED: [code=1]
src/gallium/frontends/rusticl/rusticl_llvm_bindings.rs/home/lumag/Projects/RPB/build/tmp-qcom-distro/work/armv8a-qcom-linux/mesa/26.1.2/recipe-sysroot-native/usr/bin/bindgen../sources/mesa-26.1.2/src/gallium/frontends/rusticl/rusticl_llvm_bindings.hpp
--output/home/lumag/Projects/RPB/build/tmp-qcom-distro/work/armv8a-qcom-linux/mesa/26.1.2/build/src/gallium/frontends/rusticl/rusticl_llvm_bindings.rs
--wrap-unsafe-ops --raw-line '#![allow(clippy::all)]' --raw-line
'#![allow(improper_ctypes)]' --raw-line '#![allow(unused_unsafe)]'
--raw-line '#![allow(non_camel_case_types)]' --raw-line
'#![allow(non_snake_case)]' --raw-line '#![allow(non_upper_case_globals)]' --raw-line '#![allow(unsafe_op_in_unsafe_fn)]' --raw-line '#![allow(unnecessary_transmutes)]' --generate constructors,functions,types,vars --opaque-type '.*'
--allowlist-functionclang::getClangFullVersion--allowlist-functionllvm::LLVMContext::LLVMContext--allowlist-functionllvm::writeSpirv
--allowlist-var 'LLVM_VERSION_.*' --rust-target 1.96.0 --rust-edition
2021 -- -fno-builtin-malloc -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
'-DPACKAGE_VERSION="26.1.2"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"' -DHAVE_OPENGL=1 -DHAVE_OPENGL_ES_1=1 -DHAVE_OPENGL_ES_2=1 -DHAVE_FREEDRENO -DHAVE_LLVMPIPE -DHAVE_SOFTPIPE -DHAVE_VIRGL -DHAVE_ZINK -DHAVE_SWRAST -DMESA_SYSTEM_HAS_KMS_DRM=1 -DVIDEO_CODEC_VC1DEC=0 -DVIDEO_CODEC_H264DEC=0 -DVIDEO_CODEC_H264ENC=0 -DVIDEO_CODEC_H265DEC=0 -DVIDEO_CODEC_H265ENC=0 -DVIDEO_CODEC_AV1DEC=1 -DVIDEO_CODEC_AV1ENC=1 -DVIDEO_CODEC_VP9DEC=1 -DVIDEO_CODEC_MPEG12DEC=1 -DVIDEO_CODEC_JPEGDEC=1 -DHAVE_LIBGBM -DHAVE_WAYLAND_PLATFORM -DHAVE_X11_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DHAVE_DRM_PLATFORM -DHAVE_XCB_PLATFORM -DUSE_LIBGLVND=1 -DHAVE_GFX_COMPUTE -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM -DGLAPI_EXPORT_PROTO_ENTRY_POINTS=0 -DALLOW_KCMP -DMESA_DEBUG=0 -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE___BUILTIN_TYPES_COMPATIBLE_P -DHAVE___BUILTIN_ADD_OVERFLOW -DHAVE___BUILTIN_ADD_OVERFLOW_P -DHAVE___BUILTIN_SUB_OVERFLOW_P -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_FUNC_ATTRIBUTE_OPTIMIZE -DHAVE_FUNC_ATTRIBUTE_COLD -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_UINT128 -DHAVE_REALLOCARRAY -DHAVE_FMEMOPEN -D_GNU_SOURCE -DUSE_GCC_ATOMIC_BUILTINS -DMAJOR_IN_SYSMACROS -DHAS_SCHED_H -DHAS_SCHED_GETAFFINITY -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_SYS_SHM_H -DHAVE_POLL_H -DHAVE_SYS_INOTIFY_H -DHAVE_LINUX_UDMABUF_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_MEMFD_CREATE -DHAVE_RANDOM_R -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM -DHAVE_POSIX_FALLOCATE -DHAVE_SECURE_GETENV -DHAVE_SYSCONF -DHAVE_GNU_QSORT_R -DHAVE_STRUCT_TIMESPEC -DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_ISSIGNALING -DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_ZSTD -DHAVE_COMPRESSION -DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM '-DMESA_LLVM_VERSION_STRING="22.1.8"' -DLLVM_IS_SHARED=1 -DDRAW_LLVM_AVAILABLE=1 -DAMD_LLVM_AVAILABLE=1 -DGALLIVM_USE_ORCJIT=0 -DHAVE_SPIRV_TOOLS -DUSE_LIBELF -DTHREAD_SANITIZER=0 -DWL_HIDE_DEPRECATED -DHAVE_WL_DISPATCH_QUEUE_TIMEOUT -DHAVE_WL_CREATE_QUEUE_WITH_NAME -DHAVE_X11_DRM -DHAVE_DRI -DHAVE_DRI2 -DHAVE_DRI3_EXPLICIT_SYNC -DHAVE_DRISW_KMS -DHAVE_RENDERDOC_INTEGRATION=1 -march=armv8-a+crc -mbranch-protection=standard -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/lumag/Projects/RPB/build/tmp-qcom-distro/work/armv8a-qcom-linux/mesa/26.1.2/recipe-sysroot --target=aarch64-qcom-linux -D_FILE_OFFSET_BITS=64 -DNDEBUG(quoted diff) +0
-3-D_GNU_SOURCE -D_GLIBCXX_USE_CXX11_ABI=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -pthread -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS'-DPACKAGE_VERSION="26.1.2"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"' -DHAVE_OPENGL=1 -DHAVE_OPENGL_ES_1=1 -DHAVE_OPENGL_ES_2=1 -DHAVE_FREEDRENO -DHAVE_LLVMPIPE -DHAVE_SOFTPIPE -DHAVE_VIRGL -DHAVE_ZINK -DHAVE_SWRAST -DMESA_SYSTEM_HAS_KMS_DRM=1 -DVIDEO_CODEC_VC1DEC=0 -DVIDEO_CODEC_H264DEC=0 -DVIDEO_CODEC_H264ENC=0 -DVIDEO_CODEC_H265DEC=0 -DVIDEO_CODEC_H265ENC=0 -DVIDEO_CODEC_AV1DEC=1 -DVIDEO_CODEC_AV1ENC=1 -DVIDEO_CODEC_VP9DEC=1 -DVIDEO_CODEC_MPEG12DEC=1 -DVIDEO_CODEC_JPEGDEC=1 -DHAVE_LIBGBM -DHAVE_WAYLAND_PLATFORM -DHAVE_X11_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DHAVE_DRM_PLATFORM -DHAVE_XCB_PLATFORM -DUSE_LIBGLVND=1 -DHAVE_GFX_COMPUTE -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM -DGLAPI_EXPORT_PROTO_ENTRY_POINTS=0 -DALLOW_KCMP -DMESA_DEBUG=0 -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE___BUILTIN_TYPES_COMPATIBLE_P -DHAVE___BUILTIN_ADD_OVERFLOW -DHAVE___BUILTIN_ADD_OVERFLOW_P -DHAVE___BUILTIN_SUB_OVERFLOW_P -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_FUNC_ATTRIBUTE_OPTIMIZE -DHAVE_FUNC_ATTRIBUTE_COLD -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_UINT128 -DHAVE_REALLOCARRAY -DHAVE_FMEMOPEN -D_GNU_SOURCE -DUSE_GCC_ATOMIC_BUILTINS -DMAJOR_IN_SYSMACROS -DHAS_SCHED_H -DHAS_SCHED_GETAFFINITY -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_SYS_SHM_H -DHAVE_POLL_H -DHAVE_SYS_INOTIFY_H -DHAVE_LINUX_UDMABUF_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_MEMFD_CREATE -DHAVE_RANDOM_R -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM -DHAVE_POSIX_FALLOCATE -DHAVE_SECURE_GETENV -DHAVE_SYSCONF -DHAVE_GNU_QSORT_R -DHAVE_STRUCT_TIMESPEC -DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_ISSIGNALING -DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_ZSTD -DHAVE_COMPRESSION -DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM '-DMESA_LLVM_VERSION_STRING="22.1.8"' -DLLVM_IS_SHARED=1 -DDRAW_LLVM_AVAILABLE=1 -DAMD_LLVM_AVAILABLE=1 -DGALLIVM_USE_ORCJIT=0 -DHAVE_SPIRV_TOOLS -DUSE_LIBELF -DTHREAD_SANITIZER=0 -DWL_HIDE_DEPRECATED -DHAVE_WL_DISPATCH_QUEUE_TIMEOUT -DHAVE_WL_CREATE_QUEUE_WITH_NAME -DHAVE_X11_DRM -DHAVE_DRI -DHAVE_DRI2 -DHAVE_DRI3_EXPLICIT_SYNC -DHAVE_DRISW_KMS -DHAVE_RENDERDOC_INTEGRATION=1 -x c++ -std=c++17 -MD -MQ ../sources/mesa-26.1.2/src/gallium/frontends/rusticl/rusticl_llvm_bindings.hpp -MF src/gallium/frontends/rusticl/rusticl_llvm_bindings.hpp.d
/home/lumag/Projects/RPB/build/tmp-qcom-distro/work/armv8a-qcom-linux/mesa/26.1.2/recipe-sysroot/usr/lib/aarch64-qcom-linux/16.1.0/../../../include/c++/16.1.0/cstddef:5
2:10: fatal error: 'stddef.h' file not found
Unable to generate bindings: clang diagnosed error:/home/lumag/Projects/RPB/build/tmp-qcom-distro/work/armv8a-qcom-linux/mesa/26.1.2/recipe-sysroot/usr/lib/aarch64-qcom-linux/16.1.0/../../../include/c++/16.1.0/cstddef:52:10: fatal error: 'stddef.h' file not found
Quoted 9 lines · Deepesh Varatharajan
Hi Dmitry,
Yogesh has already posted a potential fix for this issue, and it is currently available in Mathieu's master-next branch.
https://git.openembedded.org/openembedded-core-contrib/commit/?h=mathieu/master-next&id=2e8ada1cb07d6dce8a0894b427b18b2bc585a2c8I tested it locally, and it appears to resolve the issue. Could you please give it a try on your side and let us know if it
fixes the problem for you?
Yes, commit 7ea79279820a ("bindgen-cli: set CLANG_PATH in native and nativesdk wrappers to matching clang") fixed the issue for me.
Signature · 2 lines
With best wishes Dmitry