From: Thomas Devoogdt <thomas@devoogdt.com>
To: buildroot@buildroot.org
Cc: bernd@kuhls.net, romain.naour@gmail.com,
thomas.devoogdt@barco.com, thomas.petazzoni@bootlin.com,
thomas@devoogdt.com
Subject: [Buildroot] [PATCH v2 2/2] package/mesa3d: fix compilation with host-llvm enabled
Date: Sat, 3 Jan 2026 09:40:02 +0100 [thread overview]
Message-ID: <20260103084002.2045193-2-thomas@devoogdt.com> (raw)
In-Reply-To: <20260103084002.2045193-1-thomas@devoogdt.com>
From: Thomas Devoogdt <thomas.devoogdt@barco.com>
Meson's custom LLVM parser uses llvm-config with a default search path of
/usr/bin, causing it to detect the host system's llvm-config (version 18.1.3)
instead of the buildroot-compiled one. This forces all LLVM-related packages to
match version 18.1.3, but since the host system lacks llvmspirvlib, the build
fails. This patch forces Meson to use the buildroot-compiled llvm-config.
Note that LLVM_CONFIG is a CMake option, not a Meson one. This is because
Meson has custom dependency resolution logic for LLVM (see
https://mesonbuild.com/Dependencies.html#llvm). The EXTRA_BINARIES mechanism
cannot be used here, as it only applies to cross-compilation scenarios, which
does not apply to host-mesa3d builds.
Fixes:
llvm-config found: YES (/usr/bin/llvm-config-18) 18.1.3
Run-time dependency LLVM (modules: bitwriter, core, coverage, engine, executionengine, instcombine, irreader, libdriver, linker, lto, mcdisassembler, mcjit, native, option, scalaropts, target, transformutils, all-targets, coroutines, frontenddriver, frontendhlsl, lto, windowsdriver) found: YES 18.1.3
Dependency LLVMSPIRVLib found: NO. Found 15.0.0.0 but need: '>= 18.1' ; matched: '>= 15.0.0.0', '< 18.2'
Run-time dependency llvmspirvlib found: NO (tried cmake)
output/build/host-mesa3d-25.0.6/meson.build:1882:21: ERROR: Dependency lookup for LLVMSPIRVLib with method 'pkgconfig' failed: Invalid version, need 'LLVMSPIRVLib' ['>= 18.1'] found '15.0.0.0'.
A full log can be found at /home/thomas/buildroot/output/build/host-mesa3d-25.0.6/buildroot-build/meson-logs/meson-log.txt
make[1]: *** [package/pkg-generic.mk:263: /home/thomas/buildroot/output/build/host-mesa3d-25.0.6/.stamp_configured] Error 1
make: *** [Makefile:83: _all] Error 2
Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
---
v2: Moved patch to the generic host-mesa3d section.
Also updated the git message wrt LLVM_CONFIG option.
---
package/mesa3d/mesa3d.mk | 3 +++
1 file changed, 3 insertions(+)
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index 09b098628ab..da380b3b389 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -292,6 +292,9 @@ ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_IMAGINATION),y)
HOST_MESA3D_TOOLS += imagination
endif
+HOST_MESA3D_CONF_ENV = \
+ LLVM_CONFIG="$(HOST_DIR)/bin/llvm-config"
+
HOST_MESA3D_CONF_OPTS = \
-Dglvnd=disabled \
-Dgallium-drivers=$(subst $(space),$(comma),$(HOST_MESA3D_GALLIUM_DRIVERS-y)) \
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2026-01-03 8:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-18 12:50 [Buildroot] [PATCH] package/mesa3d: fix compilation with host-llvm enabled Thomas Devoogdt
2025-12-26 9:14 ` Thomas Petazzoni via buildroot
2026-01-03 8:40 ` [Buildroot] [PATCH v2 1/2] package/mesa3d: explicitly enable llvm for host-mesa3d Thomas Devoogdt
2026-01-03 8:40 ` Thomas Devoogdt [this message]
2026-02-03 17:50 ` [Buildroot] [PATCH v2 2/2] package/mesa3d: fix compilation with host-llvm enabled Romain Naour via buildroot
2026-02-04 6:11 ` Thomas Devoogdt
2026-02-04 8:54 ` Romain Naour via buildroot
2026-02-04 12:27 ` Thomas Devoogdt
2026-02-04 12:36 ` [Buildroot] [PATCH v3] " Thomas Devoogdt
2026-02-04 13:41 ` Thomas Devoogdt
2026-02-04 18:32 ` Romain Naour via buildroot
2026-02-05 10:08 ` Thomas Devoogdt
2026-02-05 11:28 ` Romain Naour via buildroot
2026-02-03 17:04 ` [Buildroot] [PATCH v2 1/2] package/mesa3d: explicitly enable llvm for host-mesa3d Romain Naour via buildroot
2026-02-13 19:36 ` Thomas Perale via buildroot
[not found] ` <31717e07-e32d-43c5-9a78-e2e6b7b3f3b5@kuhls.net>
2026-01-03 10:51 ` [Buildroot] [PATCH v2 1/2] package/mesa3d: explicitly enable llvm for Thomas Devoogdt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260103084002.2045193-2-thomas@devoogdt.com \
--to=thomas@devoogdt.com \
--cc=bernd@kuhls.net \
--cc=buildroot@buildroot.org \
--cc=romain.naour@gmail.com \
--cc=thomas.devoogdt@barco.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox