Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/mesa3d: fix compilation with host-llvm enabled
@ 2025-12-18 12:50 Thomas Devoogdt
  2025-12-26  9:14 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 16+ messages in thread
From: Thomas Devoogdt @ 2025-12-18 12:50 UTC (permalink / raw)
  To: buildroot; +Cc: Bernd Kuhls, Romain Naour, Thomas Devoogdt

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.

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>
---
 package/mesa3d/mesa3d.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index 6fcbf96c803..36bc3d6542a 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -40,6 +40,7 @@ ifeq ($(BR2_PACKAGE_MESA3D_LLVM),y)
 MESA3D_DEPENDENCIES += host-llvm llvm
 MESA3D_MESON_EXTRA_BINARIES += llvm-config='$(STAGING_DIR)/usr/bin/llvm-config'
 MESA3D_CONF_OPTS += -Dllvm=enabled
+HOST_MESA3D_CONF_ENV += LLVM_CONFIG="$(HOST_DIR)/bin/llvm-config"
 ifeq ($(BR2_PACKAGE_LLVM_RTTI),y)
 MESA3D_CONF_OPTS += -Dcpp_rtti=true
 else
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2026-02-13 19:37 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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     ` [Buildroot] [PATCH v2 2/2] package/mesa3d: fix compilation with host-llvm enabled Thomas Devoogdt
2026-02-03 17:50       ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox