mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-23 15:54:21 -09:00
eb0e63888bae4b79b20b9cfcfdf44cc256c532ff
On Buildroot 2025.05.3, 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. On the master branch, the 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 ([...]/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 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> [Romain: - Update the commit title - Update commit log about this issue on master branch https://lore.kernel.org/buildroot/CACXRmJh1-5Cy92kF9TM5nDs_uB90WAe5iOGmNNL2E-cMhJE7GA@mail.gmail.com/ ] Signed-off-by: Romain Naour <romain.naour@smile.fr>
…
…
Buildroot is a simple, efficient and easy-to-use tool to generate embedded Linux systems through cross-compilation. The documentation can be found in docs/manual. You can generate a text document with 'make manual-text' and read output/docs/manual/manual.text. Online documentation can be found at https://buildroot.org/docs.html To build and use the buildroot stuff, do the following: 1) run 'make menuconfig' 2) select the target architecture and the packages you wish to compile 3) run 'make' 4) wait while it compiles 5) find the kernel, bootloader, root filesystem, etc. in output/images You do not need to be root to build or run buildroot. Have fun! Buildroot comes with a basic configuration for a number of boards. Run 'make list-defconfigs' to view the list of provided configurations. Please feed suggestions, bug reports, insults, and bribes back to the buildroot mailing list: buildroot@buildroot.org You can also find us on #buildroot on OFTC IRC. If you would like to contribute patches, please read https://buildroot.org/manual.html#submitting-patches
Description
Languages
Makefile
62.6%
Python
18.8%
C
8.5%
Shell
6.1%
PHP
1.4%
Other
2.2%