intel-clc: opencl-c-base.h not found
Since 6474f8c2, compiling fails with:
FAILED: src/intel/shaders/intel_gfx9_shaders_code.h
env MESA_SHADER_CACHE_DISABLE=true /buildstream-build/_builddir/src/intel/compiler/intel_clc --llvm17-wa --nir --gfx-version=9 --prefix gfx9_intel_shaders --in ../src/intel/shaders/libintel_shaders.h --in ../src/intel/shaders/generate.cl --in ../src/intel/shaders/generate_draws.cl --in ../src/intel/shaders/generate_draws_iris.cl --in ../src/intel/shaders/memcpy.cl --in ../src/intel/shaders/query_copy.cl -o src/intel/shaders/intel_gfx9_shaders_code.h -- -cl-std=cl2.0 -D__OPENCL_VERSION__=200 -DGFX_VERx10=90 -I/buildstream-build/src/intel/shaders/. -I/buildstream-build/src -I/buildstream-build/src/intel -I/buildstream-build/_builddir/src/intel -I/buildstream-build/src/intel/genxml
<built-in>:1:10: fatal error: 'opencl-c-base.h' file not found
Output of meson configure:
meson
The Meson build system
Version: 1.3.2
Source dir: /buildstream-build
Build dir: /buildstream-build/_builddir
Build type: native build
Project name: mesa
Project version: 24.1.0-devel
C compiler for the host machine: cc (gcc 13.2.0 "cc (GCC) 13.2.0")
C linker for the host machine: cc ld.bfd 2.42
C++ compiler for the host machine: c++ (gcc 13.2.0 "c++ (GCC) 13.2.0")
C++ linker for the host machine: c++ ld.bfd 2.42
Host machine cpu family: x86_64
Host machine cpu: x86_64
Checking for size of "void*" : 8
Checking if "-mtls-dialect=gnu2" runs: YES
Checking if "split TLSDESC" : links: YES
Found pkg-config: YES (/usr/bin/pkg-config) 2.1.1
Run-time dependency vdpau found: YES 1.5
Program glslangValidator found: YES (/usr/bin/glslangValidator)
Run-time dependency libva found: YES 1.20.0
Header "va/va.h" has symbol "VASurfaceAttribDRMFormatModifiers" with dependency libva: YES
meson.build:838: WARNING: add_languages is missing native:, assuming languages are wanted for both host and build.
Rust compiler for the host machine: rustc -C linker=cc (rustc 1.76.0)
Rust linker for the host machine: rustc -C linker=cc ld.bfd 2.42
Run-time dependency libclc found: YES 0.2.0
Program python3 found: YES (/usr/bin/python3)
Fetching value of define "ETIME" : 62
Checking for function "bswap32" : YES
Checking for function "bswap64" : YES
Checking for function "clz" : YES
Checking for function "clzll" : YES
Checking for function "ctz" : YES
Checking for function "expect" : YES
Checking for function "ffs" : YES
Checking for function "ffsll" : YES
Checking for function "popcount" : YES
Checking for function "popcountll" : YES
Checking for function "unreachable" : YES
Checking for function "types_compatible_p" : YES
Compiler for C supports function attribute const: YES
Compiler for C supports function attribute flatten: YES
Compiler for C supports function attribute malloc: YES
Compiler for C supports function attribute pure: YES
Compiler for C supports function attribute unused: YES
Compiler for C supports function attribute warn_unused_result: YES
Compiler for C supports function attribute weak: YES
Compiler for C supports function attribute format: YES
Compiler for C supports function attribute packed: YES
Compiler for C supports function attribute returns_nonnull: YES
Compiler for C supports function attribute alias: YES
Compiler for C supports function attribute noreturn: YES
Compiler for C supports function attribute visibility:hidden: YES
Checking if "__uint128_t" compiles: YES
Checking for function "reallocarray" : YES
Checking for function "fmemopen" : YES
Checking if "gc-sections" : links: YES
Compiler for C supports arguments -Werror=implicit-function-declaration: YES
Compiler for C supports arguments -Werror=missing-prototypes: YES
Compiler for C supports arguments -Werror=return-type: YES
Compiler for C supports arguments -Werror=empty-body: YES
Compiler for C supports arguments -Werror=incompatible-pointer-types: YES
Compiler for C supports arguments -Werror=int-conversion: YES
Compiler for C supports arguments -Wimplicit-fallthrough: YES
Compiler for C supports arguments -Wmisleading-indentation: YES
Compiler for C supports arguments -Wno-missing-field-initializers: YES
Compiler for C supports arguments -Wno-format-truncation: YES
Compiler for C supports arguments -Wno-nonnull-compare: YES
Compiler for C supports arguments -fno-math-errno: YES
Compiler for C supports arguments -fno-trapping-math: YES
Compiler for C supports arguments -Qunused-arguments: NO
Compiler for C supports arguments -fno-common: YES
Compiler for C supports arguments -Wno-unknown-pragmas: YES
Compiler for C supports arguments -Wno-microsoft-enum-value: NO
Compiler for C supports arguments -Wno-unused-function: YES
Compiler for C supports arguments -Werror=format: YES
Compiler for C supports arguments -Wformat-security: YES
Compiler for C supports arguments -Werror=thread-safety: NO
Compiler for C supports arguments -ffunction-sections: YES
Compiler for C supports arguments -fdata-sections: YES
Compiler for C supports arguments -Wno-unused-variable: YES
Compiler for C supports arguments -Wno-unused-but-set-variable: YES
Compiler for C supports arguments /wd4189: NO
Compiler for C++ supports arguments -Werror=return-type: YES
Compiler for C++ supports arguments -Werror=empty-body: YES
Compiler for C++ supports arguments -Wmisleading-indentation: YES
Compiler for C++ supports arguments -Wno-non-virtual-dtor: YES
Compiler for C++ supports arguments -Wno-missing-field-initializers: YES
Compiler for C++ supports arguments -Wno-format-truncation: YES
Compiler for C++ supports arguments -fno-math-errno: YES
Compiler for C++ supports arguments -fno-trapping-math: YES
Compiler for C++ supports arguments -Qunused-arguments: NO
Compiler for C++ supports arguments -flifetime-dse=1: YES
Compiler for C++ supports arguments -Wno-unknown-pragmas: YES
Compiler for C++ supports arguments -Wno-microsoft-enum-value: NO
Compiler for C++ supports arguments -Werror=format: YES
Compiler for C++ supports arguments -Wformat-security: YES
Compiler for C++ supports arguments -ffunction-sections: YES
Compiler for C++ supports arguments -fdata-sections: YES
Compiler for C++ supports arguments -Wno-unused-variable: YES
Compiler for C++ supports arguments -Wno-unused-but-set-variable: YES
Compiler for C++ supports arguments /wd4189: NO
Compiler for C supports arguments -Wno-override-init: YES
Compiler for C supports arguments -Wno-initializer-overrides: NO
Compiler for C supports arguments -Werror=pointer-arith: YES
Compiler for C supports arguments -Werror=vla: YES
Compiler for C supports arguments -Werror=gnu-empty-initializer: NO
Compiler for C++ supports arguments -Werror=pointer-arith: YES
Compiler for C++ supports arguments -Werror=vla: YES
Compiler for C++ supports arguments -Werror=gnu-empty-initializer: NO
Checking for function "__builtin_ia32_clflushopt" : YES
Checking if "GCC atomic builtins" compiles: YES
Checking if "GCC atomic builtins required -latomic" : links: YES
Checking if "GCC 64bit atomics" with dependency : links: YES
Library ws2_32 found: NO
Header "sys/sysmacros.h" has symbol "major" : YES
Header "sys/sysmacros.h" has symbol "minor" : YES
Header "sys/sysmacros.h" has symbol "makedev" : YES
Header "sys/mkdev.h" has symbol "major" : NO
Check usable header "sched.h" : YES
Checking for function "sched_getaffinity" : YES
Check usable header "xlocale.h" : NO
Check usable header "linux/futex.h" : YES
Check usable header "endian.h" : YES
Check usable header "dlfcn.h" : YES
Check usable header "sys/shm.h" : YES
Check usable header "cet.h" : YES
Check usable header "pthread_np.h" : NO
Check usable header "renderdoc_app.h" : NO
Check usable header "sys/inotify.h" : YES
Checking for function "strtof" : YES
Checking for function "mkostemp" : YES
Checking for function "memfd_create" : YES
Checking for function "random_r" : YES
Checking for function "flock" : YES
Checking for function "strtok_r" : YES
Checking for function "getrandom" : YES
Checking for function "qsort_s" : NO
Checking for function "posix_fallocate" : YES
Checking for function "secure_getenv" : YES
Checking if "GNU qsort_r" : links: YES
Header "time.h" has symbol "struct timespec" : YES
Checking for function "thrd_create" : YES
Header "errno.h" has symbol "program_invocation_name" : YES
Header "math.h" has symbol "issignaling" : YES
Checking for function "posix_memalign" : YES
Checking whether type "struct dirent" has member "d_type" : YES
Checking if "strtod has locale support" : links: YES
Checking if "Bsymbolic" : links: YES
Checking if "version-script" : links: YES
Checking if "dynamic-list" : links: YES
Compiler for C supports link arguments -Wl,--build-id=sha1: YES
Checking for function "dlopen" : YES
Checking for function "dladdr" with dependency : YES
Checking for function "dl_iterate_phdr" : YES
Checking for function "clock_gettime" : YES
Run-time dependency zlib found: YES 1.3.1
Run-time dependency libzstd found: YES 1.5.5
Run-time dependency threads found: YES
Checking for function "pthread_setaffinity_np" with dependency threads: YES
Run-time dependency expat found: YES 2.6.1
Library m found: YES
Message: libdrm 2.4.119 needed because amdgpu has the highest requirement
Run-time dependency libdrm_intel found: YES 2.4.120
Run-time dependency libdrm_amdgpu found: YES 2.4.120
Run-time dependency libdrm_radeon found: YES 2.4.120
Run-time dependency libdrm_nouveau found: YES 2.4.120
Run-time dependency libdrm found: YES 2.4.120
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency libudev found: NO (tried pkgconfig and cmake)
llvm-config found: YES (/usr/bin/llvm-config) 17.0.6
Run-time dependency LLVM (modules: amdgpu, asmparser, bitreader, bitwriter, core, coverage, engine, executionengine, instcombine, ipo, irreader, libdriver, linker, lto, mcdisassembler, mcjit, native, option, scalaropts, target, transformutils, all-targets, coroutines, frontendhlsl, lto, windowsdriver) found: YES 17.0.6
Run-time dependency spirv-tools found: YES 2023.6.1
Run-time dependency llvmspirvlib found: YES 17.0.0.0
Library clang-cpp found: YES
Run-time dependency libelf found: YES 0.189
Run-time dependency libglvnd found: YES 1.7.0
Dependency valgrind skipped: feature valgrind disabled
Program bison found: YES (/usr/bin/bison)
Program bison found: YES 3.8.2 3.8.2 (/usr/bin/bison)
Program flex found: YES (/usr/bin/flex)
Run-time dependency libunwind found: YES 1.8.0
Build-time dependency wayland-scanner found: YES 1.22.0
Program /usr/bin/wayland-scanner found: YES (/usr/bin/wayland-scanner)
Run-time dependency wayland-protocols found: YES 1.33
Run-time dependency wayland-client found: YES 1.22.0
Run-time dependency wayland-server found: YES 1.22.0
Run-time dependency wayland-egl-backend found: YES 3
Checking for function "wl_display_dispatch_queue_timeout" with dependency wayland-client: NO
Checking for function "wl_display_create_queue_with_name" with dependency wayland-client: NO
Run-time dependency OpenMP found: YES 4.5
Run-time dependency x11 found: YES 1.8.7
Run-time dependency xext found: YES 1.3.6
Run-time dependency xfixes found: YES 6.0.1
Run-time dependency xcb-glx found: YES 1.16
Run-time dependency xcb-shm found: YES 1.16
Run-time dependency xcb found: YES 1.16
Run-time dependency xcb-keysyms found: NO (tried pkgconfig and cmake)
Run-time dependency x11-xcb found: YES 1.8.7
Run-time dependency xcb-dri2 found: YES 1.16
Run-time dependency xcb-dri3 found: YES 1.16
Run-time dependency xcb-present found: YES 1.16
Dependency xcb-shm found: YES 1.16 (cached)
Run-time dependency xcb-sync found: YES 1.16
Run-time dependency xshmfence found: YES 1.3.2
Run-time dependency glproto found: YES 1.4.17
Run-time dependency dri2proto found: YES 2.8
Run-time dependency xxf86vm found: YES 1.1.5
Run-time dependency xcb-xfixes found: YES 1.16
Run-time dependency xcb-randr found: YES 1.16
Run-time dependency xrandr found: YES 1.5.4
Library sensors skipped: feature lmsensors disabled
Program nm found: YES (/usr/bin/nm)
Program symbols-check.py found: YES (/usr/bin/python /buildstream-build/bin/symbols-check.py)
Program install_megadrivers.py found: YES (/usr/bin/python /buildstream-build/bin/install_megadrivers.py)
Compiler for C supports arguments -Wno-misleading-indentation: YES
Checking for function "mmap" : YES
Compiler for C supports link arguments -fPIC: YES
Program decode.py found: YES (/buildstream-build/src/compiler/isaspec/decode.py)
Program encode.py found: YES (/buildstream-build/src/compiler/isaspec/encode.py)
Compiler for C supports link arguments -Wl,-Bsymbolic-functions: YES
Compiler for C supports link arguments -Wl,-z,relro: YES
Compiler for C supports link arguments -Wl,-Bsymbolic-functions: YES (cached)
Compiler for C supports link arguments -Wl,-z,relro: YES (cached)
WARNING: Tried to mix libraries for machines build machine and host machine in target 'intel_clc' This will fail in cross build.
WARNING: Tried to mix libraries for machines build machine and host machine in target 'intel_clc' This will fail in cross build.
WARNING: Tried to mix libraries for machines build machine and host machine in target 'intel_clc' This will fail in cross build.
WARNING: Tried to mix libraries for machines build machine and host machine in target 'intel_clc' This will fail in cross build.
WARNING: Tried to mix libraries for machines build machine and host machine in target 'intel_clc' This will fail in cross build.
WARNING: Tried to mix libraries for machines build machine and host machine in target 'intel_clc' This will fail in cross build.
WARNING: Tried to mix libraries for machines build machine and host machine in target 'intel_clc' This will fail in cross build.
WARNING: Tried to mix libraries for machines build machine and host machine in target 'intel_clc' This will fail in cross build.
WARNING: Tried to mix libraries for machines build machine and host machine in target 'intel_clc' This will fail in cross build.
WARNING: Tried to mix libraries for machines build machine and host machine in target 'intel_clc' This will fail in cross build.
WARNING: Tried to mix libraries for machines build machine and host machine in target 'intel_clc' This will fail in cross build.
Compiler for C++ supports arguments -Wno-unused-variable: YES (cached)
Compiler for C++ supports arguments -Wno-unused-local-typedefs: YES
Compiler for C++ supports arguments -Wno-unused-but-set-variable: YES (cached)
Compiler for C++ supports arguments -Wno-maybe-uninitialized: YES
Compiler for C++ supports arguments -Wno-self-assign: NO
Compiler for C++ supports arguments /wd4189: NO (cached)
Compiler for C++ supports arguments -fno-exceptions: YES
Compiler for C++ supports arguments -fno-rtti: YES
Compiler for C++ supports arguments -Wimplicit-fallthrough: YES
Compiler for C++ supports arguments -Wshadow: YES
Compiler for C supports arguments -Wimplicit-fallthrough: YES (cached)
Compiler for C supports arguments -Wshadow: YES
Compiler for C supports arguments -Wall: YES
Compiler for C supports arguments -Wextra: YES
Compiler for C supports arguments -Wno-unused: YES
Compiler for C supports arguments -Wno-unused-parameter: YES
Compiler for C supports arguments -Wno-unused-command-line-argument: NO
Compiler for C supports arguments -Wno-ignored-qualifiers: YES
Compiler for C supports arguments -Wno-missing-field-initializers: YES (cached)
Compiler for C supports arguments -Wno-self-assign: NO
Compiler for C supports arguments -Wno-implicit-fallthrough: YES
Compiler for C supports arguments -Werror=comment: YES
Compiler for C supports arguments -Werror=missing-braces: YES
Compiler for C supports arguments -Werror=override-init: YES
Compiler for C supports arguments -Werror=enum-conversion: YES
Compiler for C supports arguments -Werror=enum-compare: YES
Compiler for C supports arguments -Werror=maybe-uninitialized: YES
Checking for type "std::pmr::monotonic_buffer_resource" : YES
Program bindgen found: YES (/usr/bin/bindgen)
Program bindgen found: YES (/usr/bin/bindgen)
src/gallium/frontends/rusticl/meson.build:198: WARNING: Project targets '>= 1.1.0' but uses feature introduced in '1.3.0': rust_abi arg in static_library.
src/gallium/frontends/rusticl/meson.build:233: WARNING: Project targets '>= 1.1.0' but uses feature introduced in '1.3.0': rust_abi arg in static_library.
src/gallium/frontends/rusticl/meson.build:390: WARNING: Project targets '>= 1.1.0' but uses feature introduced in '1.3.0': rust_abi arg in static_library.
src/gallium/frontends/rusticl/meson.build:406: WARNING: Project targets '>= 1.1.0' but uses feature introduced in '1.3.0': rust_abi arg in static_library.
src/gallium/frontends/rusticl/meson.build:416: WARNING: Project targets '>= 1.1.0' but uses feature introduced in '1.3.0': rust_abi arg in static_library.
src/gallium/frontends/rusticl/meson.build:426: WARNING: Project targets '>= 1.1.0' but uses feature introduced in '1.3.0': rust_abi arg in static_library.
src/gallium/frontends/rusticl/meson.build:443: WARNING: Project targets '>= 1.1.0' but uses feature introduced in '1.3.0': rust.proc_macro.
src/gallium/frontends/rusticl/meson.build:451: WARNING: Project targets '>= 1.1.0' but uses feature introduced in '1.3.0': rust_abi arg in static_library.
Configuring rusticl.icd using configuration
Configuring dri.sym using configuration
Program ln found: YES (/usr/bin/ln)
Configuring vdpau.sym using configuration
Configuring va.sym using configuration
Checking for function "mincore" : YES
Configuring 50_mesa.json using configuration
Build targets in project: 401
WARNING: Project specifies a minimum meson_version '>= 1.1.0' but uses features which were added in newer versions:
* 1.3.0: {'rust.proc_macro', 'rust_abi arg in static_library'}
mesa 24.1.0-devel
Directories
prefix : /usr/lib/x86_64-linux-gnu/GL/default
libdir : lib
includedir : include
Common C and C++ arguments
c_cpp_args : -mtls-dialect=gnu2
OpenGL
OpenGL : YES
ES1 : NO
ES2 : YES
Shared glapi : YES
GLVND : YES
DRI
Platform : drm
Driver dir : /usr/lib/x86_64-linux-gnu/GL/default/lib/dri
GLX
Enabled : YES
Provider : dri
EGL
Enabled : YES
Drivers : builtin:egl_dri2 builtin:egl_dri3
Platforms : x11 wayland surfaceless drm xcb
GBM
Enabled : YES
Backends path : /usr/lib/x86_64-linux-gnu/GL/lib/gbm
Vulkan
Drivers : amd intel intel_hasvk swrast virtio
Platforms : x11 wayland surfaceless drm xcb
ICD dir : /usr/lib/x86_64-linux-gnu/GL/default/lib/vulkan/icd.d
Layers : device-select overlay
Intel Ray tracing : NO
Video
Codecs : av1dec av1enc vp9dec
APIs : vdpau va vulkan
LLVM
Enabled : YES
Version : 17.0.6
Gallium
Enabled : YES
Drivers : iris crocus nouveau r300 r600 radeonsi svga
swrast virgl zink i915
Platforms : x11 wayland surfaceless drm xcb
Frontends : mesa vdpau va nine rusticl
Off-screen rendering (OSMesa): NO
HUD lm-sensors : NO
Perfetto
Enabled : NO
Teflon (TensorFlow Lite delegate)
Enabled : NO
User defined options
auto_features : enabled
bindir : /usr/lib/x86_64-linux-gnu/GL/default/bin
buildtype : plain
datadir : /usr/lib/x86_64-linux-gnu/GL/default/share
default_library : shared
includedir : /usr/lib/x86_64-linux-gnu/GL/default/include
infodir : /usr/lib/x86_64-linux-gnu/GL/default/share/info
libdir : /usr/lib/x86_64-linux-gnu/GL/default/lib
libexecdir : /usr/lib/x86_64-linux-gnu/GL/default/libexec
localstatedir : /var
mandir : /usr/lib/x86_64-linux-gnu/GL/default/share/man
prefix : /usr/lib/x86_64-linux-gnu/GL/default
sbindir : /usr/lib/x86_64-linux-gnu/GL/default/bin
sharedstatedir : /usr/lib/x86_64-linux-gnu/GL/default/com
sysconfdir : /etc
b_ndebug : true
b_pie : true
rust_std : 2021
android-libbacktrace : disabled
dri3 : enabled
egl : enabled
gallium-drivers : iris,crocus,nouveau,r300,r600,radeonsi,svga,swrast,virgl,zink,i915
gallium-nine : true
gallium-omx : disabled
gallium-rusticl : true
gallium-va : enabled
gallium-vdpau : enabled
gallium-xa : disabled
gbm : enabled
gbm-backends-path : /usr/lib/x86_64-linux-gnu/GL/lib/gbm
gles1 : disabled
gles2 : enabled
glvnd : true
glx : auto
intel-rt : disabled
libunwind : enabled
llvm : enabled
lmsensors : disabled
microsoft-clc : disabled
osmesa : false
platforms : x11,wayland
selinux : false
shared-glapi : enabled
valgrind : disabled
video-codecs : all_free
vulkan-drivers : amd,intel,intel_hasvk,swrast,virtio
vulkan-icd-dir : /usr/lib/x86_64-linux-gnu/GL/default/lib/vulkan/icd.d
vulkan-layers : device-select,overlay
xlib-lease : enabled
zstd : enabled
Build options:
meson flags
- target_arch == "i686" or target_arch == "x86_64":
gallium_drivers: iris,crocus,nouveau,r300,r600,radeonsi,svga,swrast,virgl,zink,i915
vulkan_drivers: amd,intel,intel_hasvk,swrast,virtio
libunwind: enabled
- target_arch == "arm" or target_arch == "aarch64":
gallium_drivers: asahi,etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,virgl,v3d,vc4,zink,r600,r300,radeonsi
vulkan_drivers: freedreno,broadcom,panfrost,swrast,amd
libunwind: disabled
- target_arch in ("ppc64le", "ppc64", "riscv64"):
gallium_drivers: nouveau,r600,r300,radeonsi,swrast,virgl
vulkan_drivers: amd
libunwind: disabled
optimize-debug: "false"
meson-lto-flags: ''
meson-local: >-
-Db_ndebug=true
-Ddri3=enabled
-Degl=enabled
-Dgallium-drivers=%{gallium_drivers}
-Dgallium-nine=true
-Dgallium-omx=disabled
-Dgallium-rusticl=true
-Dgallium-va=enabled
-Dgallium-vdpau=enabled
-Dgallium-xa=disabled
-Dgbm=enabled
-Dgbm-backends-path="/usr/lib/%{gcc_triplet}/GL/lib/gbm"
-Dgles1=disabled
-Dgles2=enabled
-Dglvnd=true
-Dglx=auto
-Dlibunwind=%{libunwind}
-Dllvm=enabled
-Dlmsensors=disabled
-Dmicrosoft-clc=disabled
-Dandroid-libbacktrace=disabled
-Dosmesa=false
-Dplatforms=x11,wayland
-Dselinux=false
-Dshared-glapi=enabled
-Dvalgrind=disabled
-Dvulkan-layers=device-select,overlay
-Dvulkan-drivers=%{vulkan_drivers}
-Dvulkan-icd-dir="%{libdir}/vulkan/icd.d"
-Dxlib-lease=enabled
-Dzstd=enabled
-Dvideo-codecs=%{video_codecs}
-Drust_std=2021
-Dintel-rt=disabled
At 445aacb4, build works fine again.
Copying the headers to tree, seems to fix the issue: cp '/usr/lib/x86_64-linux-gnu'/clang/17/include/{opencl-c.h,opencl-c-base.h} src/intel
and again to src/asahi/lib
Edited by bbhtt