Bug 15916

Summary: mesa3d fails to build
Product: buildroot Reporter: Dr I J Ormshaw <ian_ormshaw>
Component: OtherAssignee: unassigned
Status: RESOLVED MOVED    
Severity: major CC: buildroot, yann.morin.1998
Priority: P5    
Version: 2023.11.1   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:
Attachments: defconfig

Description Dr I J Ormshaw 2024-01-17 13:09:25 UTC
Created attachment 9694 [details]
defconfig

building mesa3d (23.2.1) fails to build with the following error:

GIT_DIR=. PATH="/home/ian/build/x86_64-WatersAMST-linux-gnu_24-support-mesa3d-gallium-amdgpu-opencl-62350056/host/bin:/home/ian/build/x86_64-WatersAMST-linux-gnu_24-support-mesa3d-gallium-amdgpu-opencl-62350056/host/sbin:/home/ian/.local/bin:/home/ian/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/var/lib/snapd/snap/bin"  PYTHONNOUSERSITE=y /home/ian/build/x86_64-WatersAMST-linux-gnu_24-support-mesa3d-gallium-amdgpu-opencl-62350056/host/bin/ninja   -C /home/ian/build/x86_64-WatersAMST-linux-gnu_24-support-mesa3d-gallium-amdgpu-opencl-62350056/build/mesa3d-23.2.1//build
ninja: Entering directory `/home/ian/build/x86_64-WatersAMST-linux-gnu_24-support-mesa3d-gallium-amdgpu-opencl-62350056/build/mesa3d-23.2.1//build'
[3/680] Compiling C object src/compiler/nir/libnir.a.p/meson-generated_.._nir_opt_algebraic.c.o
src/compiler/nir/nir_opt_algebraic.c: In function ‘nir_opt_algebraic’:
src/compiler/nir/nir_opt_algebraic.c:1374082: note: ‘-Wmisleading-indentation’ is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers
1374082 |    nir_foreach_function_impl(impl, shader) {
        | 
src/compiler/nir/nir_opt_algebraic.c:1374082: note: adding ‘-flarge-source-files’ will allow for more column-tracking support, at the expense of compilation time and memory
[14/678] Compiling C++ object src/compiler/clc/liblibmesaclc.a.p/clc_helpers.cpp.o
FAILED: src/compiler/clc/liblibmesaclc.a.p/clc_helpers.cpp.o 
/home/ian/build/x86_64-WatersAMST-linux-gnu_24-support-mesa3d-gallium-amdgpu-opencl-62350056/host/bin/x86_64-WatersAMST-linux-gnu-g++ -Isrc/compiler/clc/liblibmesaclc.a.p -Isrc/compiler/clc -I../src/compiler/clc -Iinclude -I../include -Isrc -I../src -Isrc/mapi -I../src/mapi -Isrc/mesa -I../src/mesa -Isrc/compiler -I../src/compiler -Isrc/compiler/spirv -I../src/compiler/spirv -Isrc/compiler/nir -I../src/compiler/nir -I../src/gallium/include -I/home/ian/build/x86_64-WatersAMST-linux-gnu_24-support-mesa3d-gallium-amdgpu-opencl-62350056/host/x86_64-WatersAMST-linux-gnu/sysroot/usr/include -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 '-DPACKAGE_VERSION="23.2.1"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"' -DHAVE_OPENGL=1 -DHAVE_OPENGL_ES_1=1 -DHAVE_OPENGL_ES_2=1 -DHAVE_R600 -DVIDEO_CODEC_VC1DEC=0 -DVIDEO_CODEC_H264DEC=0 -DVIDEO_CODEC_H264ENC=0 -DVIDEO_CODEC_H265DEC=0 -DVIDEO_CODEC_H265ENC=0 -DHAVE_SURFACELESS_PLATFORM -DHAVE_DRM_PLATFORM -DENABLE_ST_OMX_BELLAGIO=0 -DENABLE_ST_OMX_TIZONIA=0 -DGLAPI_EXPORT_PROTO_ENTRY_POINTS=1 -DALLOW_KCMP -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE___BUILTIN_TYPES_COMPATIBLE_P -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_UINT128 -DHAVE_REALLOCARRAY -DHAVE_FMEMOPEN -DUSE_SSE41 -DUSE_GCC_ATOMIC_BUILTINS -DUSE_X86_64_ASM -DMAJOR_IN_SYSMACROS -DHAS_SCHED_H -DHAS_SCHED_GETAFFINITY -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_SYS_SHM_H -DHAVE_CET_H -DHAVE_SYS_INOTIFY_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_MEMFD_CREATE -DHAVE_RANDOM_R -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM -DHAVE_POSIX_FALLOCATE -DHAVE_GNU_QSORT_R -DHAVE_STRUCT_TIMESPEC -DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_ISSIGNALING -DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_ZSTD -DHAVE_COMPRESSION -DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM -DHAVE_LIBUDEV -DLLVM_AVAILABLE '-DMESA_LLVM_VERSION_STRING="15.0.3"' -DLLVM_IS_SHARED=1 -DDRAW_LLVM_AVAILABLE -DUSE_LIBELF -DHAVE_OPENMP -DHAVE_DRI -DHAVE_DRI2 -DHAVE_DRISW_KMS -DHAVE_GALLIUM_EXTRA_HUD=1 -Werror=return-type -Werror=empty-body -Wmisleading-indentation -Wno-non-virtual-dtor -Wno-missing-field-initializers -Wno-format-truncation -fno-math-errno -fno-trapping-math -flifetime-dse=1 -Werror=format -Wformat-security -ffunction-sections -fdata-sections -Wno-unused-variable -Wno-unused-but-set-variable -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -g0 -fPIC -pthread -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DLLVM_LIB_DIR="/home/ian/build/x86_64-WatersAMST-linux-gnu_24-support-mesa3d-gallium-amdgpu-opencl-62350056/host/x86_64-WatersAMST-linux-gnu/sysroot/usr/lib"' -DHAS_SPIRV_1_4=1 '-DDYNAMIC_LIBCLC_PATH="/usr/share/clc/"' -MD -MQ src/compiler/clc/liblibmesaclc.a.p/clc_helpers.cpp.o -MF src/compiler/clc/liblibmesaclc.a.p/clc_helpers.cpp.o.d -o src/compiler/clc/liblibmesaclc.a.p/clc_helpers.cpp.o -c ../src/compiler/clc/clc_helpers.cpp
../src/compiler/clc/clc_helpers.cpp:40:10: fatal error: LLVMSPIRVLib/LLVMSPIRVLib.h: No such file or directory
   40 | #include <LLVMSPIRVLib/LLVMSPIRVLib.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[35/678] Compiling C++ object src/compiler/glsl/libglsl.a.p/linker.cpp.o
ninja: build stopped: subcommand failed.
Comment 1 Dr I J Ormshaw 2024-03-19 07:55:04 UTC
Adding spirv tools on my build system

$ dnf5 list --installed *spirv*
Installed packages
spirv-headers-devel.noarch   1.5.5-20.fc39 updates
spirv-llvm-translator.x86_64 17.0.0-1.fc39 fedora
spirv-tools.x86_64           2023.3-3.fc39 updates
spirv-tools-devel.x86_64     2023.3-3.fc39 updates
spirv-tools-libs.x86_64      2023.3-3.fc39 updates

And setting

Symbol: BR2_PACKAGE_SPIRV_HEADERS [=y]
Symbol: BR2_PACKAGE_SPIRV_TOOLS [=y]

gives the followinf error:

Found CMake: /usr/bin/cmake (3.27.7)
Run-time dependency spirv-tools found: NO (tried pkgconfig and cmake)

../../../../../build/x86_64-WatersAMST-linux-gnu_24-support-mesa3d-gallium-amdgpu-opencl-e791e9b4/build/mesa3d-24.0.0/meson.build:1843:20: ERROR: Dependency "SPIRV-Tools" not found, tried pkgconfig and cmake

A full log can be found at /home/ian/build/x86_64-WatersAMST-linux-gnu_24-support-mesa3d-gallium-amdgpu-opencl-e791e9b4/build/mesa3d-24.0.0/build/meson-logs/meson-log.txt
Comment 2 Dr I J Ormshaw 2024-03-19 08:03:17 UTC
Adding spirv tools on my build system

$ dnf5 list --installed *spirv*
Installed packages
spirv-headers-devel.noarch   1.5.5-20.fc39 updates
spirv-llvm-translator.x86_64 17.0.0-1.fc39 fedora
spirv-tools.x86_64           2023.3-3.fc39 updates
spirv-tools-devel.x86_64     2023.3-3.fc39 updates
spirv-tools-libs.x86_64      2023.3-3.fc39 updates

And setting

Symbol: BR2_PACKAGE_SPIRV_HEADERS [=y]
Symbol: BR2_PACKAGE_SPIRV_TOOLS [=y]

gives the followinf error:

Found CMake: /usr/bin/cmake (3.27.7)
Run-time dependency spirv-tools found: NO (tried pkgconfig and cmake)

../../../../../build/x86_64-WatersAMST-linux-gnu_24-support-mesa3d-gallium-amdgpu-opencl-e791e9b4/build/mesa3d-24.0.0/meson.build:1843:20: ERROR: Dependency "SPIRV-Tools" not found, tried pkgconfig and cmake

A full log can be found at /home/ian/build/x86_64-WatersAMST-linux-gnu_24-support-mesa3d-gallium-amdgpu-opencl-e791e9b4/build/mesa3d-24.0.0/build/meson-logs/meson-log.txt


forcing the spirv tools to be build by removing mesa3d from the config, re-building then addinf mesa3d bac into the config again gives the error:

Found CMake: /usr/bin/cmake (3.27.7)
Run-time dependency llvmspirvlib found: NO (tried pkgconfig and cmake)

../../../../../build/x86_64-WatersAMST-linux-gnu_24-support-mesa3d-gallium-amdgpu-opencl-e791e9b4/build/mesa3d-24.0.0/meson.build:1845:21: ERROR: Dependency "LLVMSPIRVLib" not found, tried pkgconfig and cmake
Comment 3 Yann E. MORIN 2024-06-15 15:24:43 UTC
Thank you for your report.

The issue tracker for the Buildroot project has been moved to
the Gitlab.com issue tracker:
    https://gitlab.com/buildroot.org/buildroot/-/issues

We are taking this opportunity to close old issues in this old
tracker. If you believe your issue is still relevant, please
open one in the new issue tracker.

Thank you!