* [PATCH v2 0/3] mesa: small improvements after 25.0 merge
@ 2025-04-18 0:57 Dmitry Baryshkov
2025-04-18 0:57 ` [PATCH v2 1/3] meson: pass -target and -I to bindgen calls Dmitry Baryshkov
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Dmitry Baryshkov @ 2025-04-18 0:57 UTC (permalink / raw)
To: openembedded-core
Several bugfixes after Mesa 25.0 recipe was merged:
- Replace the bindgen patches with meson-based fix (Dylan Baker)
- Bundle OpenCL C headers
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
Changes in v2:
- Dropped applied patches
- Add the bundle-opencl-headers patch
- Link to v1: https://lore.kernel.org/r/20250412-mesa-25-fixes-v1-0-791840391271@oss.qualcomm.com
---
Dmitry Baryshkov (3):
meson: pass -target and -I to bindgen calls
mesa: drop the bindgen patch
mesa: bundle Clang OpenCL headers into meta-clc
meta/classes-recipe/meson.bbclass | 1 +
...d-an-option-to-force-inclusion-of-OpenCL-.patch | 57 ++++++++++++++++++
...vide-cross-compilation-arguments-to-LLVM-.patch | 67 ----------------------
meta/recipes-graphics/mesa/mesa.inc | 9 +--
4 files changed, 61 insertions(+), 73 deletions(-)
---
base-commit: 53c772c941d5ce69ab89f35cd04724b740daf269
change-id: 20250411-mesa-25-fixes-5a38fe55dd3c
Best regards,
--
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/3] meson: pass -target and -I to bindgen calls
2025-04-18 0:57 [PATCH v2 0/3] mesa: small improvements after 25.0 merge Dmitry Baryshkov
@ 2025-04-18 0:57 ` Dmitry Baryshkov
2025-04-18 0:57 ` [PATCH v2 2/3] mesa: drop the bindgen patch Dmitry Baryshkov
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Dmitry Baryshkov @ 2025-04-18 0:57 UTC (permalink / raw)
To: openembedded-core
In order to properly generate Rust bindings for the target systems, we
need to pass '-taget foo-linux-gnueabi' flags and a correct include
target include path (${STAGING_INCDIR}) to the bindgen. Add those
flags to the generated meson target file.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
meta/classes-recipe/meson.bbclass | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/classes-recipe/meson.bbclass b/meta/classes-recipe/meson.bbclass
index cbfc45b94bbd076735847134a0976b6b30784d50..ef45a034a767e979a45553ba08e46dc90e34f33f 100644
--- a/meta/classes-recipe/meson.bbclass
+++ b/meta/classes-recipe/meson.bbclass
@@ -93,6 +93,7 @@ cpp_link_args = ${@meson_array('LDFLAGS', d)}
[properties]
needs_exe_wrapper = true
sys_root = '${STAGING_DIR_HOST}'
+bindgen_clang_arguments = ['-target', '${@d.getVar('RUST_HOST_SYS')}', '-I${STAGING_INCDIR}']
[host_machine]
system = '${@meson_operating_system('HOST_OS', d)}'
--
2.39.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/3] mesa: drop the bindgen patch
2025-04-18 0:57 [PATCH v2 0/3] mesa: small improvements after 25.0 merge Dmitry Baryshkov
2025-04-18 0:57 ` [PATCH v2 1/3] meson: pass -target and -I to bindgen calls Dmitry Baryshkov
@ 2025-04-18 0:57 ` Dmitry Baryshkov
2025-04-18 0:57 ` [PATCH v2 3/3] mesa: bundle Clang OpenCL headers into meta-clc Dmitry Baryshkov
2025-04-21 15:21 ` [OE-core] [PATCH v2 0/3] mesa: small improvements after 25.0 merge Khem Raj
3 siblings, 0 replies; 8+ messages in thread
From: Dmitry Baryshkov @ 2025-04-18 0:57 UTC (permalink / raw)
To: openembedded-core
Drop the bingen-target and bindgen-includedir options in favour of the
bindgen_clang_args being passed through the meson target file.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
...vide-cross-compilation-arguments-to-LLVM-.patch | 67 ----------------------
meta/recipes-graphics/mesa/mesa.inc | 6 +-
2 files changed, 1 insertion(+), 72 deletions(-)
diff --git a/meta/recipes-graphics/mesa/files/0001-rusticl-provide-cross-compilation-arguments-to-LLVM-.patch b/meta/recipes-graphics/mesa/files/0001-rusticl-provide-cross-compilation-arguments-to-LLVM-.patch
deleted file mode 100644
index d527b3408734dfa0aa756053c1b0f3ea3a59563b..0000000000000000000000000000000000000000
--- a/meta/recipes-graphics/mesa/files/0001-rusticl-provide-cross-compilation-arguments-to-LLVM-.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From b9cf34f39ca7e7546508ce2ab1f053edef5fc201 Mon Sep 17 00:00:00 2001
-From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
-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 <dmitry.baryshkov@oss.qualcomm.com>
----
- 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
-@@ -115,6 +115,11 @@ rusticl_bindgen_c_args = [
- '-fno-builtin-malloc',
- ]
-
-+bindgen_target = get_option('bindgen-target')
-+if bindgen_target != ''
-+ rusticl_bindgen_c_args += [ '-target', bindgen_target ]
-+endif
-+
- cl_c_args = [
- '-DCL_USE_DEPRECATED_OPENCL_1_0_APIS',
- '-DCL_USE_DEPRECATED_OPENCL_1_1_APIS',
-@@ -187,6 +192,9 @@ rusticl_llvm_bindings_rs = rust.bindgen(
- rusticl_bindgen_c_args,
- pre_args,
- ],
-+ include_directories : [
-+ get_option('bindgen-includedir'),
-+ ],
- dependencies : [
- dep_clang,
- dep_llvm,
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index fb76b5b1ccba1b6ca84af25cd7f3156b1c73c11a..c76c5a075f1e2e81e887e77059c999014f742c4f 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -18,7 +18,6 @@ SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \
file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
file://0001-meson-disable-SIMD-blake-optimisations-on-x32-host.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"
@@ -143,13 +142,10 @@ 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') != '']}"
-BINDGEN_TARGET:class-native = ""
-
# "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-rusticl=true -Dbindgen-includedir=${STAGING_INCDIR} -Dbindgen-target=${BINDGEN_TARGET},\
+ -Dgallium-opencl=icd -Dgallium-rusticl=true, \
-Dgallium-opencl=disabled -Dgallium-rusticl=false, \
bindgen-cli-native \
"
--
2.39.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 3/3] mesa: bundle Clang OpenCL headers into meta-clc
2025-04-18 0:57 [PATCH v2 0/3] mesa: small improvements after 25.0 merge Dmitry Baryshkov
2025-04-18 0:57 ` [PATCH v2 1/3] meson: pass -target and -I to bindgen calls Dmitry Baryshkov
2025-04-18 0:57 ` [PATCH v2 2/3] mesa: drop the bindgen patch Dmitry Baryshkov
@ 2025-04-18 0:57 ` Dmitry Baryshkov
2025-04-21 15:21 ` [OE-core] [PATCH v2 0/3] mesa: small improvements after 25.0 merge Khem Raj
3 siblings, 0 replies; 8+ messages in thread
From: Dmitry Baryshkov @ 2025-04-18 0:57 UTC (permalink / raw)
To: openembedded-core
Add a patch bundling OpenCL headers into meta-clc. This removes extra
runtime dependencies when runnign meta-clc compiler.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
...d-an-option-to-force-inclusion-of-OpenCL-.patch | 57 ++++++++++++++++++++++
meta/recipes-graphics/mesa/mesa.inc | 3 +-
2 files changed, 59 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-graphics/mesa/files/0001-mesa-clc-add-an-option-to-force-inclusion-of-OpenCL-.patch b/meta/recipes-graphics/mesa/files/0001-mesa-clc-add-an-option-to-force-inclusion-of-OpenCL-.patch
new file mode 100644
index 0000000000000000000000000000000000000000..d65ba574d26da4088df272e7c589670ff1578747
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-mesa-clc-add-an-option-to-force-inclusion-of-OpenCL-.patch
@@ -0,0 +1,57 @@
+From f9b6175e7c446a82c568ff1a214885d707c95f49 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
+Date: Wed, 16 Apr 2025 14:35:37 +0300
+Subject: [PATCH] mesa-clc: add an option to force inclusion of OpenCL headers
+
+Currently mesa-clc bundles OpenCL headers from Clang only if the static
+LLVM is used (which means Clang / LLVM are not present on the target
+system). In some cases (e.g. when building in OpenEmbedded environemnt)
+it is desirable to have shared LLVM library, but skip installing the
+whole Clang runtime just to compile shaders. Add an option that forces
+OpenCL headers to be bundled with the mesa-clc binary.
+
+Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34551]
+---
+ meson_options.txt | 10 ++++++++++
+ src/compiler/clc/meson.build | 3 ++-
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/meson_options.txt b/meson_options.txt
+index 18da31eff507..addd274ecef7 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -797,6 +797,16 @@ option(
+ description : 'Install the mesa-clc compiler (if needed for cross builds).'
+ )
+
++option(
++ 'mesa-clc-bundle-headers',
++ type : 'combo',
++ value : 'auto',
++ choices : [
++ 'enabled', 'auto'
++ ],
++ description : 'Bundle the OpenCL headers into the mesa-clc binary (default to bundle if static LLVM is used). Note, it might require rebuilding mesa-clc if opencl-c.h or opencl-c-base.h are changed (e.g. on Clang upgrades).'
++)
++
+ option(
+ 'precomp-compiler',
+ type : 'combo',
+diff --git a/src/compiler/clc/meson.build b/src/compiler/clc/meson.build
+index 263eba527191..9ff61440f0da 100644
+--- a/src/compiler/clc/meson.build
++++ b/src/compiler/clc/meson.build
+@@ -11,7 +11,8 @@ _libmesaclc_c_args = []
+ _libmesaclc_cpp_args = ['-DLLVM_LIB_DIR="@0@"'.format(llvm_libdir)]
+ _libmesaclc_sources = []
+
+-if not _shared_llvm
++if not _shared_llvm or \
++ get_option('mesa-clc-bundle-headers') == 'enabled'
+ # LLVM 16 moved clang header path from using full version to only major version
+ if dep_llvm.version().version_compare('< 16')
+ # Prior to LLVM 16, this path used a full version
+--
+2.47.2
+
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index c76c5a075f1e2e81e887e77059c999014f742c4f..5062551b96c404f9267a1a9cd77f85635bc14edc 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -18,6 +18,7 @@ SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \
file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
file://0001-meson-disable-SIMD-blake-optimisations-on-x32-host.patch \
file://0001-freedreno-don-t-encode-build-path-into-binaries.patch\
+ file://0001-mesa-clc-add-an-option-to-force-inclusion-of-OpenCL-.patch \
"
SRC_URI[sha256sum] = "adf904d083b308df95898600ffed435f4b5c600d95fb6ec6d4c45638627fdc97"
@@ -193,7 +194,7 @@ MESA_NATIVE:class-native = ""
PACKAGECONFIG[gallium] = "-Dgallium-drivers=${@strip_comma('${GALLIUMDRIVERS}')}, -Dgallium-drivers='', libdrm"
PACKAGECONFIG[gallium-llvm] = "-Dllvm=enabled -Dshared-llvm=enabled, -Dllvm=disabled, llvm llvm-native elfutils"
-PACKAGECONFIG[libclc] = "-Dmesa-clc=${MESA_CLC} -Dinstall-mesa-clc=${INSTALL_MESA_CLC},,libclc spirv-tools spirv-llvm-translator ${MESA_NATIVE}"
+PACKAGECONFIG[libclc] = "-Dmesa-clc=${MESA_CLC} -Dinstall-mesa-clc=${INSTALL_MESA_CLC} -Dmesa-clc-bundle-headers=enabled,,libclc spirv-tools spirv-llvm-translator ${MESA_NATIVE}"
PACKAGECONFIG[xa] = "-Dgallium-xa=enabled, -Dgallium-xa=disabled"
PACKAGECONFIG[va] = "-Dgallium-va=enabled,-Dgallium-va=disabled,libva-initial"
PACKAGECONFIG[vdpau] = "-Dgallium-vdpau=enabled,-Dgallium-vdpau=disabled,libvdpau"
--
2.39.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [OE-core] [PATCH v2 0/3] mesa: small improvements after 25.0 merge
2025-04-18 0:57 [PATCH v2 0/3] mesa: small improvements after 25.0 merge Dmitry Baryshkov
` (2 preceding siblings ...)
2025-04-18 0:57 ` [PATCH v2 3/3] mesa: bundle Clang OpenCL headers into meta-clc Dmitry Baryshkov
@ 2025-04-21 15:21 ` Khem Raj
2025-04-21 19:32 ` Dmitry Baryshkov
3 siblings, 1 reply; 8+ messages in thread
From: Khem Raj @ 2025-04-21 15:21 UTC (permalink / raw)
To: dmitry.baryshkov; +Cc: openembedded-core
Hi Dmitry
I have picked these patch into clang-merge-2 branch.
https://web.git.yoctoproject.org/poky-contrib/log/?h=kraj/clang-merge-2
They help with some mesa-native build failures however, I am still
seeing a build failure build mesa-native
on musl targets. I am not sure why target should matter but it seems
to see the error
https://autobuilder.yoctoproject.org/valkyrie/#/builders/111/builds/150
Error is that mesa_clc is not available before its use. Interestingly,
it never fails locally here but it always fails on AB. Is there some
sort of build race or something else going on?
Would appreciate help.
On Thu, Apr 17, 2025 at 5:57 PM Dmitry Baryshkov via
lists.openembedded.org
<dmitry.baryshkov=oss.qualcomm.com@lists.openembedded.org> wrote:
>
> Several bugfixes after Mesa 25.0 recipe was merged:
> - Replace the bindgen patches with meson-based fix (Dylan Baker)
> - Bundle OpenCL C headers
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> Changes in v2:
> - Dropped applied patches
> - Add the bundle-opencl-headers patch
> - Link to v1: https://lore.kernel.org/r/20250412-mesa-25-fixes-v1-0-791840391271@oss.qualcomm.com
>
> ---
> Dmitry Baryshkov (3):
> meson: pass -target and -I to bindgen calls
> mesa: drop the bindgen patch
> mesa: bundle Clang OpenCL headers into meta-clc
>
> meta/classes-recipe/meson.bbclass | 1 +
> ...d-an-option-to-force-inclusion-of-OpenCL-.patch | 57 ++++++++++++++++++
> ...vide-cross-compilation-arguments-to-LLVM-.patch | 67 ----------------------
> meta/recipes-graphics/mesa/mesa.inc | 9 +--
> 4 files changed, 61 insertions(+), 73 deletions(-)
> ---
> base-commit: 53c772c941d5ce69ab89f35cd04724b740daf269
> change-id: 20250411-mesa-25-fixes-5a38fe55dd3c
>
> Best regards,
> --
> Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#215115): https://lists.openembedded.org/g/openembedded-core/message/215115
> Mute This Topic: https://lists.openembedded.org/mt/112324544/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [OE-core] [PATCH v2 0/3] mesa: small improvements after 25.0 merge
2025-04-21 15:21 ` [OE-core] [PATCH v2 0/3] mesa: small improvements after 25.0 merge Khem Raj
@ 2025-04-21 19:32 ` Dmitry Baryshkov
2025-04-22 0:20 ` Khem Raj
0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Baryshkov @ 2025-04-21 19:32 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-core
On Mon, 21 Apr 2025 at 18:22, Khem Raj <raj.khem@gmail.com> wrote:
>
> Hi Dmitry
>
> I have picked these patch into clang-merge-2 branch.
>
> https://web.git.yoctoproject.org/poky-contrib/log/?h=kraj/clang-merge-2
>
> They help with some mesa-native build failures however, I am still
> seeing a build failure build mesa-native
> on musl targets. I am not sure why target should matter but it seems
> to see the error
Note, the error is about 'required file', it usually means that the
dynamic loader is not found.
I'll try reproducing it locally.
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/111/builds/150
>
> Error is that mesa_clc is not available before its use. Interestingly,
> it never fails locally here but it always fails on AB. Is there some
> sort of build race or something else going on?
And this is usually because there was a uninative-enabled build in
sstate cache which is now being reused for the non-uninative.
Let's see if I can reproduce it...
> Would appreciate help.
>
> On Thu, Apr 17, 2025 at 5:57 PM Dmitry Baryshkov via
> lists.openembedded.org
> <dmitry.baryshkov=oss.qualcomm.com@lists.openembedded.org> wrote:
> >
> > Several bugfixes after Mesa 25.0 recipe was merged:
> > - Replace the bindgen patches with meson-based fix (Dylan Baker)
> > - Bundle OpenCL C headers
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> > ---
> > Changes in v2:
> > - Dropped applied patches
> > - Add the bundle-opencl-headers patch
> > - Link to v1: https://lore.kernel.org/r/20250412-mesa-25-fixes-v1-0-791840391271@oss.qualcomm.com
> >
> > ---
> > Dmitry Baryshkov (3):
> > meson: pass -target and -I to bindgen calls
> > mesa: drop the bindgen patch
> > mesa: bundle Clang OpenCL headers into meta-clc
> >
> > meta/classes-recipe/meson.bbclass | 1 +
> > ...d-an-option-to-force-inclusion-of-OpenCL-.patch | 57 ++++++++++++++++++
> > ...vide-cross-compilation-arguments-to-LLVM-.patch | 67 ----------------------
> > meta/recipes-graphics/mesa/mesa.inc | 9 +--
> > 4 files changed, 61 insertions(+), 73 deletions(-)
> > ---
> > base-commit: 53c772c941d5ce69ab89f35cd04724b740daf269
> > change-id: 20250411-mesa-25-fixes-5a38fe55dd3c
> >
> > Best regards,
> > --
> > Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#215115): https://lists.openembedded.org/g/openembedded-core/message/215115
> > Mute This Topic: https://lists.openembedded.org/mt/112324544/1997914
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [OE-core] [PATCH v2 0/3] mesa: small improvements after 25.0 merge
2025-04-21 19:32 ` Dmitry Baryshkov
@ 2025-04-22 0:20 ` Khem Raj
2025-04-22 1:13 ` Khem Raj
0 siblings, 1 reply; 8+ messages in thread
From: Khem Raj @ 2025-04-22 0:20 UTC (permalink / raw)
To: Dmitry Baryshkov; +Cc: openembedded-core
[-- Attachment #1.1.1: Type: text/plain, Size: 3604 bytes --]
On 4/21/25 12:32 PM, Dmitry Baryshkov wrote:
> On Mon, 21 Apr 2025 at 18:22, Khem Raj <raj.khem@gmail.com> wrote:
>>
>> Hi Dmitry
>>
>> I have picked these patch into clang-merge-2 branch.
>>
>> https://web.git.yoctoproject.org/poky-contrib/log/?h=kraj/clang-merge-2
>>
>> They help with some mesa-native build failures however, I am still
>> seeing a build failure build mesa-native
>> on musl targets. I am not sure why target should matter but it seems
>> to see the error
>
> Note, the error is about 'required file', it usually means that the
> dynamic loader is not found.
> I'll try reproducing it locally.
>
>>
>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/111/builds/150
>>
>> Error is that mesa_clc is not available before its use. Interestingly,
>> it never fails locally here but it always fails on AB. Is there some
>> sort of build race or something else going on?
>
> And this is usually because there was a uninative-enabled build in
> sstate cache which is now being reused for the non-uninative.
> Let's see if I can reproduce it...
Its in right direction, I could get the information from the worker machine
build-renamed/tmp/work/x86_64-linux/mesa-native/25.0.2$
./build/src/compiler/clc/mesa_clc
-bash: ./build/src/compiler/clc/mesa_clc: cannot execute: required file
not found
if dump the ELF headers it looks for interpreter from a uninative path
which is absolute and points to the location where it was built in
another build
[Requesting program interpreter:
/srv/pokybuild/yocto-worker/meta-oe/build/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2]
This file does not exist in current build.
>
>> Would appreciate help.
>>
>> On Thu, Apr 17, 2025 at 5:57 PM Dmitry Baryshkov via
>> lists.openembedded.org
>> <dmitry.baryshkov=oss.qualcomm.com@lists.openembedded.org> wrote:
>>>
>>> Several bugfixes after Mesa 25.0 recipe was merged:
>>> - Replace the bindgen patches with meson-based fix (Dylan Baker)
>>> - Bundle OpenCL C headers
>>>
>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>>> ---
>>> Changes in v2:
>>> - Dropped applied patches
>>> - Add the bundle-opencl-headers patch
>>> - Link to v1: https://lore.kernel.org/r/20250412-mesa-25-fixes-v1-0-791840391271@oss.qualcomm.com
>>>
>>> ---
>>> Dmitry Baryshkov (3):
>>> meson: pass -target and -I to bindgen calls
>>> mesa: drop the bindgen patch
>>> mesa: bundle Clang OpenCL headers into meta-clc
>>>
>>> meta/classes-recipe/meson.bbclass | 1 +
>>> ...d-an-option-to-force-inclusion-of-OpenCL-.patch | 57 ++++++++++++++++++
>>> ...vide-cross-compilation-arguments-to-LLVM-.patch | 67 ----------------------
>>> meta/recipes-graphics/mesa/mesa.inc | 9 +--
>>> 4 files changed, 61 insertions(+), 73 deletions(-)
>>> ---
>>> base-commit: 53c772c941d5ce69ab89f35cd04724b740daf269
>>> change-id: 20250411-mesa-25-fixes-5a38fe55dd3c
>>>
>>> Best regards,
>>> --
>>> Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>>>
>>>
>>> -=-=-=-=-=-=-=-=-=-=-=-
>>> Links: You receive all messages sent to this group.
>>> View/Reply Online (#215115): https://lists.openembedded.org/g/openembedded-core/message/215115
>>> Mute This Topic: https://lists.openembedded.org/mt/112324544/1997914
>>> Group Owner: openembedded-core+owner@lists.openembedded.org
>>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
>>> -=-=-=-=-=-=-=-=-=-=-=-
>>>
>
>
>
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2613 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 203 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [OE-core] [PATCH v2 0/3] mesa: small improvements after 25.0 merge
2025-04-22 0:20 ` Khem Raj
@ 2025-04-22 1:13 ` Khem Raj
0 siblings, 0 replies; 8+ messages in thread
From: Khem Raj @ 2025-04-22 1:13 UTC (permalink / raw)
To: Dmitry Baryshkov; +Cc: openembedded-core
[-- Attachment #1.1.1: Type: text/plain, Size: 4442 bytes --]
On 4/21/25 5:20 PM, Khem Raj wrote:
> On 4/21/25 12:32 PM, Dmitry Baryshkov wrote:
>> On Mon, 21 Apr 2025 at 18:22, Khem Raj <raj.khem@gmail.com> wrote:
>>>
>>> Hi Dmitry
>>>
>>> I have picked these patch into clang-merge-2 branch.
>>>
>>> https://web.git.yoctoproject.org/poky-contrib/log/?h=kraj/clang-merge-2
>>>
>>> They help with some mesa-native build failures however, I am still
>>> seeing a build failure build mesa-native
>>> on musl targets. I am not sure why target should matter but it seems
>>> to see the error
>>
>> Note, the error is about 'required file', it usually means that the
>> dynamic loader is not found.
>> I'll try reproducing it locally.
>>
>>>
>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/111/builds/150
>>>
>>> Error is that mesa_clc is not available before its use. Interestingly,
>>> it never fails locally here but it always fails on AB. Is there some
>>> sort of build race or something else going on?
>>
>> And this is usually because there was a uninative-enabled build in
>> sstate cache which is now being reused for the non-uninative.
>> Let's see if I can reproduce it...
>
> Its in right direction, I could get the information from the worker machine
>
> build-renamed/tmp/work/x86_64-linux/mesa-native/25.0.2$ ./build/src/
> compiler/clc/mesa_clc
> -bash: ./build/src/compiler/clc/mesa_clc: cannot execute: required file
> not found
>
> if dump the ELF headers it looks for interpreter from a uninative path
> which is absolute and points to the location where it was built in
> another build
>
> [Requesting program interpreter: /srv/pokybuild/yocto-worker/
> meta-oe/build/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-
> x86-64.so.2]
>
> This file does not exist in current build.
I think I got the problem, its ldflags being injected from llvm-config
containing the buildtime paths where llvm/clang-native was built in, you
have sent a patch to fix it which is already applied to core, I missed
applying it to clang :(. I have applied it to all clang variants since
we use shared sources for all clang recipes, we need to keep source tree
in sync for all of them, also pushed it into the kraj/clang-merge-2
branch now. I think this should get us through this bump.
Would be good, to get some more feedback on how it plays out in your
testing.
>
>
>>
>>> Would appreciate help.
>>>
>>> On Thu, Apr 17, 2025 at 5:57 PM Dmitry Baryshkov via
>>> lists.openembedded.org
>>> <dmitry.baryshkov=oss.qualcomm.com@lists.openembedded.org> wrote:
>>>>
>>>> Several bugfixes after Mesa 25.0 recipe was merged:
>>>> - Replace the bindgen patches with meson-based fix (Dylan Baker)
>>>> - Bundle OpenCL C headers
>>>>
>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>>>> ---
>>>> Changes in v2:
>>>> - Dropped applied patches
>>>> - Add the bundle-opencl-headers patch
>>>> - Link to v1: https://lore.kernel.org/r/20250412-mesa-25-fixes-
>>>> v1-0-791840391271@oss.qualcomm.com
>>>>
>>>> ---
>>>> Dmitry Baryshkov (3):
>>>> meson: pass -target and -I to bindgen calls
>>>> mesa: drop the bindgen patch
>>>> mesa: bundle Clang OpenCL headers into meta-clc
>>>>
>>>> meta/classes-recipe/meson.bbclass | 1 +
>>>> ...d-an-option-to-force-inclusion-of-OpenCL-.patch | 57 ++++++++++
>>>> ++++++++
>>>> ...vide-cross-compilation-arguments-to-LLVM-.patch | 67
>>>> ----------------------
>>>> meta/recipes-graphics/mesa/mesa.inc | 9 +--
>>>> 4 files changed, 61 insertions(+), 73 deletions(-)
>>>> ---
>>>> base-commit: 53c772c941d5ce69ab89f35cd04724b740daf269
>>>> change-id: 20250411-mesa-25-fixes-5a38fe55dd3c
>>>>
>>>> Best regards,
>>>> --
>>>> Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>>>>
>>>>
>>>> -=-=-=-=-=-=-=-=-=-=-=-
>>>> Links: You receive all messages sent to this group.
>>>> View/Reply Online (#215115): https://lists.openembedded.org/g/
>>>> openembedded-core/message/215115
>>>> Mute This Topic: https://lists.openembedded.org/mt/112324544/1997914
>>>> Group Owner: openembedded-core+owner@lists.openembedded.org
>>>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/
>>>> unsub [raj.khem@gmail.com]
>>>> -=-=-=-=-=-=-=-=-=-=-=-
>>>>
>>
>>
>>
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2613 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 203 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-04-22 1:13 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-18 0:57 [PATCH v2 0/3] mesa: small improvements after 25.0 merge Dmitry Baryshkov
2025-04-18 0:57 ` [PATCH v2 1/3] meson: pass -target and -I to bindgen calls Dmitry Baryshkov
2025-04-18 0:57 ` [PATCH v2 2/3] mesa: drop the bindgen patch Dmitry Baryshkov
2025-04-18 0:57 ` [PATCH v2 3/3] mesa: bundle Clang OpenCL headers into meta-clc Dmitry Baryshkov
2025-04-21 15:21 ` [OE-core] [PATCH v2 0/3] mesa: small improvements after 25.0 merge Khem Raj
2025-04-21 19:32 ` Dmitry Baryshkov
2025-04-22 0:20 ` Khem Raj
2025-04-22 1:13 ` Khem Raj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.