* [PATCH 0/7] mesa: bump + lighten mesa libclc dependency
@ 2026-02-06 17:23 Quentin Schulz
2026-02-06 17:23 ` [PATCH 1/7] mesa: upgrade 25.3.3 -> 25.3.4 Quentin Schulz
` (6 more replies)
0 siblings, 7 replies; 13+ messages in thread
From: Quentin Schulz @ 2026-02-06 17:23 UTC (permalink / raw)
To: openembedded-core; +Cc: Quentin Schulz, Dmitry Baryshkov, Ross Burton
This bumps mesa to 25.3.4, the latest available stable release.
This removes an unnecessary native dependency (libxml2) which is only
required for unit tests, which we don't build or run yet.
This migrates mesa libclc PACKAGECONFIG to stop depending on mesa-native
recipe and instead depend on a newly introduced mesa-tools-native. The
benefits are:
- instead of building mesa-native with many drivers like we do
currently, we only build (with mesa-tools-native) tools necessary to
build libclc-dependent drivers in mesa,
- removing libclc, spirv-tools and spirv-llvm-translator target recipes
from dependencies. Those target recipes would be built for every
different CPU tune incurring a very high cost of building mesa for
separate machines. These dependencies will now only be necessary to
build in mesa-tools-native, in their native variant, which is shared
for all CPU tunes as it's only dependent on the host CPU architecture.
Unfortunately, those dependencies in their target variant are still
required for building rusticl (opencl),
libclc PACKAGECONFIG being selected by default for x86, x86-64 and i686
CPU TUNEs as well as for all Panthor/Panfrost-supported Rockchip SoCs,
the mesa-native dependency is now removed and only mesa-tools-native
will be built for those.
For a PX30 Rockchip SoC-based machine (default mesa PACKAGECONFIG for
poky + panfrost + libclc (see meta-rockchip mesa.bbappend)), the
difference in dependencies is the following (according to pn-buildlist
(bitbake -g mesa) before last two patches/after this series):
Removed: libclc, llvm, spirv-headers, spirv-llvm-translator,
spirv-tools, zstd, mesa-native.
Added: mesa-tools-native.
On a server with AMD EPYC 7443P (24-cores, 48 threads) and 130GiB of
DRAM, running
bitbake -c cleansstate libclc llvm spirv-headers spirv-llvm-translator spirv-tools zstd mesa-native mesa-tools-native mesa
between runs.
buildstats-diff --diff-attr walltime after-libxml2-removal/ after-this-series/
Ignoring tasks less than 00:05.0 (5.0s)
Ignoring differences less than 00:02.0 (2.0s)
PKG TASK ABSDIFF RELDIFF WALLTIME1 -> WALLTIME2
- llvm do_compile -450.6s -100.0% 450.6s -> 0.0s
- libclc do_compile -118.8s -100.0% 118.8s -> 0.0s
- mesa-native do_compile -106.0s -100.0% 106.0s -> 0.0s
- spirv-tools do_compile -94.9s -100.0% 94.9s -> 0.0s
- zstd do_compile -70.7s -100.0% 70.7s -> 0.0s
- spirv-llvm-translator do_compile -45.3s -100.0% 45.3s -> 0.0s
- mesa-native do_configure -35.4s -100.0% 35.4s -> 0.0s
- llvm do_package -34.6s -100.0% 34.6s -> 0.0s
- zstd do_install -31.1s -100.0% 31.1s -> 0.0s
- llvm do_configure -17.0s -100.0% 17.0s -> 0.0s
- libclc do_configure -13.2s -100.0% 13.2s -> 0.0s
- spirv-tools do_package -11.8s -100.0% 11.8s -> 0.0s
mesa do_compile -9.4s -15.4% 61.0s -> 51.6s
- zstd do_package -6.2s -100.0% 6.2s -> 0.0s
+ mesa-tools-native do_configure 6.3s +inf% 0.0s -> 6.3s
+ mesa-tools-native do_compile 30.8s +inf% 0.0s -> 30.8s
Cumulative walltime:
-1052.2s -90.0% 19:29.3 (1169.3s) -> 01:57.2 (117.2s)
With DISTRO_FEATURES:append = " opencl" (since that will re-add the
previous libclc PACKAGECONFIG dependencies and still require
mesa-tools-native for libclc PACKAGECONFING). The diff is only
mesa-tools-native added for mesa-native removed.
scripts/buildstats-diff --diff-attr walltime after-libxml2-removal/ after-this-series/
Ignoring tasks less than 00:05.0 (5.0s)
Ignoring differences less than 00:02.0 (2.0s)
PKG TASK ABSDIFF RELDIFF WALLTIME1 -> WALLTIME2
- mesa-native do_compile -55.2s -100.0% 55.2s -> 0.0s
- mesa-native do_configure -9.5s -100.0% 9.5s -> 0.0s
mesa do_compile -8.8s -13.3% 66.1s -> 57.3s
+ mesa-tools-native do_configure 6.3s +inf% 0.0s -> 6.3s
+ mesa-tools-native do_compile 30.5s +inf% 0.0s -> 30.5s
Cumulative walltime:
-37.1s -22.8% 02:42.8 (162.8s) -> 02:05.7 (125.7s)
The DISTRO_FEATURES:append = " opencl" from above has been removed for
the rest of the explanations.
For qemux86-64, the difference in dependencies is the following
(according to pn-buildlist (bitbake -g mesa) before last two
patches/after this series):
Removed: libclc, spirv-headers, spirv-llvm-translator, spirv-tools,
mesa-native.
Added: mesa-tools-native.
On a server with AMD EPYC 7443P (24-cores, 48 threads) and 130GiB of
DRAM, running
bitbake -c cleansstate libclc spirv-headers spirv-llvm-translator spirv-tools mesa-native mesa-tools-native mesa
between runs.
buildstats-diff --diff-attr walltime after-libxml2-removal/ after-this-series/
Ignoring tasks less than 00:05.0 (5.0s)
Ignoring differences less than 00:02.0 (2.0s)
PKG TASK ABSDIFF RELDIFF WALLTIME1 -> WALLTIME2
- libclc do_compile -115.9s -100.0% 115.9s -> 0.0s
- mesa-native do_compile -92.8s -100.0% 92.8s -> 0.0s
- spirv-tools do_compile -81.5s -100.0% 81.5s -> 0.0s
- spirv-llvm-translator do_compile -60.9s -100.0% 60.9s -> 0.0s
- mesa-native do_configure -38.1s -100.0% 38.1s -> 0.0s
- libclc do_configure -14.2s -100.0% 14.2s -> 0.0s
- spirv-tools do_package -13.3s -100.0% 13.3s -> 0.0s
+ mesa-tools-native do_configure 6.3s +inf% 0.0s -> 6.3s
+ mesa-tools-native do_compile 30.5s +inf% 0.0s -> 30.5s
Cumulative walltime:
-401.6s -70.3% 09:31.5 (571.5s) -> 02:49.9 (169.9s)
Since mesa-native is still built for qemu machines for the
qemu-system-native recipe and it has libclc enabled for Intel machines,
here's the impact now that mesa-native with libclc support depends on
mesa-tools-native:
scripts/buildstats-diff --diff-attr walltime --min-val 0 --min-absdiff 0
after-libxml2-removal/ after-this-series/
PKG TASK ABSDIFF RELDIFF WALLTIME1 -> WALLTIME2
mesa-native do_configure -0.5s -5.0% 9.0s -> 8.5s
mesa-native do_populate_sysroot -0.1s -11.1% 0.5s -> 0.5s
mesa-native do_write_config -0.0s -33.3% 0.0s -> 0.0s
mesa-native do_patch -0.0s -3.8% 0.3s -> 0.2s
mesa-native do_install -0.0s -0.0% 0.4s -> 0.4s
mesa-native do_prepare_recipe_sysroot 0.0s +0.0% 0.4s -> 0.4s
mesa-native do_rust_gen_targets 0.0s +0.0% 0.0s -> 0.0s
mesa-native do_recipe_qa 0.0s +0.0% 0.0s -> 0.0s
mesa-native do_populate_lic 0.0s +0.0% 0.0s -> 0.0s
mesa-native do_create_spdx 0.0s +0.0% 0.1s -> 0.1s
mesa-native do_create_package_spdx 0.0s +0.0% 0.0s -> 0.0s
+ mesa-tools-native do_rust_gen_targets 0.0s +inf% 0.0s -> 0.0s
+ mesa-tools-native do_fetch 0.0s +inf% 0.0s -> 0.0s
mesa-native do_rust_create_wrappers 0.0s +33.3% 0.0s -> 0.0s
mesa-native do_deploy_source_date_epoch 0.0s +20.0% 0.0s -> 0.1s
mesa-native do_unpack 0.0s +0.7% 1.4s -> 1.4s
+ mesa-tools-native do_write_config 0.0s +inf% 0.0s -> 0.0s
+ mesa-tools-native do_recipe_qa 0.0s +inf% 0.0s -> 0.0s
+ mesa-tools-native do_rust_create_wrappers 0.0s +inf% 0.0s -> 0.0s
+ mesa-tools-native do_deploy_source_date_epoch 0.1s +inf% 0.0s -> 0.1s
+ mesa-tools-native do_collect_spdx_deps 0.1s +inf% 0.0s -> 0.1s
+ mesa-tools-native do_create_spdx 0.1s +inf% 0.0s -> 0.1s
mesa-native do_collect_spdx_deps 0.1s +157.1% 0.1s -> 0.2s
+ mesa-tools-native do_patch 0.2s +inf% 0.0s -> 0.2s
+ mesa-tools-native do_install 0.3s +inf% 0.0s -> 0.3s
+ mesa-tools-native do_populate_sysroot 0.3s +inf% 0.0s -> 0.3s
+ mesa-tools-native do_prepare_recipe_sysroot 0.4s +inf% 0.0s -> 0.4s
mesa-native do_compile 0.7s +1.3% 54.0s -> 54.6s
mesa-native do_fetch 1.3s +12700.0% 0.0s -> 1.3s
+ mesa-tools-native do_unpack 1.4s +inf% 0.0s -> 1.4s
+ mesa-tools-native do_configure 6.3s +inf% 0.0s -> 6.3s
+ mesa-tools-native do_compile 30.9s +inf% 0.0s -> 30.9s
Cumulative walltime:
41.8s +63.1% 01:06.3 (66.3s) -> 01:48.1 (108.1s)
I think the added 42s for qemux86-64 mesa-native recipe is worth the
tens of minutes saved for every other machine building target mesa only
which depend on libclc PACKAGECONFIG (less benefit when gallium-llvm is
selected though; and not much when building with opencl).
This was tested on PX30, RK3399 and RK3588 (panfrost/panthor drivers),
kmscube still runs. I only had devices with broken display support so I
can only say that kmscube runs with the expected renderer.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
Quentin Schulz (7):
mesa: upgrade 25.3.3 -> 25.3.4
mesa: update patch status
mesa: make expat dependency a PACKAGECONFIG
mesa: make zlib dependency a PACKAGECONFIG
mesa: remove libxml2-native dependency
add mesa-tools native-only recipe
mesa: depend on mesa-tools-native for less expensive libclc dependency
meta/conf/distro/include/maintainers.inc | 1 +
...on-t-dump-genvk.py-args-to-generated-file.patch | 14 ++++++------
meta/recipes-graphics/mesa/mesa-gl.bb | 2 +-
meta/recipes-graphics/mesa/mesa-tools-native.bb | 19 ++++++++++++++++
meta/recipes-graphics/mesa/mesa.bb | 2 ++
meta/recipes-graphics/mesa/mesa.inc | 25 ++++++++++------------
6 files changed, 42 insertions(+), 21 deletions(-)
---
base-commit: 6ce19709f7835ee5cd7915e181f89397975236c8
change-id: 20260205-mesa-tools-native-afab5b8d0d21
Best regards,
--
Quentin Schulz <quentin.schulz@cherry.de>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/7] mesa: upgrade 25.3.3 -> 25.3.4
2026-02-06 17:23 [PATCH 0/7] mesa: bump + lighten mesa libclc dependency Quentin Schulz
@ 2026-02-06 17:23 ` Quentin Schulz
2026-02-06 17:23 ` [PATCH 2/7] mesa: update patch status Quentin Schulz
` (5 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Quentin Schulz @ 2026-02-06 17:23 UTC (permalink / raw)
To: openembedded-core; +Cc: Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
Upgrade mesa to the latest stable release.
See https://docs.mesa3d.org/relnotes/25.3.4.html for release notes and
sha256sum.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
meta/recipes-graphics/mesa/mesa.inc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 1607fddd4b..d075210015 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -22,8 +22,8 @@ SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \
file://0002-rocket-drop-file-names-from-the-generated-file.patch \
"
-SRC_URI[sha256sum] = "05328b3891c000e6a110a3e7321d8bfbb21631d132bf86bd3d4a8f45c535ef6b"
-PV = "25.3.3"
+SRC_URI[sha256sum] = "3a0fc6ec070b45ae25dc2ccb5e52fae1d89141f7c39c4a91fe4eaa80dfff9deb"
+PV = "25.3.4"
UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/7] mesa: update patch status
2026-02-06 17:23 [PATCH 0/7] mesa: bump + lighten mesa libclc dependency Quentin Schulz
2026-02-06 17:23 ` [PATCH 1/7] mesa: upgrade 25.3.3 -> 25.3.4 Quentin Schulz
@ 2026-02-06 17:23 ` Quentin Schulz
2026-02-06 17:23 ` [PATCH 3/7] mesa: make expat dependency a PACKAGECONFIG Quentin Schulz
` (4 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Quentin Schulz @ 2026-02-06 17:23 UTC (permalink / raw)
To: openembedded-core; +Cc: Quentin Schulz, Dmitry Baryshkov
From: Quentin Schulz <quentin.schulz@cherry.de>
This patch was actually merged in main branch, so let's update the patch
status to reflect that.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
...stream-don-t-dump-genvk.py-args-to-generated-file.patch | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/meta/recipes-graphics/mesa/files/0001-gfxstream-don-t-dump-genvk.py-args-to-generated-file.patch b/meta/recipes-graphics/mesa/files/0001-gfxstream-don-t-dump-genvk.py-args-to-generated-file.patch
index 097ca84e3b..df4db15559 100644
--- a/meta/recipes-graphics/mesa/files/0001-gfxstream-don-t-dump-genvk.py-args-to-generated-file.patch
+++ b/meta/recipes-graphics/mesa/files/0001-gfxstream-don-t-dump-genvk.py-args-to-generated-file.patch
@@ -1,23 +1,25 @@
-From c0f067e86bc9f7fbc60c2539dc612a050ee2569f Mon Sep 17 00:00:00 2001
+From 4315c28739dcade156ac9384c99ba552b6d85b40 Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Date: Wed, 19 Nov 2025 11:36:42 +0200
Subject: [PATCH] gfxstream: don't dump genvk.py args to generated files
Full command lines include full path to the output file, which triggers
-the 'buildpath' QA warning. Drop the args and print only a basename of
-the script used to generate the file.
+reproducibility warnings (e.g. in Yocto builds). Drop the args and print
+only a basename of the script used to generate the file.
-Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38875]
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38875>
+Upstream-Status: Backport [https://gitlab.freedesktop.org/mesa/mesa/-/commit/4315c28739dcade156ac9384c99ba552b6d85b40]
+Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
src/gfxstream/codegen/scripts/cerealgenerator.py | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/gfxstream/codegen/scripts/cerealgenerator.py b/src/gfxstream/codegen/scripts/cerealgenerator.py
-index 077571e9eda5..217c3e1d0e94 100644
+index a171af83641..5e34ea64bd1 100644
--- a/src/gfxstream/codegen/scripts/cerealgenerator.py
+++ b/src/gfxstream/codegen/scripts/cerealgenerator.py
-@@ -254,13 +254,7 @@ def banner_command(argv):
+@@ -285,13 +285,7 @@ def banner_command(argv):
Return a string corresponding to the command, with platform-specific
paths removed."""
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/7] mesa: make expat dependency a PACKAGECONFIG
2026-02-06 17:23 [PATCH 0/7] mesa: bump + lighten mesa libclc dependency Quentin Schulz
2026-02-06 17:23 ` [PATCH 1/7] mesa: upgrade 25.3.3 -> 25.3.4 Quentin Schulz
2026-02-06 17:23 ` [PATCH 2/7] mesa: update patch status Quentin Schulz
@ 2026-02-06 17:23 ` Quentin Schulz
2026-02-06 17:23 ` [PATCH 4/7] mesa: make zlib " Quentin Schulz
` (3 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Quentin Schulz @ 2026-02-06 17:23 UTC (permalink / raw)
To: openembedded-core; +Cc: Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
expat is a mesa meson feature which can be disabled so let's make it a
PACKAGECONFIG.
The motivation actually isn't about disabling it (though we now could as
it's only required for a few things) but rather that this dependency is
a non-native one.
The issue is when a native-only (-native recipe name suffix + inherit
native) recipe includes mesa.inc, it'll include the DEPENDS as well but
will then depend on a non-native recipe because BitBake doesn't add a
suffix to dependencies listed in DEPENDS for native-only recipes like it
does for recipes with BBCLASSEXTEND = native. This is a way to
circumvent the issue by making the dependency a PACKAGECONFIG dependency
such that the listed DEPENDS (third parameter) will be properly modified
by BitBake to have the native variant of the recipe pulled in. See[1]
for more info on why this is needed.
Now that expat is a PACKAGECONFIG and that if it's not there expat isn't
autodetected anymore by meson, having xmlconfig PACKAGECONFIG add expat
as a DEPENDS (third parameter) is likely not enough anymore due to expat
feature being explicitly disabled if expat is not in PACKAGECONFIG.
Therefore, remove the third parameter for xmlconfig and add a comment
telling the user there's a PACKAGECONFIG dependency here. Note that
since this commit adds the expat PACKAGECONFIG to all recipes including
mesa.inc, no change in behavior is expected.
This is in preparation for the addition of a mesa-tools-native
native-only package which will include mesa.inc.
[1] https://lore.kernel.org/openembedded-core/07cd1d3c-4d67-4e60-b3d3-75953784f70f@cherry.de/
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
meta/recipes-graphics/mesa/mesa-gl.bb | 2 +-
meta/recipes-graphics/mesa/mesa.bb | 1 +
meta/recipes-graphics/mesa/mesa.inc | 6 ++++--
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/meta/recipes-graphics/mesa/mesa-gl.bb b/meta/recipes-graphics/mesa/mesa-gl.bb
index 3b55d2b77e..fe32e74744 100644
--- a/meta/recipes-graphics/mesa/mesa-gl.bb
+++ b/meta/recipes-graphics/mesa/mesa-gl.bb
@@ -7,7 +7,7 @@ PROVIDES = "virtual/libgl virtual/mesa"
TARGET_CFLAGS = "-I${STAGING_INCDIR}/drm"
# At least one DRI rendering engine is required to build mesa.
-PACKAGECONFIG = "opengl gallium ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} xmlconfig"
+PACKAGECONFIG = "expat opengl gallium ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} xmlconfig"
PACKAGECONFIG:append:x86 = " libclc gallium-llvm intel amd nouveau svga"
PACKAGECONFIG:append:x86-64 = " libclc gallium-llvm intel amd nouveau svga"
diff --git a/meta/recipes-graphics/mesa/mesa.bb b/meta/recipes-graphics/mesa/mesa.bb
index 2c9a38cf65..2db08727fe 100644
--- a/meta/recipes-graphics/mesa/mesa.bb
+++ b/meta/recipes-graphics/mesa/mesa.bb
@@ -1,6 +1,7 @@
require ${BPN}.inc
PACKAGECONFIG = " \
+ expat \
gallium \
video-codecs \
${@bb.utils.filter('DISTRO_FEATURES', 'x11 vulkan wayland glvnd', d)} \
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index d075210015..35b7e5a09a 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -43,7 +43,7 @@ do_install:append() {
fi
}
-DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native python3-pyyaml-native"
+DEPENDS = "makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native python3-pyyaml-native"
EXTRANATIVEPATH += "chrpath-native"
inherit meson pkgconfig python3native gettext features_check rust
@@ -162,8 +162,10 @@ TOOLS .= "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}
# dependencies for tools.
TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ncurses libconfig libxml2 ', '', d)}"
+PACKAGECONFIG[expat] = "-Dexpat=enabled, -Dexpat=disabled, expat"
PACKAGECONFIG[tools] = "-Dtools=${@strip_comma('${TOOLS}')}, -Dtools='', ${TOOLS_DEPS}"
-PACKAGECONFIG[xmlconfig] = "-Dxmlconfig=enabled, -Dxmlconfig=disabled, expat"
+# Depends on expat PACKAGECONFIG!
+PACKAGECONFIG[xmlconfig] = "-Dxmlconfig=enabled, -Dxmlconfig=disabled"
GALLIUMDRIVERS_LLVMPIPE = ",llvmpipe"
GALLIUMDRIVERS_SOFTPIPE = ",softpipe"
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 4/7] mesa: make zlib dependency a PACKAGECONFIG
2026-02-06 17:23 [PATCH 0/7] mesa: bump + lighten mesa libclc dependency Quentin Schulz
` (2 preceding siblings ...)
2026-02-06 17:23 ` [PATCH 3/7] mesa: make expat dependency a PACKAGECONFIG Quentin Schulz
@ 2026-02-06 17:23 ` Quentin Schulz
2026-02-06 17:23 ` [PATCH 5/7] mesa: remove libxml2-native dependency Quentin Schulz
` (2 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Quentin Schulz @ 2026-02-06 17:23 UTC (permalink / raw)
To: openembedded-core; +Cc: Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
zlib is a mesa meson feature which can be disabled so let's make it a
PACKAGECONFIG.
The motivation actually isn't about disabling it (though we now could as
it's only required for a few things) but rather that this dependency is
a non-native one.
The issue is when a native-only (-native recipe name suffix + inherit
native) recipe includes mesa.inc, it'll include the DEPENDS as well but
will then depend on a non-native recipe because BitBake doesn't add a
suffix to dependencies listed in DEPENDS for native-only recipes like it
does for recipes with BBCLASSEXTEND = native. This is a way to
circumvent the issue by making the dependency a PACKAGECONFIG dependency
such that the listed DEPENDS (third parameter) will be properly modified
by BitBake to have the native variant of the recipe pulled in. See[1]
for more info on why this is needed.
This is in preparation for the addition of a mesa-tools-native
native-only package which will include mesa.inc.
[1] https://lore.kernel.org/openembedded-core/07cd1d3c-4d67-4e60-b3d3-75953784f70f@cherry.de/
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
meta/recipes-graphics/mesa/mesa-gl.bb | 2 +-
meta/recipes-graphics/mesa/mesa.bb | 1 +
meta/recipes-graphics/mesa/mesa.inc | 4 +++-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-graphics/mesa/mesa-gl.bb b/meta/recipes-graphics/mesa/mesa-gl.bb
index fe32e74744..eb0ee53af5 100644
--- a/meta/recipes-graphics/mesa/mesa-gl.bb
+++ b/meta/recipes-graphics/mesa/mesa-gl.bb
@@ -7,7 +7,7 @@ PROVIDES = "virtual/libgl virtual/mesa"
TARGET_CFLAGS = "-I${STAGING_INCDIR}/drm"
# At least one DRI rendering engine is required to build mesa.
-PACKAGECONFIG = "expat opengl gallium ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} xmlconfig"
+PACKAGECONFIG = "expat opengl gallium ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} xmlconfig zlib"
PACKAGECONFIG:append:x86 = " libclc gallium-llvm intel amd nouveau svga"
PACKAGECONFIG:append:x86-64 = " libclc gallium-llvm intel amd nouveau svga"
diff --git a/meta/recipes-graphics/mesa/mesa.bb b/meta/recipes-graphics/mesa/mesa.bb
index 2db08727fe..66c8f9c372 100644
--- a/meta/recipes-graphics/mesa/mesa.bb
+++ b/meta/recipes-graphics/mesa/mesa.bb
@@ -10,6 +10,7 @@ PACKAGECONFIG = " \
${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 'zink', '', d)} \
${@bb.utils.contains_any('DISTRO_FEATURES', 'opengl vulkan', 'virtio', '', d)} \
xmlconfig \
+ zlib \
"
PACKAGECONFIG:append:x86 = " libclc gallium-llvm intel amd nouveau svga"
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 35b7e5a09a..b2dfc6130d 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -43,7 +43,8 @@ do_install:append() {
fi
}
-DEPENDS = "makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native python3-pyyaml-native"
+# All dependencies **MUST** be -native. If not, then add a PACKAGECONFIG for it.
+DEPENDS = "makedepend-native flex-native bison-native libxml2-native chrpath-replacement-native python3-mako-native gettext-native python3-pyyaml-native"
EXTRANATIVEPATH += "chrpath-native"
inherit meson pkgconfig python3native gettext features_check rust
@@ -166,6 +167,7 @@ PACKAGECONFIG[expat] = "-Dexpat=enabled, -Dexpat=disabled, expat"
PACKAGECONFIG[tools] = "-Dtools=${@strip_comma('${TOOLS}')}, -Dtools='', ${TOOLS_DEPS}"
# Depends on expat PACKAGECONFIG!
PACKAGECONFIG[xmlconfig] = "-Dxmlconfig=enabled, -Dxmlconfig=disabled"
+PACKAGECONFIG[zlib] = "-Dzlib=enabled, -Dzlib=disabled, zlib"
GALLIUMDRIVERS_LLVMPIPE = ",llvmpipe"
GALLIUMDRIVERS_SOFTPIPE = ",softpipe"
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 5/7] mesa: remove libxml2-native dependency
2026-02-06 17:23 [PATCH 0/7] mesa: bump + lighten mesa libclc dependency Quentin Schulz
` (3 preceding siblings ...)
2026-02-06 17:23 ` [PATCH 4/7] mesa: make zlib " Quentin Schulz
@ 2026-02-06 17:23 ` Quentin Schulz
2026-02-06 17:23 ` [PATCH 6/7] add mesa-tools native-only recipe Quentin Schulz
2026-02-06 17:23 ` [PATCH 7/7] mesa: depend on mesa-tools-native for less expensive libclc dependency Quentin Schulz
6 siblings, 0 replies; 13+ messages in thread
From: Quentin Schulz @ 2026-02-06 17:23 UTC (permalink / raw)
To: openembedded-core; +Cc: Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
Native libxml2 is only needed for xmllint which in turn is only needed
when build-tests meson option is enabled, which defaults to disabled and
isn't enabled by the recipe.
We may need to revisit this if we add ptest support in mesa I assume.
Let's remove it from the DEPENDS for now.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
meta/recipes-graphics/mesa/mesa.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index b2dfc6130d..8e5f9657fd 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -44,7 +44,7 @@ do_install:append() {
}
# All dependencies **MUST** be -native. If not, then add a PACKAGECONFIG for it.
-DEPENDS = "makedepend-native flex-native bison-native libxml2-native chrpath-replacement-native python3-mako-native gettext-native python3-pyyaml-native"
+DEPENDS = "makedepend-native flex-native bison-native chrpath-replacement-native python3-mako-native gettext-native python3-pyyaml-native"
EXTRANATIVEPATH += "chrpath-native"
inherit meson pkgconfig python3native gettext features_check rust
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 6/7] add mesa-tools native-only recipe
2026-02-06 17:23 [PATCH 0/7] mesa: bump + lighten mesa libclc dependency Quentin Schulz
` (4 preceding siblings ...)
2026-02-06 17:23 ` [PATCH 5/7] mesa: remove libxml2-native dependency Quentin Schulz
@ 2026-02-06 17:23 ` Quentin Schulz
2026-02-06 17:31 ` Patchtest results for " patchtest
2026-02-06 17:23 ` [PATCH 7/7] mesa: depend on mesa-tools-native for less expensive libclc dependency Quentin Schulz
6 siblings, 1 reply; 13+ messages in thread
From: Quentin Schulz @ 2026-02-06 17:23 UTC (permalink / raw)
To: openembedded-core; +Cc: Quentin Schulz, Ross Burton
From: Quentin Schulz <quentin.schulz@cherry.de>
libclc is required for some drivers (asahi, panfrost and intel at the
very least).
libclc brings very expensive dependencies such as llvm (through its
spirv-llvm-translator dependency) and clang.
Building clang and llvm for each target architecture is very expensive,
but mesa allows to depend on prebuilt host binaries (mesa-clc and
precomp-compiler). Those are built by mesa as well, but can be compiled
in mesa-native instead of mesa, making the dependency expensive but only
once regardless of the number of target architectures to build for.
Ideally the mesa-clc and precomp-compiler would only be compiled in
mesa-native if target mesa requires libclc support, however this is not
possible as a target recipe cannot impact or depend on a native recipe's
configuration. We thus have two choices, always build libclc in
mesa-native with its heavy dependencies and impact every build, or force
the user to modify the mesa-native recipe in a custom layer (as a native
recipe cannot use target's OVERRIDES). The latter is unacceptable so the
former seems to be the only option. Another big downside is that
mesa-native currently builds drivers (amd, nouveau, svga) which we may
have absolutely no interest in building, increasing the build time and
possibly dependencies list.
A third choice is to spin-off the native mesa recipe with libclc support
into a new recipe without drivers and only what's necessary to build
mesa-clc and precomp-compiler binaries.
This allows to keep a "clean" mesa-native recipe for whoever needs those
drivers built-in (e.g. for testing, for qemu-native, or whatever else)
and only bring the libclc dependency when required by the target recipe.
This is the native mesa tool recipe from the third choice. The next
commit will make use of it in the mesa recipes.
Suggested-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
meta/conf/distro/include/maintainers.inc | 1 +
meta/recipes-graphics/mesa/mesa-tools-native.bb | 19 +++++++++++++++++++
2 files changed, 20 insertions(+)
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index b231daf485..40b1c45a4f 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -525,6 +525,7 @@ RECIPE_MAINTAINER:pn-menu-cache = "Ross Burton <ross.burton@arm.com>"
RECIPE_MAINTAINER:pn-mesa = "Unassigned <unassigned@yoctoproject.org>"
RECIPE_MAINTAINER:pn-mesa-demos = "Unassigned <unassigned@yoctoproject.org>"
RECIPE_MAINTAINER:pn-mesa-gl = "Unassigned <unassigned@yoctoproject.org>"
+RECIPE_MAINTAINER:pn-mesa-tools-native = "Unassigned <unassigned@yoctoproject.org>"
RECIPE_MAINTAINER:pn-meson = "Trevor Gamblin <tgamblin@baylibre.com>"
RECIPE_MAINTAINER:pn-meta-environment-${MACHINE} = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER:pn-meta-environment-extsdk-${MACHINE} = "Richard Purdie <richard.purdie@linuxfoundation.org>"
diff --git a/meta/recipes-graphics/mesa/mesa-tools-native.bb b/meta/recipes-graphics/mesa/mesa-tools-native.bb
new file mode 100644
index 0000000000..50d2f5cbb0
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-tools-native.bb
@@ -0,0 +1,19 @@
+require mesa.inc
+inherit_defer native
+
+SUMMARY += " (tools only)"
+
+PACKAGECONFIG = "tools asahi panfrost"
+# llvm required for libclc
+PACKAGECONFIG += "gallium-llvm"
+# Doesn't compile without wayland-scanner if PLATFORMS has wayland in, and,
+# doesn't compile at all if PLATFORMS is empty so add x11 and wayland
+# to PACKAGECONFIG like in mesa.inc
+PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'x11 wayland', d)}"
+
+DEPENDS += "libclc-native spirv-tools-native spirv-llvm-translator-native"
+
+EXTRA_OEMESON += " \
+ -Dmesa-clc=enabled -Dinstall-mesa-clc=true -Dmesa-clc-bundle-headers=enabled \
+ -Dprecomp-compiler=enabled -Dinstall-precomp-compiler=true \
+"
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 7/7] mesa: depend on mesa-tools-native for less expensive libclc dependency
2026-02-06 17:23 [PATCH 0/7] mesa: bump + lighten mesa libclc dependency Quentin Schulz
` (5 preceding siblings ...)
2026-02-06 17:23 ` [PATCH 6/7] add mesa-tools native-only recipe Quentin Schulz
@ 2026-02-06 17:23 ` Quentin Schulz
2026-03-20 15:26 ` ernestvanhoecke
6 siblings, 1 reply; 13+ messages in thread
From: Quentin Schulz @ 2026-02-06 17:23 UTC (permalink / raw)
To: openembedded-core; +Cc: Quentin Schulz, Ross Burton
From: Quentin Schulz <quentin.schulz@cherry.de>
libclc is required for some drivers (asahi, panfrost and intel at the
very least).
libclc brings very expensive per-target dependencies such as llvm and
clang.
However, we can make libclc depend on native tools (mesa-clc and
precomp-compiler via mesa-tools-native) such that this cost exists only
once (for the native build machine) and not for each machine to build.
So this migrates the libclc dependency to make use of the newly
introduced mesa-tools-native to make use of mesa-clc=system and
precomp-compiler=system.
We told the user to have libclc PACKAGECONFIG when selecting opencl
PACKAGECONFIG but its dependencies are now gone since we're using
mesa-tools-native for libclc. Therefore, this also moves the previous
dependencies of libclc PACKAGECONFIG to opencl such that we can still
build rusticl which still requires all dependencies from previous
implementation of libclc (as specified in meson.build[1][2][3][4]).
For some reason, libclc PACKAGECONFIG is still required otherwise
rusticl fails to build with the following (stripped) message:
"""
FAILED: [code=101] src/gallium/frontends/rusticl/rusticl_libc_bindings.rs
/build/tmp/work/cortexa35-poky-linux/mesa/25.3.3/recipe-sysroot-native/usr/bin/bindgen
../sources/mesa-25.3.3/src/gallium/frontends/rusticl/rusticl_libc_bindings.h
--output /build/tmp/work/cortexa35-poky-linux/mesa/25.3.3/build/src/gallium/frontends/rusticl/rusticl_libc_bindings.rs
[...]
-MD -MQ ../sources/mesa-25.3.3/src/gallium/frontends/rusticl/rusticl_libc_bindings.h
-MF src/gallium/frontends/rusticl/rusticl_libc_bindings.h.d
thread 'main' (3601157) panicked at bindgen/lib.rs:616:27:
Unable to find libclang: "couldn't find any valid shared libraries
matching: ['libclang.so', 'libclang-*.so', 'libclang.so.*',
'libclang-*.so.*'], set the `LIBCLANG_PATH` environment variable to a
path where one of these files can be found (invalid: [])"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
"""
libclang.so is available in the sysroot. Exporting LIBCLANG_PATH with
"${STAGING_LIB_DIR}" in the recipe doesn't do anything.
So for now, we keep telling the user to add libclc PACKAGECONFIG when
opencl is selected (and keep it in mesa.bb when DISTRO_FEATURES has
opencl) and maybe can figure out why we cannot build rusticl without
libclc PACKAGECONFIG later on. I'm also not sure if the
Note that does mean that when selecting opencl, mesa will bring the
expensive dependencies again, but I'm not sure there's anything we can
do about that at the moment.
[1] https://gitlab.freedesktop.org/mesa/mesa/-/blob/mesa-25.3.4/meson.build?ref_type=tags#L838-L839
[2] https://gitlab.freedesktop.org/mesa/mesa/-/blob/mesa-25.3.4/meson.build?ref_type=tags#L850-L852
[3] https://gitlab.freedesktop.org/mesa/mesa/-/blob/mesa-25.3.4/meson.build?ref_type=tags#L1849-L1850
[4] https://gitlab.freedesktop.org/mesa/mesa/-/blob/mesa-25.3.4/meson.build?ref_type=tags#L1855-L1856
Suggested-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
meta/recipes-graphics/mesa/mesa.inc | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 8e5f9657fd..48cd9981c2 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -90,9 +90,9 @@ PACKAGECONFIG[glvnd] = "-Dglvnd=enabled, -Dglvnd=disabled, libglvnd"
PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false"
-# "opencl" also requires libclc and gallium-llvm to be present in PKGCONFIG!
+# "opencl" also requires libclc and gallium-llvm to be present in PACKAGECONFIG!
# Be sure to enable them both for the target and for the native build.
-PACKAGECONFIG[opencl] = "-Dgallium-rusticl=true -Dmesa-clc-bundle-headers=enabled, -Dgallium-rusticl=false, bindgen-cli-native clang"
+PACKAGECONFIG[opencl] = "-Dgallium-rusticl=true -Dmesa-clc-bundle-headers=enabled, -Dgallium-rusticl=false, bindgen-cli-native clang libclc spirv-tools spirv-llvm-translator"
X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr xorgproto libxshmfence"
# "x11" requires "opengl"
@@ -203,14 +203,7 @@ GALLIUMDRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'zink', ',zink', '', d)
PACKAGECONFIG[gallium] = "-Dgallium-drivers=${@strip_comma('${GALLIUMDRIVERS}')}, -Dgallium-drivers='', libdrm"
PACKAGECONFIG[gallium-llvm] = "-Dllvm=enabled -Dshared-llvm=enabled, -Dllvm=disabled, llvm llvm-native elfutils"
-MESA_CLC = "system"
-MESA_CLC:class-native = "enabled"
-INSTALL_MESA_CLC = "false"
-INSTALL_MESA_CLC:class-native = "true"
-MESA_NATIVE = "mesa-native"
-MESA_NATIVE:class-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[libclc] = "-Dmesa-clc=system -Dprecomp-compiler=system,,mesa-tools-native"
PACKAGECONFIG[va] = "-Dgallium-va=enabled,-Dgallium-va=disabled,libva-initial"
PACKAGECONFIG[perfetto] = "-Dperfetto=true,-Dperfetto=false,libperfetto"
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Patchtest results for [PATCH 6/7] add mesa-tools native-only recipe
2026-02-06 17:23 ` [PATCH 6/7] add mesa-tools native-only recipe Quentin Schulz
@ 2026-02-06 17:31 ` patchtest
0 siblings, 0 replies; 13+ messages in thread
From: patchtest @ 2026-02-06 17:31 UTC (permalink / raw)
To: Quentin Schulz; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 2215 bytes --]
Thank you for your submission. Patchtest identified one
or more issues with the patch. Please see the log below for
more information:
---
Testing patch /home/patchtest/share/mboxes/6-7-add-mesa-tools-native-only-recipe.patch
FAIL: test shortlog format: Commit shortlog (first line of commit message) should follow the format "<target>: <summary>" (test_mbox.TestMbox.test_shortlog_format)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list)
SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
---
Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this
email with an explanation of why the patch should be accepted. If you
believe these results are due to an error in patchtest, please submit a
bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category
under 'Yocto Project Subprojects'). For more information on specific
failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank
you!
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 7/7] mesa: depend on mesa-tools-native for less expensive libclc dependency
2026-02-06 17:23 ` [PATCH 7/7] mesa: depend on mesa-tools-native for less expensive libclc dependency Quentin Schulz
@ 2026-03-20 15:26 ` ernestvanhoecke
2026-03-20 15:57 ` Quentin Schulz
0 siblings, 1 reply; 13+ messages in thread
From: ernestvanhoecke @ 2026-03-20 15:26 UTC (permalink / raw)
To: Quentin Schulz; +Cc: openembedded-core, Quentin Schulz, Ross Burton
Hi Quentin,
Recently our do_configure task of mesa started failing with the
following error:
| Program pco_clc found: NO
|
| ../sources/mesa-26.0.1/src/imagination/pco/uscgen/meson.build:7:17: ERROR: Program 'pco_clc' not found or not executable
|
| A full log can be found at /var/home/vhe/build/tdxref/master-extint/build/tmp/work/aarch64-tdx-linux/mesa/26.0.1/build/meson-logs/meson-log.txt
|
| Last 10 lines of meson-log.txt:
| int i;
|
| Cached compiler stdout:
|
| Cached compiler stderr:
|
| Compiler for C supports arguments -Werror=pointer-arith: YES (cached)
| Program pco_clc found: NO
|
| ../sources/mesa-26.0.1/src/imagination/pco/uscgen/meson.build:7:17: ERROR: Program 'pco_clc' not found or not executable
|
| ERROR: meson setup failed
| WARNING: /var/home/vhe/build/tdxref/master-extint/build/tmp/work/aarch64-tdx-linux/mesa/26.0.1/temp/run.do_configure.144042:173 exit 1 from 'exit 1'
Reverting this patch fixes the issue, but it does not seem to be the
commit that introduced the problem. It only started later, presumably
something changed in pulling in libclc or a similar issue.
I can bisect it more later but already wanted to ask if you or someone
else had any ideas. Thanks!
Kind regards,
Ernest
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 7/7] mesa: depend on mesa-tools-native for less expensive libclc dependency
2026-03-20 15:26 ` ernestvanhoecke
@ 2026-03-20 15:57 ` Quentin Schulz
2026-03-26 11:10 ` [OE-core] " Quentin Schulz
0 siblings, 1 reply; 13+ messages in thread
From: Quentin Schulz @ 2026-03-20 15:57 UTC (permalink / raw)
To: Ernest Van Hoecke, Quentin Schulz; +Cc: openembedded-core, Ross Burton
Hi Ernest,
On 3/20/26 4:26 PM, Ernest Van Hoecke wrote:
> Hi Quentin,
>
> Recently our do_configure task of mesa started failing with the
> following error:
>
> | Program pco_clc found: NO
> |
> | ../sources/mesa-26.0.1/src/imagination/pco/uscgen/meson.build:7:17: ERROR: Program 'pco_clc' not found or not executable
> |
> | A full log can be found at /var/home/vhe/build/tdxref/master-extint/build/tmp/work/aarch64-tdx-linux/mesa/26.0.1/build/meson-logs/meson-log.txt
> |
> | Last 10 lines of meson-log.txt:
> | int i;
> |
> | Cached compiler stdout:
> |
> | Cached compiler stderr:
> |
> | Compiler for C supports arguments -Werror=pointer-arith: YES (cached)
> | Program pco_clc found: NO
> |
> | ../sources/mesa-26.0.1/src/imagination/pco/uscgen/meson.build:7:17: ERROR: Program 'pco_clc' not found or not executable
> |
> | ERROR: meson setup failed
> | WARNING: /var/home/vhe/build/tdxref/master-extint/build/tmp/work/aarch64-tdx-linux/mesa/26.0.1/temp/run.do_configure.144042:173 exit 1 from 'exit 1'
>
> Reverting this patch fixes the issue, but it does not seem to be the
> commit that introduced the problem. It only started later, presumably
> something changed in pulling in libclc or a similar issue.
>
> I can bisect it more later but already wanted to ask if you or someone
> else had any ideas. Thanks!
>
I suspect you need
diff --git a/meta/recipes-graphics/mesa/mesa-tools-native.bb
b/meta/recipes-graphics/mesa/mesa-tools-native.bb
index 50d2f5cbb0..0fff6ef1dd 100644
--- a/meta/recipes-graphics/mesa/mesa-tools-native.bb
+++ b/meta/recipes-graphics/mesa/mesa-tools-native.bb
@@ -3,7 +3,7 @@ inherit_defer native
SUMMARY += " (tools only)"
-PACKAGECONFIG = "tools asahi panfrost"
+PACKAGECONFIG = "tools asahi imagination panfrost"
# llvm required for libclc
PACKAGECONFIG += "gallium-llvm"
# Doesn't compile without wayland-scanner if PLATFORMS has wayland in,
and,
and possibly
diff --git a/meta/recipes-graphics/mesa/mesa.inc
b/meta/recipes-graphics/mesa/mesa.inc
index 14dc7b6c51..44d3d17a52 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -137,7 +137,7 @@ VULKAN_DRIVERS .=
"${@bb.utils.contains('PACKAGECONFIG', 'asahi libclc gallium-l
VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'broadcom',
',broadcom', '', d)}"
VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'freedreno',
',freedreno', '', d)}"
VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'virtio',
',gfxstream', '', d)}"
-VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'imagination',
',imagination', '', d)}"
+VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'imagination
libclc', ',imagination', '', d)}"
VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'intel libclc
gallium-llvm', ',intel', '', d)}"
VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'intel
libclc', ',intel_hasvk', '', d)}"
VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'panfrost
libclc', ',panfrost', '', d)}"
It would help if you could provide the PACKAGECONFIG you're using and
ideally a minimal reproducer so we can look this up more in depth on our
side.
Let us know how it goes.
Cheers,
QUentin
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [OE-core] [PATCH 7/7] mesa: depend on mesa-tools-native for less expensive libclc dependency
2026-03-20 15:57 ` Quentin Schulz
@ 2026-03-26 11:10 ` Quentin Schulz
2026-03-26 17:34 ` Ernest Van Hoecke
0 siblings, 1 reply; 13+ messages in thread
From: Quentin Schulz @ 2026-03-26 11:10 UTC (permalink / raw)
To: Ernest Van Hoecke, Quentin Schulz; +Cc: openembedded-core, Ross Burton
Hi Ernest,
On 3/20/26 4:57 PM, Quentin Schulz via lists.openembedded.org wrote:
> Hi Ernest,
>
> On 3/20/26 4:26 PM, Ernest Van Hoecke wrote:
>> Hi Quentin,
>>
>> Recently our do_configure task of mesa started failing with the
>> following error:
>>
>> | Program pco_clc found: NO
>> |
>> | ../sources/mesa-26.0.1/src/imagination/pco/uscgen/meson.build:7:17:
>> ERROR: Program 'pco_clc' not found or not executable
>> |
>> | A full log can be found at /var/home/vhe/build/tdxref/master-extint/
>> build/tmp/work/aarch64-tdx-linux/mesa/26.0.1/build/meson-logs/meson-
>> log.txt
>> |
>> | Last 10 lines of meson-log.txt:
>> | int i;
>> |
>> | Cached compiler stdout:
>> |
>> | Cached compiler stderr:
>> |
>> | Compiler for C supports arguments -Werror=pointer-arith: YES (cached)
>> | Program pco_clc found: NO
>> |
>> | ../sources/mesa-26.0.1/src/imagination/pco/uscgen/meson.build:7:17:
>> ERROR: Program 'pco_clc' not found or not executable
>> |
>> | ERROR: meson setup failed
>> | WARNING: /var/home/vhe/build/tdxref/master-extint/build/tmp/work/
>> aarch64-tdx-linux/mesa/26.0.1/temp/run.do_configure.144042:173 exit 1
>> from 'exit 1'
>>
>> Reverting this patch fixes the issue, but it does not seem to be the
>> commit that introduced the problem. It only started later, presumably
>> something changed in pulling in libclc or a similar issue.
>>
>> I can bisect it more later but already wanted to ask if you or someone
>> else had any ideas. Thanks!
>>
>
> I suspect you need
>
> diff --git a/meta/recipes-graphics/mesa/mesa-tools-native.bb b/meta/
> recipes-graphics/mesa/mesa-tools-native.bb
> index 50d2f5cbb0..0fff6ef1dd 100644
> --- a/meta/recipes-graphics/mesa/mesa-tools-native.bb
> +++ b/meta/recipes-graphics/mesa/mesa-tools-native.bb
> @@ -3,7 +3,7 @@ inherit_defer native
>
> SUMMARY += " (tools only)"
>
> -PACKAGECONFIG = "tools asahi panfrost"
> +PACKAGECONFIG = "tools asahi imagination panfrost"
> # llvm required for libclc
> PACKAGECONFIG += "gallium-llvm"
> # Doesn't compile without wayland-scanner if PLATFORMS has wayland in,
> and,
>
> and possibly
>
> diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-
> graphics/mesa/mesa.inc
> index 14dc7b6c51..44d3d17a52 100644
> --- a/meta/recipes-graphics/mesa/mesa.inc
> +++ b/meta/recipes-graphics/mesa/mesa.inc
> @@ -137,7 +137,7 @@ VULKAN_DRIVERS .=
> "${@bb.utils.contains('PACKAGECONFIG', 'asahi libclc gallium-l
> VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'broadcom',
> ',broadcom', '', d)}"
> VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'freedreno',
> ',freedreno', '', d)}"
> VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'virtio',
> ',gfxstream', '', d)}"
> -VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'imagination',
> ',imagination', '', d)}"
> +VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'imagination
> libclc', ',imagination', '', d)}"
> VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'intel libclc
> gallium-llvm', ',intel', '', d)}"
> VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'intel
> libclc', ',intel_hasvk', '', d)}"
> VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'panfrost
> libclc', ',panfrost', '', d)}"
>
>
> It would help if you could provide the PACKAGECONFIG you're using and
> ideally a minimal reproducer so we can look this up more in depth on our
> side.
>
I've been able to reproduce and provide a patch for it, see
https://lore.kernel.org/openembedded-core/20260326-mesa-libdrm-imagination-v1-2-fe018f03be6a@cherry.de/
can you please confirm this works as expected? I only build tested it. A
Tested-by (provided you have tested it :) ) as an answer to the patch
would be most welcome, thanks!
Thanks for the report!
Quentin
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [OE-core] [PATCH 7/7] mesa: depend on mesa-tools-native for less expensive libclc dependency
2026-03-26 11:10 ` [OE-core] " Quentin Schulz
@ 2026-03-26 17:34 ` Ernest Van Hoecke
0 siblings, 0 replies; 13+ messages in thread
From: Ernest Van Hoecke @ 2026-03-26 17:34 UTC (permalink / raw)
To: Quentin Schulz; +Cc: Quentin Schulz, openembedded-core, Ross Burton
Hi Quentin,
On Thu, Mar 26, 2026 at 12:10:07PM +0100, Quentin Schulz wrote:
> Hi Ernest,
>
> On 3/20/26 4:57 PM, Quentin Schulz via lists.openembedded.org wrote:
> > Hi Ernest,
> >
> > On 3/20/26 4:26 PM, Ernest Van Hoecke wrote:
> > > Hi Quentin,
> > >
> > > Recently our do_configure task of mesa started failing with the
> > > following error:
> > >
> > > | Program pco_clc found: NO
> > > |
> > > |
> > > ../sources/mesa-26.0.1/src/imagination/pco/uscgen/meson.build:7:17:
> > > ERROR: Program 'pco_clc' not found or not executable
> > > |
> > > | A full log can be found at
> > > /var/home/vhe/build/tdxref/master-extint/
> > > build/tmp/work/aarch64-tdx-linux/mesa/26.0.1/build/meson-logs/meson-
> > > log.txt
> > > |
> > > | Last 10 lines of meson-log.txt:
> > > | int i;
> > > |
> > > | Cached compiler stdout:
> > > |
> > > | Cached compiler stderr:
> > > |
> > > | Compiler for C supports arguments -Werror=pointer-arith: YES (cached)
> > > | Program pco_clc found: NO
> > > |
> > > |
> > > ../sources/mesa-26.0.1/src/imagination/pco/uscgen/meson.build:7:17:
> > > ERROR: Program 'pco_clc' not found or not executable
> > > |
> > > | ERROR: meson setup failed
> > > | WARNING: /var/home/vhe/build/tdxref/master-extint/build/tmp/work/
> > > aarch64-tdx-linux/mesa/26.0.1/temp/run.do_configure.144042:173 exit
> > > 1 from 'exit 1'
> > >
> > > Reverting this patch fixes the issue, but it does not seem to be the
> > > commit that introduced the problem. It only started later, presumably
> > > something changed in pulling in libclc or a similar issue.
> > >
> > > I can bisect it more later but already wanted to ask if you or someone
> > > else had any ideas. Thanks!
> > >
> >
> > I suspect you need
> >
> > diff --git a/meta/recipes-graphics/mesa/mesa-tools-native.bb b/meta/
> > recipes-graphics/mesa/mesa-tools-native.bb
> > index 50d2f5cbb0..0fff6ef1dd 100644
> > --- a/meta/recipes-graphics/mesa/mesa-tools-native.bb
> > +++ b/meta/recipes-graphics/mesa/mesa-tools-native.bb
> > @@ -3,7 +3,7 @@ inherit_defer native
> >
> > SUMMARY += " (tools only)"
> >
> > -PACKAGECONFIG = "tools asahi panfrost"
> > +PACKAGECONFIG = "tools asahi imagination panfrost"
> > # llvm required for libclc
> > PACKAGECONFIG += "gallium-llvm"
> > # Doesn't compile without wayland-scanner if PLATFORMS has wayland in,
> > and,
> >
> > and possibly
> >
> > diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-
> > graphics/mesa/mesa.inc
> > index 14dc7b6c51..44d3d17a52 100644
> > --- a/meta/recipes-graphics/mesa/mesa.inc
> > +++ b/meta/recipes-graphics/mesa/mesa.inc
> > @@ -137,7 +137,7 @@ VULKAN_DRIVERS .=
> > "${@bb.utils.contains('PACKAGECONFIG', 'asahi libclc gallium-l
> > VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'broadcom',
> > ',broadcom', '', d)}"
> > VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'freedreno',
> > ',freedreno', '', d)}"
> > VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'virtio',
> > ',gfxstream', '', d)}"
> > -VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'imagination',
> > ',imagination', '', d)}"
> > +VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'imagination
> > libclc', ',imagination', '', d)}"
> > VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'intel libclc
> > gallium-llvm', ',intel', '', d)}"
> > VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'intel
> > libclc', ',intel_hasvk', '', d)}"
> > VULKAN_DRIVERS .= "${@bb.utils.contains('PACKAGECONFIG', 'panfrost
> > libclc', ',panfrost', '', d)}"
> >
> >
> > It would help if you could provide the PACKAGECONFIG you're using and
> > ideally a minimal reproducer so we can look this up more in depth on our
> > side.
> >
>
> I've been able to reproduce and provide a patch for it, see https://lore.kernel.org/openembedded-core/20260326-mesa-libdrm-imagination-v1-2-fe018f03be6a@cherry.de/
> can you please confirm this works as expected? I only build tested it. A
> Tested-by (provided you have tested it :) ) as an answer to the patch would
> be most welcome, thanks!
>
> Thanks for the report!
> Quentin
>
Thanks a lot for your work here! Apologies for my late reply, I was
traveling for a few days and kept getting distracted by long build times
before figuring out the extra information you needed.
I checked out openembedded-core commit cf91b8b5d405
("meson: upgrade 1.10.1 -> 1.10.2") and applied your patch series on
top, and I can confirm that this fixes the build for me.
Sadly I'm hitting another unrelated build issue for more recent commits,
but I'll do my best to get a decent build running on the AM69 tomorrow
to provide the Tested-by tag on the new thread.
Thanks again and kind regards,
Ernest
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2026-03-26 20:50 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-06 17:23 [PATCH 0/7] mesa: bump + lighten mesa libclc dependency Quentin Schulz
2026-02-06 17:23 ` [PATCH 1/7] mesa: upgrade 25.3.3 -> 25.3.4 Quentin Schulz
2026-02-06 17:23 ` [PATCH 2/7] mesa: update patch status Quentin Schulz
2026-02-06 17:23 ` [PATCH 3/7] mesa: make expat dependency a PACKAGECONFIG Quentin Schulz
2026-02-06 17:23 ` [PATCH 4/7] mesa: make zlib " Quentin Schulz
2026-02-06 17:23 ` [PATCH 5/7] mesa: remove libxml2-native dependency Quentin Schulz
2026-02-06 17:23 ` [PATCH 6/7] add mesa-tools native-only recipe Quentin Schulz
2026-02-06 17:31 ` Patchtest results for " patchtest
2026-02-06 17:23 ` [PATCH 7/7] mesa: depend on mesa-tools-native for less expensive libclc dependency Quentin Schulz
2026-03-20 15:26 ` ernestvanhoecke
2026-03-20 15:57 ` Quentin Schulz
2026-03-26 11:10 ` [OE-core] " Quentin Schulz
2026-03-26 17:34 ` Ernest Van Hoecke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox