* [PATCH v1 0/2] mesa: fix build-time issues in Whinlatter and master
@ 2026-01-09 12:32 João Marcos Costa
2026-01-09 12:32 ` [whinlatter][PATCH v1 1/2] mesa: fix build error with llvmpipe gallium driver João Marcos Costa
2026-01-09 12:32 ` [PATCH v1 2/2] mesa-gl: fix QA issue in do_package João Marcos Costa
0 siblings, 2 replies; 4+ messages in thread
From: João Marcos Costa @ 2026-01-09 12:32 UTC (permalink / raw)
To: openembedded-core
Cc: thomas.petazzoni, thomas.perrot, raj.khem, João Marcos Costa
Hello,
This series contains a couple fixes for build-time issues I found while building
with 'MACHINE = "qemuriscv64".
The first patch is a backport for a Whinlatter-specific issue. Pior to that, I
believe LLVM was not recent enough. On the other hand, in master branch, the
mesa's version used already contains the fix.
The second patch fixes a QA error found while building mesa-gl.
Best regards,
João Marcos Costa (2):
mesa: fix build error with llvmpipe gallium driver
mesa-gl: fix QA issue in do_package
.../files/0001-gallivm-support-LLVM-21.patch | 56 +++++++++++++++++++
meta/recipes-graphics/mesa/mesa.inc | 3 +-
2 files changed, 58 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-graphics/mesa/files/0001-gallivm-support-LLVM-21.patch
--
2.47.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [whinlatter][PATCH v1 1/2] mesa: fix build error with llvmpipe gallium driver
2026-01-09 12:32 [PATCH v1 0/2] mesa: fix build-time issues in Whinlatter and master João Marcos Costa
@ 2026-01-09 12:32 ` João Marcos Costa
2026-01-09 12:32 ` [PATCH v1 2/2] mesa-gl: fix QA issue in do_package João Marcos Costa
1 sibling, 0 replies; 4+ messages in thread
From: João Marcos Costa @ 2026-01-09 12:32 UTC (permalink / raw)
To: openembedded-core
Cc: thomas.petazzoni, thomas.perrot, raj.khem, João Marcos Costa
For RISC-V, and if the PACKAGECONFIG 'gallium-llvm' is enabled, mesa's
do_compile fails due to a change in setObjectLinkingLayerCreator's
signature. This change was first included in LLVM v21.
This issue is further described below:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/13852
Backport the fix - from upstream - to Whinlatter.
Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com>
---
.../files/0001-gallivm-support-LLVM-21.patch | 56 +++++++++++++++++++
meta/recipes-graphics/mesa/mesa.inc | 1 +
2 files changed, 57 insertions(+)
create mode 100644 meta/recipes-graphics/mesa/files/0001-gallivm-support-LLVM-21.patch
diff --git a/meta/recipes-graphics/mesa/files/0001-gallivm-support-LLVM-21.patch b/meta/recipes-graphics/mesa/files/0001-gallivm-support-LLVM-21.patch
new file mode 100644
index 0000000000..cf3bdd36cf
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-gallivm-support-LLVM-21.patch
@@ -0,0 +1,56 @@
+From cd129dbf8af2d16b1243f2ce287ff69c6a5dc557 Mon Sep 17 00:00:00 2001
+From: no92 <no92.mail@gmail.com>
+Date: Wed, 27 Aug 2025 16:02:31 +0200
+Subject: gallivm: support LLVM 21
+
+LLVM PR#146819 changed the signature of `setObjectLinkingLayerCreator`,
+dropping the Triple argument. The PR was first included in the LLVM 21
+series, and the new signature is gated behind a version check for that.
+
+`LLVMOrcThreadSafeContextGetContext` was removed in LLVM commit b18e5b6,
+and the ORC examples in the LLVM tree seem to just create a context
+instead, which we replicate here.
+
+With this commit, mesa successfully builds the llvmpipe gallium driver
+on riscv64 with LLVM 21.1.0.
+
+Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13785
+Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13852
+
+Reviewed-by: David Heidelberg <david@ixit.cz>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37027>
+
+Upstream-Status: Backport [https://cgit.freedesktop.org/mesa/mesa/commit/?id=cd129dbf8af2d16b1243f2ce287ff69c6a5dc557]
+---
+ src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp
+index 6651ea439da..e5d8e461dd6 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp
++++ b/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp
+@@ -339,7 +339,12 @@ LPJit::LPJit() :jit_dylib_count(0) {
+ .setJITTargetMachineBuilder(std::move(JTMB))
+ #ifdef USE_JITLINK
+ .setObjectLinkingLayerCreator(
++#if LLVM_VERSION_MAJOR >= 21
++ /* LLVM 21 removed the Triple argument */
++ [&](ExecutionSession &ES) {
++#else
+ [&](ExecutionSession &ES, const llvm::Triple &TT) {
++#endif
+ return std::make_unique<ObjectLinkingLayer>(
+ ES, ExitOnErr(llvm::jitlink::InProcessMemoryManager::Create()));
+ })
+@@ -551,7 +556,7 @@ init_gallivm_state(struct gallivm_state *gallivm, const char *name,
+ gallivm->cache = cache;
+
+ gallivm->_ts_context = context->ref;
+- gallivm->context = LLVMOrcThreadSafeContextGetContext(context->ref);
++ gallivm->context = LLVMContextCreate();
+
+ gallivm->module_name = LPJit::get_unique_name(name);
+ gallivm->module = LLVMModuleCreateWithNameInContext(gallivm->module_name,
+--
+cgit v1.2.3
+
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 3124db0986..a35dff3347 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -17,6 +17,7 @@ PE = "2"
SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \
file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
file://0001-freedreno-don-t-encode-build-path-into-binaries.patch \
+ file://0001-gallivm-support-LLVM-21.patch \
"
SRC_URI[sha256sum] = "bb6243e7a6f525febfa1e6ab50827ca4d4bfdad73812377b0ca9b6c50998b03e"
--
2.47.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v1 2/2] mesa-gl: fix QA issue in do_package
2026-01-09 12:32 [PATCH v1 0/2] mesa: fix build-time issues in Whinlatter and master João Marcos Costa
2026-01-09 12:32 ` [whinlatter][PATCH v1 1/2] mesa: fix build error with llvmpipe gallium driver João Marcos Costa
@ 2026-01-09 12:32 ` João Marcos Costa
2026-01-15 11:42 ` [OE-core] " Quentin Schulz
1 sibling, 1 reply; 4+ messages in thread
From: João Marcos Costa @ 2026-01-09 12:32 UTC (permalink / raw)
To: openembedded-core
Cc: thomas.petazzoni, thomas.perrot, raj.khem, João Marcos Costa
Whenever 'vdpau' PACKAGECONFIG is enabled, a 'installed-vs-shipped'
error is raised. This happens because there is no
'mesa-gl-vdpau-drivers' package, even though a FILES:${PN}-vdpau-drivers
is defined.
Fix it by replacing the hardcoded package name in 'mesa-vdpau-drivers' by
'${PN}'.
Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com>
---
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 a35dff3347..8fe8055d17 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -242,7 +242,7 @@ PACKAGES =+ "libegl-mesa libegl-mesa-dev \
libopencl-mesa \
libteflon \
mesa-megadriver mesa-vulkan-drivers \
- mesa-vdpau-drivers mesa-tools \
+ ${PN}-vdpau-drivers mesa-tools \
"
# For the packages that make up the OpenGL interfaces, inject variables so that
--
2.47.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [OE-core] [PATCH v1 2/2] mesa-gl: fix QA issue in do_package
2026-01-09 12:32 ` [PATCH v1 2/2] mesa-gl: fix QA issue in do_package João Marcos Costa
@ 2026-01-15 11:42 ` Quentin Schulz
0 siblings, 0 replies; 4+ messages in thread
From: Quentin Schulz @ 2026-01-15 11:42 UTC (permalink / raw)
To: joaomarcos.costa, openembedded-core
Cc: thomas.petazzoni, thomas.perrot, raj.khem
Hi João,
On 1/9/26 1:32 PM, Joao Marcos Costa via lists.openembedded.org wrote:
> Whenever 'vdpau' PACKAGECONFIG is enabled, a 'installed-vs-shipped'
> error is raised. This happens because there is no
> 'mesa-gl-vdpau-drivers' package, even though a FILES:${PN}-vdpau-drivers
> is defined.
>
> Fix it by replacing the hardcoded package name in 'mesa-vdpau-drivers' by
> '${PN}'.
>
Won't we have the same issue with mesa-tools?
Also, I would recommend splitting this series in two. It's not the same
people handling master and stable releases.
Also, why do we only have some packages with the PN prefix? Why not
mesa-megadriver and mesa-vulkan-drivers as well?
Cheers,
Quentin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-15 11:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-09 12:32 [PATCH v1 0/2] mesa: fix build-time issues in Whinlatter and master João Marcos Costa
2026-01-09 12:32 ` [whinlatter][PATCH v1 1/2] mesa: fix build error with llvmpipe gallium driver João Marcos Costa
2026-01-09 12:32 ` [PATCH v1 2/2] mesa-gl: fix QA issue in do_package João Marcos Costa
2026-01-15 11:42 ` [OE-core] " Quentin Schulz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox