From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Thomas Devoogdt <thomas@devoogdt.com>
Cc: buildroot@buildroot.org, Bernd Kuhls <bernd@kuhls.net>,
Romain Naour <romain.naour@gmail.com>,
Thomas Devoogdt <thomas.devoogdt@barco.com>
Subject: Re: [Buildroot] [PATCH] package/mesa3d: fix compilation with host-llvm enabled
Date: Fri, 26 Dec 2025 10:14:45 +0100 [thread overview]
Message-ID: <20251226101445.2b29f439@windsurf> (raw)
In-Reply-To: <20251218125030.154446-1-thomas@devoogdt.com>
Hello Thomas,
Thanks for your patch!
On Thu, 18 Dec 2025 13:50:29 +0100
Thomas Devoogdt <thomas@devoogdt.com> wrote:
> 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"
This looks odd to me, as it isn't tied to us passing -Dllvm=<something>
to HOST_MESA3D_CONF_OPTS.
If LLVM support in host-mesa3d is needed, then we should pass
-Dllvm=enabled and this LLVM_CONFIG variable. If LLVM support in
host-mesa3d is not needed (which I would recommend to try first), then
we should pass -Dllvm=disabled, and passing LLVM_CONFIG should not be
needed.
The other thing that bothers me is that to do the same thing ("i.e
passing the path to llvm-config"), we're using here two different
mechanisms: MESA3D_MESON_EXTRA_BINARIES for the target mesa3d package,
and LLVM_CONFIG for the host mesa3d package. This is not consistent and
therefore isn't great.
Could you try to improve those two aspects?
Thanks a lot!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2025-12-26 9:15 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 [this message]
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
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=20251226101445.2b29f439@windsurf \
--to=buildroot@buildroot.org \
--cc=bernd@kuhls.net \
--cc=romain.naour@gmail.com \
--cc=thomas.devoogdt@barco.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=thomas@devoogdt.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