* [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
* Re: [Buildroot] [PATCH] package/mesa3d: fix compilation with host-llvm enabled 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 [not found] ` <31717e07-e32d-43c5-9a78-e2e6b7b3f3b5@kuhls.net> 0 siblings, 2 replies; 16+ messages in thread From: Thomas Petazzoni via buildroot @ 2025-12-26 9:14 UTC (permalink / raw) To: Thomas Devoogdt; +Cc: buildroot, Bernd Kuhls, Romain Naour, Thomas Devoogdt 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH v2 1/2] package/mesa3d: explicitly enable llvm for host-mesa3d 2025-12-26 9:14 ` Thomas Petazzoni via buildroot @ 2026-01-03 8:40 ` Thomas Devoogdt 2026-01-03 8:40 ` [Buildroot] [PATCH v2 2/2] package/mesa3d: fix compilation with host-llvm enabled Thomas Devoogdt ` (2 more replies) [not found] ` <31717e07-e32d-43c5-9a78-e2e6b7b3f3b5@kuhls.net> 1 sibling, 3 replies; 16+ messages in thread From: Thomas Devoogdt @ 2026-01-03 8:40 UTC (permalink / raw) To: buildroot; +Cc: bernd, romain.naour, thomas.devoogdt, thomas.petazzoni, thomas LLVM is already implicitly enabled for host-mesa3d when BR2_PACKAGE_MESA3D_NEEDS_PRECOMP_COMPILER is selected. This blind option is automatically enabled when LLVM is required by drivers such as intel-iris, panfrost, imagination, or intel-vulkan. The BR2_PACKAGE_MESA3D_LLVM option also independently selects host-llvm, but this change makes the dependency more explicit for host-mesa3d builds. Note that disabling LLVM is not possible for host-mesa3d, as the build will fail with: ../../../br-test-pkg/bootlin-armv5-uclibc/build/host-mesa3d-25.3.2/meson.build:847:3: ERROR: Feature llvm cannot be disabled: CLC requires LLVM Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com> --- v2: Explicitly added the llvm flag to host-mesa3d configuration, see https://lore.kernel.org/buildroot/20251226101445.2b29f439@windsurf/. @bkuhls, I can see that CLC support is needed to compile the intel-iris driver, (commit 317260f "package/{mesa3d, mesa3d-headers}: bump version to 25.0.6") but can you elaborate why this is required for the generic host-mesa3d? Perhaps some llvm related logic should be added for the host. --- package/mesa3d/mesa3d.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk index e41bf68d8ec..09b098628ab 100644 --- a/package/mesa3d/mesa3d.mk +++ b/package/mesa3d/mesa3d.mk @@ -297,6 +297,7 @@ HOST_MESA3D_CONF_OPTS = \ -Dgallium-drivers=$(subst $(space),$(comma),$(HOST_MESA3D_GALLIUM_DRIVERS-y)) \ -Dtools=$(subst $(space),$(comma),$(HOST_MESA3D_TOOLS)) \ -Dinstall-mesa-clc=true \ + -Dllvm=enabled \ -Dmesa-clc=enabled \ -Dplatforms= \ -Dprecomp-compiler=enabled \ @@ -306,6 +307,7 @@ HOST_MESA3D_CONF_OPTS = \ HOST_MESA3D_DEPENDENCIES = \ host-libclc \ host-libdrm \ + host-llvm \ host-python-mako \ host-python-pyyaml \ host-spirv-tools -- 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
* [Buildroot] [PATCH v2 2/2] package/mesa3d: fix compilation with host-llvm enabled 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 2026-02-03 17:50 ` 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 2 siblings, 1 reply; 16+ messages in thread From: Thomas Devoogdt @ 2026-01-03 8:40 UTC (permalink / raw) To: buildroot; +Cc: bernd, romain.naour, thomas.devoogdt, thomas.petazzoni, thomas 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 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [Buildroot] [PATCH v2 2/2] package/mesa3d: fix compilation with host-llvm enabled 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 0 siblings, 1 reply; 16+ messages in thread From: Romain Naour via buildroot @ 2026-02-03 17:50 UTC (permalink / raw) To: Thomas Devoogdt, buildroot Cc: bernd, romain.naour, thomas.devoogdt, thomas.petazzoni Hello Thomas, All, Le 03/01/2026 à 09:40, Thomas Devoogdt a écrit : > 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 llvm-config is installed on my host $ which llvm-config /usr/bin/llvm-config $ llvm-config --version 19.1.7 But building host-mesa3d is able to find the one built by Buildroot and installed in HOST_DIR: llvm-config found: YES ([...]/host/bin/llvm-config) 21.1.8 > 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'. is this issue specific to this mesa3d version (25.0.6) ? We are using mesa3d 25.3.4 already. > > 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" Otherwise looks ok for me. Best regards, Romain > + > HOST_MESA3D_CONF_OPTS = \ > -Dglvnd=disabled \ > -Dgallium-drivers=$(subst $(space),$(comma),$(HOST_MESA3D_GALLIUM_DRIVERS-y)) \ _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Buildroot] [PATCH v2 2/2] package/mesa3d: fix compilation with host-llvm enabled 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 0 siblings, 1 reply; 16+ messages in thread From: Thomas Devoogdt @ 2026-02-04 6:11 UTC (permalink / raw) To: Romain Naour Cc: Thomas Devoogdt, buildroot, bernd, romain.naour, thomas.devoogdt, thomas.petazzoni [-- Attachment #1.1: Type: text/plain, Size: 4474 bytes --] Hi Romain, Resending it, as my other mail address is not trusted by the mailing list. I noticed this problem when compiling the 2025.02 branch, which is still on LLVM 15.0.7. My PC ships with LLVM 18.1.3. So, BR was trying to use a newer config version (18.1.3) as it was shipping. See error log. In the meantime, master has evolved, and ships with LLVM 21.1.8, with that combination, no problem persists as the available versions are always newer than my own PC. So in short, you won't see any problem if your host LLVM is older than the version which is trying to be built. But what I don't understand is why the right LLVM is found on your host PC. A quick look at https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/meson.build?ref_type=heads doesn't teach me anything. And for meson, I don't see recent commits that might have changed something https://github.com/mesonbuild/meson/commits/master/mesonbuild/dependencies/data/CMakeListsLLVM.txt . Kr, Thomas Devoogdt Op di 3 feb 2026 om 18:50 schreef Romain Naour <romain.naour@smile.fr>: > Hello Thomas, All, > > Le 03/01/2026 à 09:40, Thomas Devoogdt a écrit : > > 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 > > llvm-config is installed on my host > > $ which llvm-config > /usr/bin/llvm-config > > $ llvm-config --version > 19.1.7 > > But building host-mesa3d is able to find the one built by Buildroot and > installed in HOST_DIR: > > llvm-config found: YES ([...]/host/bin/llvm-config) 21.1.8 > > > 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'. > > is this issue specific to this mesa3d version (25.0.6) ? > > We are using mesa3d 25.3.4 already. > > > > > 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" > > Otherwise looks ok for me. > > Best regards, > Romain > > > > + > > HOST_MESA3D_CONF_OPTS = \ > > -Dglvnd=disabled \ > > -Dgallium-drivers=$(subst > $(space),$(comma),$(HOST_MESA3D_GALLIUM_DRIVERS-y)) \ > > > > [-- Attachment #1.2: Type: text/html, Size: 12532 bytes --] [-- Attachment #2: Type: text/plain, Size: 150 bytes --] _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Buildroot] [PATCH v2 2/2] package/mesa3d: fix compilation with host-llvm enabled 2026-02-04 6:11 ` Thomas Devoogdt @ 2026-02-04 8:54 ` Romain Naour via buildroot 2026-02-04 12:27 ` Thomas Devoogdt 0 siblings, 1 reply; 16+ messages in thread From: Romain Naour via buildroot @ 2026-02-04 8:54 UTC (permalink / raw) To: Thomas Devoogdt Cc: buildroot, bernd, romain.naour, thomas.devoogdt, thomas.petazzoni Hi Thomas, All, Le 04/02/2026 à 07:11, Thomas Devoogdt a écrit : > Hi Romain, > > Resending it, as my other mail address is not trusted by the mailing list. Please, avoid top posting when the mailing list is in Cc.> > > I noticed this problem when compiling the 2025.02 branch, which is still on LLVM > 15.0.7. My PC ships with LLVM 18.1.3. So, BR was trying to use a newer config > version (18.1.3) as it was shipping. See error log. In the meantime, master has > evolved, and ships with LLVM 21.1.8, with that combination, no problem persists > as the available versions are always newer than my own PC. > > So in short, you won't see any problem if your host LLVM is older than the > version which is trying to be built. > > But what I don't understand is why the right LLVM is found on your host PC. A > quick look at https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/meson.build? > ref_type=heads <https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/ > meson.build?ref_type=heads> doesn't teach me anything. And for meson, I don't > see recent commits that might have changed something https://github.com/ > mesonbuild/meson/commits/master/mesonbuild/dependencies/data/CMakeListsLLVM.txt > <https://github.com/mesonbuild/meson/commits/master/mesonbuild/dependencies/ > data/CMakeListsLLVM.txt>. The 2025.02.x LTS branch still use mesa3d 24.0.9 and the host variant (host-mesa3d) is not available yet. So, It seems your project backported mesa3d 25.0.6 (merged in 2025.05) to Buildroot 2025.02.x. Can you provide a way to reproduce the issue with a defconfig? on 2025.05 maybe ? I believe that this change is correct but can you improve the commit log to explain how to reproduce the issue. Best regards, Romain > > > Kr, > > Thomas Devoogdt > > Op di 3 feb 2026 om 18:50 schreef Romain Naour <romain.naour@smile.fr > <mailto:romain.naour@smile.fr>>: > > Hello Thomas, All, > > Le 03/01/2026 à 09:40, Thomas Devoogdt a écrit : > > From: Thomas Devoogdt <thomas.devoogdt@barco.com > <mailto: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 <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 > > llvm-config is installed on my host > > $ which llvm-config > /usr/bin/llvm-config > > $ llvm-config --version > 19.1.7 > > But building host-mesa3d is able to find the one built by Buildroot and > installed in HOST_DIR: > > llvm-config found: YES ([...]/host/bin/llvm-config) 21.1.8 > > > 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'. > > is this issue specific to this mesa3d version (25.0.6) ? > > We are using mesa3d 25.3.4 already. > > > > > 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 <http://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 > <mailto: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 <http://mesa3d.mk> | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/package/mesa3d/mesa3d.mk <http://mesa3d.mk> b/package/mesa3d/ > mesa3d.mk <http://mesa3d.mk> > > index 09b098628ab..da380b3b389 100644 > > --- a/package/mesa3d/mesa3d.mk <http://mesa3d.mk> > > +++ b/package/mesa3d/mesa3d.mk <http://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" > > Otherwise looks ok for me. > > Best regards, > Romain > > > > + > > HOST_MESA3D_CONF_OPTS = \ > > -Dglvnd=disabled \ > > -Dgallium-drivers=$(subst $(space),$(comma), > $(HOST_MESA3D_GALLIUM_DRIVERS-y)) \ > > > _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Buildroot] [PATCH v2 2/2] package/mesa3d: fix compilation with host-llvm enabled 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 0 siblings, 1 reply; 16+ messages in thread From: Thomas Devoogdt @ 2026-02-04 12:27 UTC (permalink / raw) To: Romain Naour Cc: Thomas Devoogdt, buildroot, bernd, romain.naour, thomas.devoogdt, thomas.petazzoni Hi Romain, All, Op wo 4 feb 2026 om 09:54 schreef Romain Naour <romain.naour@smile.fr>: > > Hi Thomas, All, > > Le 04/02/2026 à 07:11, Thomas Devoogdt a écrit : > > Hi Romain, > > > > Resending it, as my other mail address is not trusted by the mailing list. > > Please, avoid top posting when the mailing list is in Cc.> Ok > > I noticed this problem when compiling the 2025.02 branch, which is still on LLVM > > 15.0.7. My PC ships with LLVM 18.1.3. So, BR was trying to use a newer config > > version (18.1.3) as it was shipping. See error log. In the meantime, master has > > evolved, and ships with LLVM 21.1.8, with that combination, no problem persists > > as the available versions are always newer than my own PC. > > > > So in short, you won't see any problem if your host LLVM is older than the > > version which is trying to be built. > > > > But what I don't understand is why the right LLVM is found on your host PC. A > > quick look at https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/meson.build? > > ref_type=heads <https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/ > > meson.build?ref_type=heads> doesn't teach me anything. And for meson, I don't > > see recent commits that might have changed something https://github.com/ > > mesonbuild/meson/commits/master/mesonbuild/dependencies/data/CMakeListsLLVM.txt > > <https://github.com/mesonbuild/meson/commits/master/mesonbuild/dependencies/ > > data/CMakeListsLLVM.txt>. > > The 2025.02.x LTS branch still use mesa3d 24.0.9 and the host variant > (host-mesa3d) is not available yet. So, It seems your project backported mesa3d > 25.0.6 (merged in 2025.05) to Buildroot 2025.02.x. > > Can you provide a way to reproduce the issue with a defconfig? on 2025.05 maybe ? I was able to reproduce it on 2025.05.x, or by first cherry-picking on 2025.02.x: - 317260f336b65ff0b41a953882cb8cccb789e010 - 8b5dd49c5b2eb52e71ba9dff67b1ba54d0e00ac3 - 4890415aa9e918bdbb52414e0e53f29e93315291 - b08bc5b9e94269adb4a1c5771c8c26c8c87e5b5a , and then to compile this config: BR2_x86_64=y BR2_x86_atom=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_GLIBC_STABLE=y BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.24" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/pc/linux.config" BR2_LINUX_KERNEL_INSTALL_TARGET=y BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y BR2_PACKAGE_MESA3D=y BR2_PACKAGE_MESA3D_LLVM=y BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915=y BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS=y BR2_PACKAGE_MESA3D_OPENGL_EGL=y BR2_PACKAGE_MESA3D_OPENGL_ES=y Then I get: ``` 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/Documents/external/buildroot/output/build/host-mesa3d-25.0.6/buildroot-build/meson-logs/meson-log.txt make[1]: *** [package/pkg-generic.mk:263: /home/thomas/Documents/external/buildroot/output/build/host-mesa3d-25.0.6/.stamp_configured] Error 1 make: *** [Makefile:83: _all] Error 2 ``` I will update the patch. > I believe that this change is correct but can you improve the commit log to > explain how to reproduce the issue. > > Best regards, > Romain > > > > > > > > Kr, > > > > Thomas Devoogdt > > > > Op di 3 feb 2026 om 18:50 schreef Romain Naour <romain.naour@smile.fr > > <mailto:romain.naour@smile.fr>>: > > > > Hello Thomas, All, > > > > Le 03/01/2026 à 09:40, Thomas Devoogdt a écrit : > > > From: Thomas Devoogdt <thomas.devoogdt@barco.com > > <mailto: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 <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 > > > > llvm-config is installed on my host > > > > $ which llvm-config > > /usr/bin/llvm-config > > > > $ llvm-config --version > > 19.1.7 > > > > But building host-mesa3d is able to find the one built by Buildroot and > > installed in HOST_DIR: > > > > llvm-config found: YES ([...]/host/bin/llvm-config) 21.1.8 > > > > > 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'. > > > > is this issue specific to this mesa3d version (25.0.6) ? > > > > We are using mesa3d 25.3.4 already. > > > > > > > > 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 <http://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 > > <mailto: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 <http://mesa3d.mk> | 3 +++ > > > 1 file changed, 3 insertions(+) > > > > > > diff --git a/package/mesa3d/mesa3d.mk <http://mesa3d.mk> b/package/mesa3d/ > > mesa3d.mk <http://mesa3d.mk> > > > index 09b098628ab..da380b3b389 100644 > > > --- a/package/mesa3d/mesa3d.mk <http://mesa3d.mk> > > > +++ b/package/mesa3d/mesa3d.mk <http://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" > > > > Otherwise looks ok for me. > > > > Best regards, > > Romain > > > > > > > + > > > HOST_MESA3D_CONF_OPTS = \ > > > -Dglvnd=disabled \ > > > -Dgallium-drivers=$(subst $(space),$(comma), > > $(HOST_MESA3D_GALLIUM_DRIVERS-y)) \ > > > > > > > > Kr, Thomas Devoogdt _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH v3] package/mesa3d: fix compilation with host-llvm enabled 2026-02-04 12:27 ` Thomas Devoogdt @ 2026-02-04 12:36 ` Thomas Devoogdt 2026-02-04 13:41 ` Thomas Devoogdt 0 siblings, 1 reply; 16+ messages in thread From: Thomas Devoogdt @ 2026-02-04 12:36 UTC (permalink / raw) To: thomas Cc: bernd, buildroot, romain.naour, romain.naour, thomas.devoogdt, thomas.petazzoni 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. Reproduction (On BR2 tag: 2025.05.3): BR2_x86_64=y BR2_x86_atom=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_GLIBC_STABLE=y BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.24" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/pc/linux.config" BR2_LINUX_KERNEL_INSTALL_TARGET=y BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y BR2_PACKAGE_MESA3D=y BR2_PACKAGE_MESA3D_LLVM=y BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915=y BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS=y BR2_PACKAGE_MESA3D_OPENGL_EGL=y BR2_PACKAGE_MESA3D_OPENGL_ES=y 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'. Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com> --- v3: Added reproduction info. Actually, I saw the issue first on 2025.02.x with these commits cherry-picked: - 317260f336b65ff0b41a953882cb8cccb789e010 - 8b5dd49c5b2eb52e71ba9dff67b1ba54d0e00ac3 - 4890415aa9e918bdbb52414e0e53f29e93315291 - b08bc5b9e94269adb4a1c5771c8c26c8c87e5b5a --- package/mesa3d/mesa3d.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk index db46d7bc7c2..b5300df2ba3 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 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [Buildroot] [PATCH v3] package/mesa3d: fix compilation with host-llvm enabled 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 0 siblings, 1 reply; 16+ messages in thread From: Thomas Devoogdt @ 2026-02-04 13:41 UTC (permalink / raw) To: Thomas Devoogdt Cc: bernd, buildroot, romain.naour, romain.naour, thomas.devoogdt, thomas.petazzoni Hi Romain, All, Update: When compiling on master, then meson is somehow able to find the right llvm-config, so reproduction only seems to be possible if the host machine ships with a newer version as the one buildroot is using. llvm-config found: YES (/home/thomas/Documents/external/buildroot/output/host/bin/llvm-config) 21.1.8 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 21.1.8 Kr, Thomas Devoogdt Op wo 4 feb 2026 om 13:36 schreef Thomas Devoogdt <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. > > Reproduction (On BR2 tag: 2025.05.3): > > BR2_x86_64=y > BR2_x86_atom=y > BR2_TOOLCHAIN_EXTERNAL=y > BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_GLIBC_STABLE=y > BR2_LINUX_KERNEL=y > BR2_LINUX_KERNEL_CUSTOM_VERSION=y > BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.24" > BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y > BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/pc/linux.config" > BR2_LINUX_KERNEL_INSTALL_TARGET=y > BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y > BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y > BR2_PACKAGE_MESA3D=y > BR2_PACKAGE_MESA3D_LLVM=y > BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915=y > BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS=y > BR2_PACKAGE_MESA3D_OPENGL_EGL=y > BR2_PACKAGE_MESA3D_OPENGL_ES=y > > 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'. > > Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com> > --- > v3: Added reproduction info. > Actually, I saw the issue first on 2025.02.x with these commits cherry-picked: > - 317260f336b65ff0b41a953882cb8cccb789e010 > - 8b5dd49c5b2eb52e71ba9dff67b1ba54d0e00ac3 > - 4890415aa9e918bdbb52414e0e53f29e93315291 > - b08bc5b9e94269adb4a1c5771c8c26c8c87e5b5a > --- > package/mesa3d/mesa3d.mk | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk > index db46d7bc7c2..b5300df2ba3 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Buildroot] [PATCH v3] package/mesa3d: fix compilation with host-llvm enabled 2026-02-04 13:41 ` Thomas Devoogdt @ 2026-02-04 18:32 ` Romain Naour via buildroot 2026-02-05 10:08 ` Thomas Devoogdt 0 siblings, 1 reply; 16+ messages in thread From: Romain Naour via buildroot @ 2026-02-04 18:32 UTC (permalink / raw) To: Thomas Devoogdt Cc: bernd, buildroot, romain.naour, thomas.devoogdt, thomas.petazzoni Hi Thomas, All, Le 04/02/2026 à 14:41, Thomas Devoogdt a écrit : > Hi Romain, All, > > > Update: > > When compiling on master, then meson is somehow able to find the right > llvm-config, so reproduction only seems to be possible if the host > machine ships with a newer version as the one buildroot is using. > > llvm-config found: YES > (/home/thomas/Documents/external/buildroot/output/host/bin/llvm-config) > 21.1.8 > 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 21.1.8 Thanks for this update. I'm wondering if the issue could also be related to the target architecture... You can reproduce the issue targetting an BR2_x86_64 (while building on x86_64) on 2025.05.x branch. But can you still reproduce it if you use an aarch64 as a target)? Best regards, Romain > > > Kr, > > Thomas Devoogdt > > > Op wo 4 feb 2026 om 13:36 schreef Thomas Devoogdt <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. >> >> Reproduction (On BR2 tag: 2025.05.3): >> >> BR2_x86_64=y >> BR2_x86_atom=y >> BR2_TOOLCHAIN_EXTERNAL=y >> BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_GLIBC_STABLE=y >> BR2_LINUX_KERNEL=y >> BR2_LINUX_KERNEL_CUSTOM_VERSION=y >> BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.24" >> BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y >> BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/pc/linux.config" >> BR2_LINUX_KERNEL_INSTALL_TARGET=y >> BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y >> BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y >> BR2_PACKAGE_MESA3D=y >> BR2_PACKAGE_MESA3D_LLVM=y >> BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915=y >> BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS=y >> BR2_PACKAGE_MESA3D_OPENGL_EGL=y >> BR2_PACKAGE_MESA3D_OPENGL_ES=y >> >> 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'. >> >> Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com> >> --- >> v3: Added reproduction info. >> Actually, I saw the issue first on 2025.02.x with these commits cherry-picked: >> - 317260f336b65ff0b41a953882cb8cccb789e010 >> - 8b5dd49c5b2eb52e71ba9dff67b1ba54d0e00ac3 >> - 4890415aa9e918bdbb52414e0e53f29e93315291 >> - b08bc5b9e94269adb4a1c5771c8c26c8c87e5b5a >> --- >> package/mesa3d/mesa3d.mk | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk >> index db46d7bc7c2..b5300df2ba3 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Buildroot] [PATCH v3] package/mesa3d: fix compilation with host-llvm enabled 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 0 siblings, 1 reply; 16+ messages in thread From: Thomas Devoogdt @ 2026-02-05 10:08 UTC (permalink / raw) To: Romain Naour Cc: Thomas Devoogdt, bernd, buildroot, romain.naour, thomas.devoogdt, thomas.petazzoni Hi Romain, All, Op wo 4 feb 2026 om 19:33 schreef Romain Naour <romain.naour@smile.fr>: > > Hi Thomas, All, > > Le 04/02/2026 à 14:41, Thomas Devoogdt a écrit : > > Hi Romain, All, > > > > > > Update: > > > > When compiling on master, then meson is somehow able to find the right > > llvm-config, so reproduction only seems to be possible if the host > > machine ships with a newer version as the one buildroot is using. > > > > llvm-config found: YES > > (/home/thomas/Documents/external/buildroot/output/host/bin/llvm-config) > > 21.1.8 > > 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 21.1.8 > > Thanks for this update. > > I'm wondering if the issue could also be related to the target architecture... > > You can reproduce the issue targetting an BR2_x86_64 (while building on x86_64) > on 2025.05.x branch. But can you still reproduce it if you use an aarch64 as a > target)? I tried it with other combinations, but they all fail in the same way. This makes actually perfect sense as we are talking about host-mesa3d. This was my config: BR2_aarch64=y BR2_cortex_a72_a53=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.28" BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="rockchip/rk3399-rock-4se" BR2_LINUX_KERNEL_INSTALL_TARGET=y BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y BR2_PACKAGE_MESA3D=y BR2_PACKAGE_MESA3D_LLVM=y BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915=y BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS=y BR2_PACKAGE_MESA3D_OPENGL_EGL=y BR2_PACKAGE_MESA3D_OPENGL_ES=y Yeah, I know, the I915 driver doesn't make much sense on a rockchip, but that's obviously not the point here. At the moment that host-mesa3d requires LLVM, then you can reproduce it on the 2025.05.3 release tag. > Best regards, > Romain > > > > > > > > Kr, > > > > Thomas Devoogdt > > > > > > Op wo 4 feb 2026 om 13:36 schreef Thomas Devoogdt <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. > >> > >> Reproduction (On BR2 tag: 2025.05.3): > >> > >> BR2_x86_64=y > >> BR2_x86_atom=y > >> BR2_TOOLCHAIN_EXTERNAL=y > >> BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_GLIBC_STABLE=y > >> BR2_LINUX_KERNEL=y > >> BR2_LINUX_KERNEL_CUSTOM_VERSION=y > >> BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.24" > >> BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y > >> BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/pc/linux.config" > >> BR2_LINUX_KERNEL_INSTALL_TARGET=y > >> BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y > >> BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y > >> BR2_PACKAGE_MESA3D=y > >> BR2_PACKAGE_MESA3D_LLVM=y > >> BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915=y > >> BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS=y > >> BR2_PACKAGE_MESA3D_OPENGL_EGL=y > >> BR2_PACKAGE_MESA3D_OPENGL_ES=y > >> > >> 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'. > >> > >> Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com> > >> --- > >> v3: Added reproduction info. > >> Actually, I saw the issue first on 2025.02.x with these commits cherry-picked: > >> - 317260f336b65ff0b41a953882cb8cccb789e010 > >> - 8b5dd49c5b2eb52e71ba9dff67b1ba54d0e00ac3 > >> - 4890415aa9e918bdbb52414e0e53f29e93315291 > >> - b08bc5b9e94269adb4a1c5771c8c26c8c87e5b5a > >> --- > >> package/mesa3d/mesa3d.mk | 3 +++ > >> 1 file changed, 3 insertions(+) > >> > >> diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk > >> index db46d7bc7c2..b5300df2ba3 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 > >> Kind regards, Thomas Devoogdt _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Buildroot] [PATCH v3] package/mesa3d: fix compilation with host-llvm enabled 2026-02-05 10:08 ` Thomas Devoogdt @ 2026-02-05 11:28 ` Romain Naour via buildroot 0 siblings, 0 replies; 16+ messages in thread From: Romain Naour via buildroot @ 2026-02-05 11:28 UTC (permalink / raw) To: Thomas Devoogdt Cc: bernd, buildroot, romain.naour, thomas.devoogdt, thomas.petazzoni Hello Thomas, All, Le 05/02/2026 à 11:08, Thomas Devoogdt a écrit : > Hi Romain, All, > > Op wo 4 feb 2026 om 19:33 schreef Romain Naour <romain.naour@smile.fr>: >> >> Hi Thomas, All, >> >> Le 04/02/2026 à 14:41, Thomas Devoogdt a écrit : >>> Hi Romain, All, >>> >>> >>> Update: >>> >>> When compiling on master, then meson is somehow able to find the right >>> llvm-config, so reproduction only seems to be possible if the host >>> machine ships with a newer version as the one buildroot is using. >>> >>> llvm-config found: YES >>> (/home/thomas/Documents/external/buildroot/output/host/bin/llvm-config) >>> 21.1.8 >>> 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 21.1.8 >> >> Thanks for this update. >> >> I'm wondering if the issue could also be related to the target architecture... >> >> You can reproduce the issue targetting an BR2_x86_64 (while building on x86_64) >> on 2025.05.x branch. But can you still reproduce it if you use an aarch64 as a >> target)? > > I tried it with other combinations, but they all fail in the same way. > This makes actually perfect sense as we are talking about host-mesa3d. > > This was my config: > > BR2_aarch64=y > BR2_cortex_a72_a53=y > BR2_TOOLCHAIN_EXTERNAL=y > BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y > BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y > BR2_LINUX_KERNEL=y > BR2_LINUX_KERNEL_CUSTOM_VERSION=y > BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.28" > BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y > BR2_LINUX_KERNEL_DTS_SUPPORT=y > BR2_LINUX_KERNEL_INTREE_DTS_NAME="rockchip/rk3399-rock-4se" > BR2_LINUX_KERNEL_INSTALL_TARGET=y > BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y > BR2_PACKAGE_MESA3D=y > BR2_PACKAGE_MESA3D_LLVM=y > BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915=y > BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS=y > BR2_PACKAGE_MESA3D_OPENGL_EGL=y > BR2_PACKAGE_MESA3D_OPENGL_ES=y > > Yeah, I know, the I915 driver doesn't make much sense on a rockchip, > but that's obviously not the point here. At the moment that > host-mesa3d requires LLVM, then you can reproduce it on the 2025.05.3 > release tag. I sligly updated the commit title and the commit log with the details you provided for the master branch. See: https://gitlab.com/buildroot.org/buildroot/-/commit/eb0e63888bae4b79b20b9cfcfdf44cc256c532ff Applied to master, thanks. Best regards, Romain > >> Best regards, >> Romain >> >> >>> >>> >>> Kr, >>> >>> Thomas Devoogdt >>> >>> >>> Op wo 4 feb 2026 om 13:36 schreef Thomas Devoogdt <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. >>>> >>>> Reproduction (On BR2 tag: 2025.05.3): >>>> >>>> BR2_x86_64=y >>>> BR2_x86_atom=y >>>> BR2_TOOLCHAIN_EXTERNAL=y >>>> BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_GLIBC_STABLE=y >>>> BR2_LINUX_KERNEL=y >>>> BR2_LINUX_KERNEL_CUSTOM_VERSION=y >>>> BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.24" >>>> BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y >>>> BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/pc/linux.config" >>>> BR2_LINUX_KERNEL_INSTALL_TARGET=y >>>> BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y >>>> BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y >>>> BR2_PACKAGE_MESA3D=y >>>> BR2_PACKAGE_MESA3D_LLVM=y >>>> BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915=y >>>> BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS=y >>>> BR2_PACKAGE_MESA3D_OPENGL_EGL=y >>>> BR2_PACKAGE_MESA3D_OPENGL_ES=y >>>> >>>> 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'. >>>> >>>> Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com> >>>> --- >>>> v3: Added reproduction info. >>>> Actually, I saw the issue first on 2025.02.x with these commits cherry-picked: >>>> - 317260f336b65ff0b41a953882cb8cccb789e010 >>>> - 8b5dd49c5b2eb52e71ba9dff67b1ba54d0e00ac3 >>>> - 4890415aa9e918bdbb52414e0e53f29e93315291 >>>> - b08bc5b9e94269adb4a1c5771c8c26c8c87e5b5a >>>> --- >>>> package/mesa3d/mesa3d.mk | 3 +++ >>>> 1 file changed, 3 insertions(+) >>>> >>>> diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk >>>> index db46d7bc7c2..b5300df2ba3 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 >>>> > > Kind regards, > > Thomas Devoogdt _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Buildroot] [PATCH v2 1/2] package/mesa3d: explicitly enable llvm for host-mesa3d 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:04 ` Romain Naour via buildroot 2026-02-13 19:36 ` Thomas Perale via buildroot 2 siblings, 0 replies; 16+ messages in thread From: Romain Naour via buildroot @ 2026-02-03 17:04 UTC (permalink / raw) To: Thomas Devoogdt, buildroot Cc: bernd, romain.naour, thomas.devoogdt, thomas.petazzoni Hello Thomas, Bernd, Le 03/01/2026 à 09:40, Thomas Devoogdt a écrit : > LLVM is already implicitly enabled for host-mesa3d when > BR2_PACKAGE_MESA3D_NEEDS_PRECOMP_COMPILER is selected. This blind > option is automatically enabled when LLVM is required by drivers such > as intel-iris, panfrost, imagination, or intel-vulkan. > > The BR2_PACKAGE_MESA3D_LLVM option also independently selects host-llvm, > but this change makes the dependency more explicit for host-mesa3d > builds. > > Note that disabling LLVM is not possible for host-mesa3d, as the build > will fail with: > ../../../br-test-pkg/bootlin-armv5-uclibc/build/host-mesa3d-25.3.2/meson.build:847:3: ERROR: Feature llvm cannot be disabled: CLC requires LLVM Indeed, host-mesa3d is only required to provide support for driver setting BR2_PACKAGE_MESA3D_NEEDS_PRECOMP_COMPILER. https://lore.kernel.org/buildroot/20260103084002.2045193-2-thomas@devoogdt.com/ Applied to master, thanks. Best regards, Romain > > Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com> > --- > v2: Explicitly added the llvm flag to host-mesa3d configuration, > see https://lore.kernel.org/buildroot/20251226101445.2b29f439@windsurf/. > @bkuhls, I can see that CLC support is needed to compile the intel-iris > driver, (commit 317260f "package/{mesa3d, mesa3d-headers}: bump version to > 25.0.6") but can you elaborate why this is required for the generic > host-mesa3d? Perhaps some llvm related logic should be added for the host. > --- > package/mesa3d/mesa3d.mk | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk > index e41bf68d8ec..09b098628ab 100644 > --- a/package/mesa3d/mesa3d.mk > +++ b/package/mesa3d/mesa3d.mk > @@ -297,6 +297,7 @@ HOST_MESA3D_CONF_OPTS = \ > -Dgallium-drivers=$(subst $(space),$(comma),$(HOST_MESA3D_GALLIUM_DRIVERS-y)) \ > -Dtools=$(subst $(space),$(comma),$(HOST_MESA3D_TOOLS)) \ > -Dinstall-mesa-clc=true \ > + -Dllvm=enabled \ > -Dmesa-clc=enabled \ > -Dplatforms= \ > -Dprecomp-compiler=enabled \ > @@ -306,6 +307,7 @@ HOST_MESA3D_CONF_OPTS = \ > HOST_MESA3D_DEPENDENCIES = \ > host-libclc \ > host-libdrm \ > + host-llvm \ > host-python-mako \ > host-python-pyyaml \ > host-spirv-tools _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Buildroot] [PATCH v2 1/2] package/mesa3d: explicitly enable llvm for host-mesa3d 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: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 2 siblings, 0 replies; 16+ messages in thread From: Thomas Perale via buildroot @ 2026-02-13 19:36 UTC (permalink / raw) To: Thomas Devoogdt; +Cc: Thomas Perale, buildroot In reply of: > LLVM is already implicitly enabled for host-mesa3d when > BR2_PACKAGE_MESA3D_NEEDS_PRECOMP_COMPILER is selected. This blind > option is automatically enabled when LLVM is required by drivers such > as intel-iris, panfrost, imagination, or intel-vulkan. > > The BR2_PACKAGE_MESA3D_LLVM option also independently selects host-llvm, > but this change makes the dependency more explicit for host-mesa3d > builds. > > Note that disabling LLVM is not possible for host-mesa3d, as the build > will fail with: > ../../../br-test-pkg/bootlin-armv5-uclibc/build/host-mesa3d-25.3.2/meson.build:847:3: ERROR: Feature llvm cannot be disabled: CLC requires LLVM > > Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com> Applied to 2025.11.x. Thanks > --- > v2: Explicitly added the llvm flag to host-mesa3d configuration, > see https://lore.kernel.org/buildroot/20251226101445.2b29f439@windsurf/. > @bkuhls, I can see that CLC support is needed to compile the intel-iris > driver, (commit 317260f "package/{mesa3d, mesa3d-headers}: bump version to > 25.0.6") but can you elaborate why this is required for the generic > host-mesa3d? Perhaps some llvm related logic should be added for the host. > --- > package/mesa3d/mesa3d.mk | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk > index e41bf68d8ec..09b098628ab 100644 > --- a/package/mesa3d/mesa3d.mk > +++ b/package/mesa3d/mesa3d.mk > @@ -297,6 +297,7 @@ HOST_MESA3D_CONF_OPTS = \ > -Dgallium-drivers=$(subst $(space),$(comma),$(HOST_MESA3D_GALLIUM_DRIVERS-y)) \ > -Dtools=$(subst $(space),$(comma),$(HOST_MESA3D_TOOLS)) \ > -Dinstall-mesa-clc=true \ > + -Dllvm=enabled \ > -Dmesa-clc=enabled \ > -Dplatforms= \ > -Dprecomp-compiler=enabled \ > @@ -306,6 +307,7 @@ HOST_MESA3D_CONF_OPTS = \ > HOST_MESA3D_DEPENDENCIES = \ > host-libclc \ > host-libdrm \ > + host-llvm \ > host-python-mako \ > host-python-pyyaml \ > host-spirv-tools > -- > 2.43.0 > > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <31717e07-e32d-43c5-9a78-e2e6b7b3f3b5@kuhls.net>]
* Re: [Buildroot] [PATCH v2 1/2] package/mesa3d: explicitly enable llvm for [not found] ` <31717e07-e32d-43c5-9a78-e2e6b7b3f3b5@kuhls.net> @ 2026-01-03 10:51 ` Thomas Devoogdt 0 siblings, 0 replies; 16+ messages in thread From: Thomas Devoogdt @ 2026-01-03 10:51 UTC (permalink / raw) To: Bernd Kuhls; +Cc: thomas, Thomas Petazzoni, Arnout Vandecappelle via buildroot [-- Attachment #1.1: Type: text/plain, Size: 1959 bytes --] Hi Bernd, You are effectively conforming to what I was thinking, CLC is required for the host-mesa3d selection. Which means that LLVM is required. And therein lies the issue. The host-mesa3d package is not able to properly select the right llvm-config, see my second patch for the full explanation: https://lore.kernel.org/buildroot/20260103084002.2045193-2-thomas@devoogdt.com/ . So to conclude, this patch series is twofold, first I explicitly enabled LLVM for the host-mesa3d package as it is required for CLC. Secondly, it fixes the llvm-config resolving, to avoid mixed use with the system version and the buildroot shipped version. Kr, Thomas Devoogdt Op za 3 jan 2026 om 10:44 schreef Bernd Kuhls <bernd@kuhls.net>: > [This mail was also posted to gmane.comp.lib.uclibc.buildroot.] > > Am Sat, 3 Jan 2026 09:40:01 +0100 schrieb Thomas Devoogdt: > > > @bkuhls, I can see that CLC support is needed to compile the > > intel-iris driver, (commit 317260f "package/{mesa3d, > > mesa3d-headers}: bump version to 25.0.6") but can you elaborate why > > this is required for the generic host-mesa3d? Perhaps some llvm > > related logic should be added for the host. > > Hi Thomas, > > the sole purpose of host-mesa3d is to provide the host-binaries mesa_clc > and vtn_bindgen2 which are needed by some drivers. The dependency to host- > mesa3d is only used when the blind option > BR2_PACKAGE_MESA3D_NEEDS_PRECOMP_COMPILER was enabled by the respective > drivers which in turn all depend on BR2_PACKAGE_MESA3D_LLVM=y. > > But not all llvm-depending drivers need these host binaries, like > llvmpipe, radeonsi or vulkan-swrast, therefore the different Config.in > options. But yes, mesa3d was always a messy package because of the many > build options possible ;) > > Do you need the host-mesa3d for other purposes than providing the > forementioned binaries? In other words: Which problem do you want to solve? > > Regards, Bernd > > [-- Attachment #1.2: Type: text/html, Size: 2639 bytes --] [-- Attachment #2: Type: text/plain, Size: 150 bytes --] _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [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