Thread View: linux.debian.bugs.dist
3 messages
3 total messages
Started by Witold Baryluk
Sun, 01 Nov 2026 21:00
Bug#1152834: /usr/lib/llvm-21/lib/clang/21/include/emmintrin.h:269:10: error: use of undeclared identifier '__builtin_ia32_sqrts...
Author: Witold Baryluk
Date: Sun, 01 Nov 2026 21:00
Date: Sun, 01 Nov 2026 21:00
223 lines
15417 bytes
15417 bytes
Package: bindgen
Version: 0.72.1-1+b3
Severity: normal
X-Debbugs-Cc: witold.baryluk@gmail.com
Dear Maintainer,
I have no idea if this is issue with bindgen, or what, but when
compiling Mesa with rusticl, for many months, I am getting this:
user@debian:~/mesa-git/builddir/build-amd64-opt/mesa$ /usr/bin/bindgen ../../../src/gallium/frontends/rusticl/rusticl_opencl_bindings.h --output /home/user/mesa-git/builddir/build-amd64-opt/mesa/src/gallium/frontends/rusticl/rusticl_opencl_bindings.rs --wrap-unsafe-ops --raw-line '#![allow(clippy::all)]' --raw-line '#![allow(warnings)]' --raw-line '#![allow(unsafe_op_in_unsafe_fn)]' --no-convert-floats --default-enum-style rust --with-derive-partialeq --with-derive-eq --with-derive-partialord --with-derive-ord --with-derive-hash --with-derive-default --anon-fields-prefix anon_ --disable-header-comment --ignore-functions --raw-line 'unsafe impl std::marker::Sync for _cl_icd_dispatch {}' --raw-line 'unsafe impl std::marker::Send for _cl_image_desc {}' --raw-line 'unsafe impl std::marker::Sync for _cl_image_desc {}' --allowlist-type 'cl_.*' --blocklist-type '(__)?cl_.*[2348(16)]' --allowlist-type 'cl.*_fn' --allowlist-var 'CL_.*' --allowlist-var 'GL_.*' --allowlist-var 'MESA_GLINTEROP_.*' --allowlist-type PFNEGLGETPROCADDRESSPROC --allowlist-type PFNGLXGETPROCADDRESSPROC --allowlist-type 'PFNMESAGLINTEROP.*' --new-type-alias-deref 'cl_(mem|image|pipe|gl_texture)_info' --new-type-alias-deref 'cl_kernel_(arg|work_group)_info' --new-type-alias-deref 'cl_(event|profiling)_info' --constified-enum 'MESA_GLINTEROP_.*' --rust-target 1.97.1 --rust-edition 2021 -- -fno-builtin-malloc -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="27.0.0-devel"' -DHAVE_OPENGL=1 -DHAVE_OPENGL_ES_1=1 -DHAVE_OPENGL_ES_2=1 -DHAVE_RADEONSI -DHAVE_R600 -DHAVE_ZINK -DHAVE_VIRGL -DHAVE_SOFTPIPE -DHAVE_LLVMPIPE -DHAVE_SWRAST -DMESA_SYSTEM_HAS_KMS_DRM=1 -DVIDEO_CODEC_VC1DEC=1 -DVIDEO_CODEC_H264DEC=1 -DVIDEO_CODEC_H264ENC=1 -DVIDEO_CODEC_H265DEC=1 -DVIDEO_CODEC_H265ENC=1 -DVIDEO_CODEC_AV1DEC=1 -DVIDEO_CODEC_AV1ENC=1 -DVIDEO_CODEC_VP9DEC=1 -DVIDEO_CODEC_MPEG12DEC=0 -DVIDEO_CODEC_JPEGDEC=0 -DHAVE_LIBGBM -DHAVE_X11_PLATFORM -DHAVE_WAYLAND_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DHAVE_DRM_PLATFORM -DHAVE_XCB_PLATFORM -DUSE_LIBGLVND=1 -DHAVE_LIBDRM -DHAVE_VA_SURFACE_ATTRIB_DRM_FORMAT_MODIFIERS -DHAVE_GFX_COMPUTE -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM -DGLAPI_EXPORT_PROTO_ENTRY_POINTS=0 -DALLOW_KCMP -DMESA_DEBUG=0 -DENABLE_SHADER_CACHE '-DMESA_SHADER_CACHE_MAX_SIZE="8G"' -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___BUILTIN_ADD_OVERFLOW -DHAVE___BUILTIN_ADD_OVERFLOW_P -DHAVE___BUILTIN_SUB_OVERFLOW_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_OPTIMIZE -DHAVE_FUNC_ATTRIBUTE_COLD -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_UINT128 -DHAVE_FMEMOPEN -DHAVE_MALLINFO2 -D_GNU_SOURCE -DUSE_SSE41 -DHAVE___BUILTIN_IA32_CLFLUSHOPT -DUSE_GCC_ATOMIC_BUILTINS -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_POLL_H -DHAVE_SYS_INOTIFY_H -DHAVE_LINUX_UDMABUF_H -DHAVE_FENV_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_MEMFD_CREATE -DHAVE_RANDOM_R -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM -DHAVE_POSIX_FALLOCATE -DHAVE_SECURE_GETENV -DHAVE_SYSCONF -DHAVE_SC_PHYS_PAGES -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_LIBUDEV '-DMESA_LLVM_VERSION_STRING="21.1.8"' -DLLVM_IS_SHARED=1 -DDRAW_LLVM_AVAILABLE=1 -DAMD_LLVM_AVAILABLE=1 -DGALLIVM_USE_ORCJIT=0 -DHAVE_SPIRV_TOOLS -DUSE_LIBELF -DHAVE_VALGRIND -DTHREAD_SANITIZER=0 -DHAVE_LIBUNWIND -DWL_HIDE_DEPRECATED -DHAVE_WL_DISPATCH_QUEUE_TIMEOUT -DHAVE_WL_CREATE_QUEUE_WITH_NAME -DHAVE_OPENMP -DXCB_KEYSYMS_AVAILABLE -DHAVE_X11_DRM -DHAVE_DRI -DHAVE_DRI2 -DHAVE_DRI3_EXPLICIT_SYNC -DHAVE_DRISW_KMS -DHAVE_GALLIUM_EXTRA_HUD=1 -DHAVE_LIBSENSORS=1 -DHAVE_RENDERDOC_INTEGRATION=1 -DCL_USE_DEPRECATED_OPENCL_1_0_APIS -DCL_USE_DEPRECATED_OPENCL_1_1_APIS -DCL_USE_DEPRECATED_OPENCL_1_2_APIS -DCL_USE_DEPRECATED_OPENCL_2_0_APIS -DCL_USE_DEPRECATED_OPENCL_2_1_APIS -DCL_USE_DEPRECATED_OPENCL_2_2_APIS -DCL_TARGET_OPENCL_VERSION=310 -D_FILE_OFFSET_BITS=64 -I/home/user/mesa-git/include/. -I/home/user/mesa-git/builddir/build-amd64-opt/mesa/include/. -DNDEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="27.0.0-devel"' -DHAVE_OPENGL=1 -DHAVE_OPENGL_ES_1=1 -DHAVE_OPENGL_ES_2=1 -DHAVE_RADEONSI -DHAVE_R600 -DHAVE_ZINK -DHAVE_VIRGL -DHAVE_SOFTPIPE -DHAVE_LLVMPIPE -DHAVE_SWRAST -DMESA_SYSTEM_HAS_KMS_DRM=1 -DVIDEO_CODEC_VC1DEC=1 -DVIDEO_CODEC_H264DEC=1 -DVIDEO_CODEC_H264ENC=1 -DVIDEO_CODEC_H265DEC=1 -DVIDEO_CODEC_H265ENC=1 -DVIDEO_CODEC_AV1DEC=1 -DVIDEO_CODEC_AV1ENC=1 -DVIDEO_CODEC_VP9DEC=1 -DVIDEO_CODEC_MPEG12DEC=0 -DVIDEO_CODEC_JPEGDEC=0 -DHAVE_LIBGBM -DHAVE_X11_PLATFORM -DHAVE_WAYLAND_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DHAVE_DRM_PLATFORM -DHAVE_XCB_PLATFORM -DUSE_LIBGLVND=1 -DHAVE_LIBDRM -DHAVE_VA_SURFACE_ATTRIB_DRM_FORMAT_MODIFIERS -DHAVE_GFX_COMPUTE -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM -DGLAPI_EXPORT_PROTO_ENTRY_POINTS=0 -DALLOW_KCMP -DMESA_DEBUG=0 -DENABLE_SHADER_CACHE '-DMESA_SHADER_CACHE_MAX_SIZE="8G"' -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___BUILTIN_ADD_OVERFLOW -DHAVE___BUILTIN_ADD_OVERFLOW_P -DHAVE___BUILTIN_SUB_OVERFLOW_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_OPTIMIZE -DHAVE_FUNC_ATTRIBUTE_COLD -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_UINT128 -DHAVE_FMEMOPEN -DHAVE_MALLINFO2 -D_GNU_SOURCE -DUSE_SSE41 -DHAVE___BUILTIN_IA32_CLFLUSHOPT -DUSE_GCC_ATOMIC_BUILTINS -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_POLL_H -DHAVE_SYS_INOTIFY_H -DHAVE_LINUX_UDMABUF_H -DHAVE_FENV_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_MEMFD_CREATE -DHAVE_RANDOM_R -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM -DHAVE_POSIX_FALLOCATE -DHAVE_SECURE_GETENV -DHAVE_SYSCONF -DHAVE_SC_PHYS_PAGES -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_LIBUDEV '-DMESA_LLVM_VERSION_STRING="21.1.8"' -DLLVM_IS_SHARED=1 -DDRAW_LLVM_AVAILABLE=1 -DAMD_LLVM_AVAILABLE=1 -DGALLIVM_USE_ORCJIT=0 -DHAVE_SPIRV_TOOLS -DUSE_LIBELF -DHAVE_VALGRIND -DTHREAD_SANITIZER=0 -DHAVE_LIBUNWIND -DWL_HIDE_DEPRECATED -DHAVE_WL_DISPATCH_QUEUE_TIMEOUT -DHAVE_WL_CREATE_QUEUE_WITH_NAME -DHAVE_OPENMP -DXCB_KEYSYMS_AVAILABLE -DHAVE_X11_DRM -DHAVE_DRI -DHAVE_DRI2 -DHAVE_DRI3_EXPLICIT_SYNC -DHAVE_DRISW_KMS -DHAVE_GALLIUM_EXTRA_HUD=1 -DHAVE_LIBSENSORS=1 -DHAVE_RENDERDOC_INTEGRATION=1 -x c++ -std=c++17 -MD -MQ ../../../src/gallium/frontends/rusticl/rusticl_opencl_bindings.h -MF src/gallium/frontends/rusticl/rusticl_opencl_bindings.h.d --verbose
Debian clang version 22.1.8 (1+b2)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir:
Found candidate GCC installation: /../lib/gcc-cross/i686-linux-gnu/16
Found candidate GCC installation: /../lib/gcc/x86_64-linux-gnu/15
Found candidate GCC installation: /../lib/gcc/x86_64-linux-gnu/16
Selected GCC installation: /../lib/gcc/x86_64-linux-gnu/16
Candidate multilib: .;@m64
Selected multilib: .;@m64
Found HIP installation: /usr, version 6.4.43484
ignoring nonexistent directory "/../lib/gcc/x86_64-linux-gnu/16/../../../../x86_64-linux-gnu/include"
ignoring nonexistent directory "/include"
ignoring duplicate directory "/../lib/gcc/x86_64-linux-gnu/16/../../../../include/c++/16"
ignoring duplicate directory "/../lib/gcc/x86_64-linux-gnu/16/../../../../include/x86_64-linux-gnu/c++/16"
ignoring duplicate directory "/../lib/gcc/x86_64-linux-gnu/16/../../../../include/c++/16/backward"
ignoring duplicate directory "/usr/local/include"
ignoring duplicate directory "/usr/include/x86_64-linux-gnu"
ignoring duplicate directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
/home/user/mesa-git/include/.
/home/user/mesa-git/builddir/build-amd64-opt/mesa/include/.
/usr/lib/gcc/x86_64-linux-gnu/16/../../../../include/c++/16
/usr/lib/gcc/x86_64-linux-gnu/16/../../../../include/x86_64-linux-gnu/c++/16
/usr/lib/gcc/x86_64-linux-gnu/16/../../../../include/c++/16/backward
/usr/lib/llvm-21/lib/clang/21/include
/usr/local/include
/usr/include/x86_64-linux-gnu
/usr/include
/usr/include/clang/22.1.8/include
End of search list.
/usr/lib/llvm-21/lib/clang/21/include/xmmintrin.h:245:18: error: use of undeclared identifier '__builtin_ia32_sqrtss'
/usr/lib/llvm-21/lib/clang/21/include/xmmintrin.h:262:10: error: use of undeclared identifier '__builtin_ia32_sqrtps'
/usr/lib/llvm-21/lib/clang/21/include/emmintrin.h:253:17: error: use of undeclared identifier '__builtin_ia32_sqrtsd'
/usr/lib/llvm-21/lib/clang/21/include/emmintrin.h:269:10: error: use of undeclared identifier '__builtin_ia32_sqrtpd'
Unable to generate bindings: clang diagnosed error: /usr/lib/llvm-21/lib/clang/21/include/xmmintrin.h:245:18: error: use of undeclared identifier '__builtin_ia32_sqrtss'
/usr/lib/llvm-21/lib/clang/21/include/xmmintrin.h:262:10: error: use of undeclared identifier '__builtin_ia32_sqrtps'
/usr/lib/llvm-21/lib/clang/21/include/emmintrin.h:253:17: error: use of undeclared identifier '__builtin_ia32_sqrtsd'
/usr/lib/llvm-21/lib/clang/21/include/emmintrin.h:269:10: error: use of undeclared identifier '__builtin_ia32_sqrtpd'
Only option for me to proceed is basically to disable opencl / rusticl
in mesa.
PS. I use gcc for compiling Mesa, not clang.
-- System Information:
Debian Release: forky/sid
APT prefers testing-debug
APT policy: (500, 'testing-debug'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 7.3.0-rc7 (SMP w/32 CPU threads; PREEMPT)
Kernel taint flags: TAINT_CPU_OUT_OF_SPEC, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages bindgen depends on:
ii libc6 2.43-7
ii libclang-dev 1:21.1.8-74
ii libgcc-s1 16.2.0-4
Versions of packages bindgen recommends:
ii rustfmt 1.97.1+dfsg1-1
bindgen suggests no packages.
-- no debconf information
Bug#1152834: /usr/lib/llvm-21/lib/clang/21/include/emmintrin.h:269:10: error: use of undeclared identifier '__builtin_ia32_sqrts...
Author: Witold Baryluk
Date: Sat, 28 Nov 2026 14:30
Date: Sat, 28 Nov 2026 14:30
511 lines
33567 bytes
33567 bytes
Package: bindgen
Version: 0.72.1-1+b3
Followup-For: Bug #1152834
X-Debbugs-Cc: witold.baryluk@gmail.com
Dear Maintainer,
I think I found why this might be broken.
The issue only appears to be happening when both clang-21 and clang-22
are installed.
I also have a smaller reproducer.
// === cat example.h ===
#if defined( __SSE__ )
#include <xmmintrin.h>
#endif
//
bindgen example.h -- -x c++ -std=c++17
/usr/lib/llvm-21/lib/clang/21/include/xmmintrin.h:245:18: error: use of undeclared identifier '__builtin_ia32_sqrtss'
/usr/lib/llvm-21/lib/clang/21/include/xmmintrin.h:262:10: error: use of undeclared identifier '__builtin_ia32_sqrtps'
/usr/lib/llvm-21/lib/clang/21/include/emmintrin.h:253:17: error: use of undeclared identifier '__builtin_ia32_sqrtsd'
/usr/lib/llvm-21/lib/clang/21/include/emmintrin.h:269:10: error: use of undeclared identifier '__builtin_ia32_sqrtpd'
Unable to generate bindings: clang diagnosed error: /usr/lib/llvm-21/lib/clang/21/include/xmmintrin.h:245:18: error: use of undeclared identifier '__builtin_ia32_sqrtss'
/usr/lib/llvm-21/lib/clang/21/include/xmmintrin.h:262:10: error: use of undeclared identifier '__builtin_ia32_sqrtps'
/usr/lib/llvm-21/lib/clang/21/include/emmintrin.h:253:17: error: use of undeclared identifier '__builtin_ia32_sqrtsd'
/usr/lib/llvm-21/lib/clang/21/include/emmintrin.h:269:10: error: use of undeclared identifier '__builtin_ia32_sqrtpd'
Note, that this is on amd64, which should have sse and sse2 enabled by
default. Passing `-msse -msse2` and/or `-D__SSE__=1 -D__SSE__=2` does
not do anything (`-msse -msse2` might still be recommended when
cross-compiling for i386, but that is orthogonal and does not really
affect bingen generated bindings probably).
Uninstalling clang-21 (`apt purge -q -y clang-21`), and then running
same bindgen command - no issues.
Full list of packages when problem shows up:
$ dpkg -l | grep -E 'bingen|clang|llvm'
ii clang-22 1:22.1.8-4 amd64 C, C++ and Objective-C compiler
ii clang-format:amd64 1:21.1.8-74 amd64 Tool to format C/C++/Obj-C code
ii clang-format-21 1:21.1.8-13 amd64 Tool to format C/C++/Obj-C code
ii clang-tools-22 1:22.1.8-4 amd64 clang-based tools for C/C++ developments
ii libclang-21-dev 1:21.1.8-13 amd64 Clang library - Development package
ii libclang-common-21-dev:amd64 1:21.1.8-13 amd64 Clang library - Common development package
ii libclang-common-22-dev:amd64 1:22.1.8-4 amd64 Clang library - Common development package
ii libclang-cpp-dev 1:21.1.8-74 amd64 C++ interface to the clang library
ii libclang-cpp21 1:21.1.8-13 amd64 C++ interface to the Clang library
ii libclang-cpp21-dev 1:21.1.8-13 amd64 C++ interface to the Clang library
ii libclang-cpp22 1:22.1.8-4 amd64 C++ interface to the Clang library
ii libclang-dev 1:21.1.8-74 amd64 clang library - Development package
ii libclang-rt-21-dev 1:21.1.8-13 amd64 Compiler-rt - development package
ii libclang-rt-22-dev 1:22.1.8-4 amd64 Compiler-rt - development package
ii libclang1-21 1:21.1.8-13 amd64 C interface to the Clang library
ii libclang1-22 1:22.1.8-4 amd64 C interface to the Clang library
ii libllvm21:amd64 1:21.1.8-13 amd64 Modular compiler and toolchain technologies, runtime library
ii libllvm21:i386 1:21.1.8-13 i386 Modular compiler and toolchain technologies, runtime library
ii libllvm21-dbgsym:amd64 1:21.1.8-13 amd64 debug symbols for libllvm21
ii libllvm21-dbgsym:i386 1:21.1.8-13 i386 debug symbols for libllvm21
ii libllvm22:amd64 1:22.1.8-4 amd64 Modular compiler and toolchain technologies, runtime library
ii libllvmspirvlib-21-dev:amd64 21.1.5-1 amd64 bi-directional translator for LLVM/SPIRV -- development files
ii libllvmspirvlib-21-dev:i386 21.1.5-1 i386 bi-directional translator for LLVM/SPIRV -- development files
ii libllvmspirvlib21.1:amd64 21.1.5-1 amd64 bi-directional translator for LLVM/SPIRV -- shared library
ii libllvmspirvlib21.1:i386 21.1.5-1 i386 bi-directional translator for LLVM/SPIRV -- shared library
ii llvm 1:21.1.8-74 amd64 Modular compiler and toolchain technologies
ii llvm-21 1:21.1.8-13 amd64 Modular compiler and toolchain technologies
ii llvm-21-dev 1:21.1.8-13 amd64 Modular compiler and toolchain technologies, libraries and headers
ii llvm-21-linker-tools 1:21.1.8-13 amd64 Modular compiler and toolchain technologies - Plugins
ii llvm-21-runtime 1:21.1.8-13 amd64 Modular compiler and toolchain technologies, IR interpreter
ii llvm-21-tools 1:21.1.8-13 amd64 Modular compiler and toolchain technologies, tools
ii llvm-22 1:22.1.8-4 amd64 Modular compiler and toolchain technologies
ii llvm-22-dev 1:22.1.8-4 amd64 Modular compiler and toolchain technologies, libraries and headers
ii llvm-22-linker-tools 1:22.1.8-4 amd64 Modular compiler and toolchain technologies - Plugins
ii llvm-22-runtime 1:22.1.8-4 amd64 Modular compiler and toolchain technologies, IR interpreter
ii llvm-22-tools 1:22.1.8-4 amd64 Modular compiler and toolchain technologies, tools
ii llvm-runtime:amd64 1:21.1.8-74 amd64 Modular compiler and toolchain technologies, bytecode interpreter
ii llvm-spirv-21 21.1.5-1 amd64 bi-directional translator for LLVM/SPIRV
ii llvmlite-doc 0.50.0-0.2 all LLVM Python binding for writing JIT compilers (docs)
ii python3-llvmlite 0.50.0-0.2 amd64 LLVM Python 3 binding for writing JIT compilers
ii rust-llvm 1.98.1+dfsg1-1 amd64 Rust LLVM integration
$
And bindgen diagnostic and strace:
$ RUST_LOG=bindgen strace -e execve -f /usr/bin/bindgen example.h -- -x c++ -std=c++17
execve("/usr/bin/bindgen", ["/usr/bin/bindgen", "example.h", "--", "-x", "c++", "-std=c++17"], 0x7fff18fa7690 /* 69 vars */) = 0
strace: Process 3014340 attached
[pid 3014340] execve("/usr/local/bin/llvm-config", ["llvm-config", "--prefix"], 0x7ffc8c7d2810 /* 69 vars */) = -1 ENOENT (No such file or directory)
[pid 3014340] execve("/usr/bin/llvm-config", ["llvm-config", "--prefix"], 0x7ffc8c7d2810 /* 69 vars */) = 0
[pid 3014340] +++ exited with 0 +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=3014340, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
[2026-11-28T14:18:15Z INFO bindgen] Clang Version: Debian clang version 22.1.8 (4), parsed: Some((22, 1))
[2026-11-28T14:18:15Z DEBUG bindgen] Generating bindings, libclang at /usr/lib/llvm-22/lib/libclang-22.so.1
[2026-11-28T14:18:15Z DEBUG bindgen] Trying to find clang with flags: ["-x", "c++", "-std=c++17"]
strace: Process 3014386 attached
[pid 3014386] execve("/usr/local/bin/llvm-config", ["llvm-config", "--bindir"], 0x7ffc8c7d2810 /* 69 vars */) = -1 ENOENT (No such file or directory)
[pid 3014386] execve("/usr/bin/llvm-config", ["llvm-config", "--bindir"], 0x7ffc8c7d2810 /* 69 vars */) = 0
[pid 3014386] +++ exited with 0 +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=3014386, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
strace: Process 3014387 attached
[pid 3014387] execve("/usr/lib/llvm-21/bin/clang", ["/usr/lib/llvm-21/bin/clang", "--version"], 0x7ffc8c7d2810 /* 69 vars */) = 0
[pid 3014387] +++ exited with 0 +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=3014387, si_uid=1000, si_status=0, si_utime=1 /* 0.01 s */, si_stime=2 /* 0.02 s */} ---
strace: Process 3014388 attached
[pid 3014388] execve("/usr/lib/llvm-21/bin/clang", ["/usr/lib/llvm-21/bin/clang", "-E", "-x", "c", "-", "-v", "-x", "c++", "-std=c++17"], 0x7ffc8c7d2810 /* 69 vars */) = 0
[pid 3014388] +++ exited with 1 +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=3014388, si_uid=1000, si_status=1, si_utime=0, si_stime=2 /* 0.02 s */} ---
strace: Process 3014389 attached
[pid 3014389] execve("/usr/lib/llvm-21/bin/clang", ["/usr/lib/llvm-21/bin/clang", "-E", "-x", "c++", "-", "-v", "-x", "c++", "-std=c++17"], 0x7ffc8c7d2810 /* 69 vars */) = 0
[pid 3014389] +++ exited with 0 +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=3014389, si_uid=1000, si_status=0, si_utime=2 /* 0.02 s */, si_stime=2 /* 0.02 s */} ---
[2026-11-28T14:18:16Z DEBUG bindgen] Found clang: Clang { path: "/usr/lib/llvm-21/bin/clang", version: Some(CXVersion { Major: 21, Minor: 1, Subminor: 8 }), c_search_paths: None, cpp_search_paths: Some(["/usr/lib/gcc/x86_64-linux-gnu/16/../../../../include/c++/16", "/usr/lib/gcc/x86_64-linux-gnu/16/../../../../include/x86_64-linux-gnu/c++/16", "/usr/lib/gcc/x86_64-linux-gnu/16/../../../../include/c++/16/backward", "/usr/lib/llvm-21/lib/clang/21/include", "/usr/local/include", "/usr/include/x86_64-linux-gnu", "/usr/include"]) }
[2026-11-28T14:18:16Z DEBUG bindgen] Fixed-up options: BindgenOptions { use_specific_virtual_function_receiver: false, use_distinct_char16_t: false, represent_cxx_operators: false, blocklisted_types: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, blocklisted_functions: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, blocklisted_items: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, blocklisted_files: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, blocklisted_vars: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, opaque_types: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, rustfmt_path: None, depfile: None, allowlisted_types: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, allowlisted_functions: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, allowlisted_vars: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, allowlisted_files: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, allowlisted_items: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, default_enum_style: Consts, bitfield_enums: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, newtype_enums: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, newtype_global_enums: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, rustified_enums: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, rustified_non_exhaustive_enums: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, constified_enum_modules: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, constified_enums: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, default_macro_constant_type: Unsigned, default_alias_style: TypeAlias, type_alias: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, new_type_alias: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, new_type_alias_deref: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, default_non_copy_union_style: BindgenWrapper, bindgen_wrapper_union: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, manually_drop_union: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, builtins: false, emit_ast: false, emit_ir: false, emit_ir_graphviz: None, enable_cxx_namespaces: false, enable_function_attribute_detection: false, disable_name_namespacing: false, disable_nested_struct_naming: false, disable_header_comment: false, layout_tests: true, impl_debug: false, impl_partialeq: false, derive_copy: true, derive_debug: true, derive_default: false, derive_hash: false, derive_partialord: false, derive_ord: false, derive_partialeq: false, derive_eq: false, use_core: false, ctypes_prefix: None, anon_fields_prefix: "__bindgen_anon_", time_phases: false, convert_floats: true, raw_lines: [], module_lines: {}, input_headers: ["example.h"], clang_args: ["-x", "c++", "-std=c++17", "-isystem", "/usr/lib/gcc/x86_64-linux-gnu/16/../../../../include/c++/16", "-isystem", "/usr/lib/gcc/x86_64-linux-gnu/16/../../../../include/x86_64-linux-gnu/c++/16", "-isystem", "/usr/lib/gcc/x86_64-linux-gnu/16/../../../../include/c++/16/backward", "-isystem", "/usr/lib/llvm-21/lib/clang/21/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "example.h"], fallback_clang_args: ["-x", "c++", "-std=c++17"], input_header_contents: [], parse_callbacks: [], codegen_config: CodegenConfig(FUNCTIONS | TYPES | VARS | METHODS | CONSTRUCTORS | DESTRUCTORS), conservative_inline_namespaces: false, generate_comments: true, generate_inline_functions: false, allowlist_recursively: true, objc_extern_crate: false, generate_block: false, generate_cstr: false, block_extern_crate: false, enable_mangling: true, detect_include_paths: true, fit_macro_constants: false, prepend_enum_name: true, rust_target: RustTarget(Stable(82, 0)), rust_edition: None, rust_features: RustFeatures { unsafe_extern_blocks: true, offset_of: true, literal_cstr: true, thiscall_abi: true, c_unwind_abi: true, abi_efiapi: true, core_ffi_c: true, raw_ref_macros: true, min_const_generics: true, const_cstr: true, larger_arrays: true, associated_constants: true, non_exhaustive: true, maybe_uninit: true, repr_packed_n: true, vectorcall_abi: false, ptr_metadata: false, layout_for_ptr: false }, untagged_union: true, record_matches: true, size_t_is_usize: true, formatter: Rustfmt, rustfmt_configuration_file: None, no_partialeq_types: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, no_copy_types: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, no_debug_types: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, no_default_types: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, no_hash_types: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, must_use_types: RegexSet { items: [], matched: [], set: Some(RegexSet([])), record_matches: true }, array_pointers_in_arguments: false, wasm_import_module_name: None, dynamic_library_name: None, dynamic_link_require_all: false, respect_cxx_access_specs: false, translate_enum_integer_types: false, c_naming: false, force_explicit_padding: false, vtable_generation: false, sort_semantically: false, merge_extern_blocks: false, wrap_unsafe_ops: false, flexarray_dst: false, abi_overrides: {}, wrap_static_fns: false, wrap_static_fns_suffix: None, wrap_static_fns_path: None, default_visibility: Public, emit_diagnostics: false, clang_macro_fallback: false, clang_macro_fallback_build_dir: None, generate_deleted_functions: false, generate_pure_virtual_functions: false, generate_private_functions: false }
strace: Process 3014402 attached
/usr/lib/llvm-21/lib/clang/21/include/xmmintrin.h:245:18: error: use of undeclared identifier '__builtin_ia32_sqrtss'
/usr/lib/llvm-21/lib/clang/21/include/xmmintrin.h:262:10: error: use of undeclared identifier '__builtin_ia32_sqrtps'
/usr/lib/llvm-21/lib/clang/21/include/emmintrin.h:253:17: error: use of undeclared identifier '__builtin_ia32_sqrtsd'
/usr/lib/llvm-21/lib/clang/21/include/emmintrin.h:269:10: error: use of undeclared identifier '__builtin_ia32_sqrtpd'
[pid 3014402] +++ exited with 0 +++
Unable to generate bindings: clang diagnosed error: /usr/lib/llvm-21/lib/clang/21/include/xmmintrin.h:245:18: error: use of undeclared identifier '__builtin_ia32_sqrtss'
/usr/lib/llvm-21/lib/clang/21/include/xmmintrin.h:262:10: error: use of undeclared identifier '__builtin_ia32_sqrtps'
/usr/lib/llvm-21/lib/clang/21/include/emmintrin.h:253:17: error: use of undeclared identifier '__builtin_ia32_sqrtsd'
/usr/lib/llvm-21/lib/clang/21/include/emmintrin.h:269:10: error: use of undeclared identifier '__builtin_ia32_sqrtpd'
+++ exited with 1 +++
As you can see bindgen loads libclang-22
[2026-11-28T14:18:15Z DEBUG bindgen] Generating bindings, libclang at /usr/lib/llvm-22/lib/libclang-22.so.1
but invokes clang-21 -E
Also
$ /usr/bin/llvm-config --prefix
/usr/lib/llvm-21
$ /usr/bin/llvm-config --bindir
/usr/lib/llvm-21/bin
-- System Information:
Debian Release: forky/sid
APT prefers testing-debug
APT policy: (500, 'testing-debug'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 7.3.4+deb14-amd64 (SMP w/32 CPU threads; PREEMPT)
Kernel taint flags: TAINT_CPU_OUT_OF_SPEC
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages bindgen depends on:
ii libc6 2.43-7
ii libclang-dev 1:21.1.8-74
ii libgcc-s1 16.2.0-5
Versions of packages bindgen recommends:
ii rustfmt 1.98.1+dfsg1-1
bindgen suggests no packages.
-- no debconf information
Bug#1152834: /usr/lib/llvm-21/lib/clang/21/include/emmintrin.h:269:10: error: use of undeclared identifier '__builtin_ia32_sqrts...
Author: Witold Baryluk
Date: Sat, 28 Nov 2026 14:40
Date: Sat, 28 Nov 2026 14:40
84 lines
7376 bytes
7376 bytes
Package: bindgen Version: 0.72.1-1+b3 Followup-For: Bug #1152834 X-Debbugs-Cc: witold.baryluk@gmail.com Dear Maintainer, In the previous email I sent list of installed packages when clang-21 only is installed, not 'clang-21 and clang-22` as I claimed. Here is when both are installed: $ dpkg -l | grep -E 'bingen|clang|llvm' ii clang-21 1:21.1.8-13 amd64 C, C++ and Objective-C compiler ii clang-22 1:22.1.8-4 amd64 C, C++ and Objective-C compiler ii clang-format:amd64 1:21.1.8-74 amd64 Tool to format C/C++/Obj-C code ii clang-format-21 1:21.1.8-13 amd64 Tool to format C/C++/Obj-C code ii clang-tools-21 1:21.1.8-13 amd64 clang-based tools for C/C++ developments ii clang-tools-22 1:22.1.8-4 amd64 clang-based tools for C/C++ developments ii libclang-21-dev 1:21.1.8-13 amd64 Clang library - Development package ii libclang-common-21-dev:amd64 1:21.1.8-13 amd64 Clang library - Common development package ii libclang-common-22-dev:amd64 1:22.1.8-4 amd64 Clang library - Common development package ii libclang-cpp-dev 1:21.1.8-74 amd64 C++ interface to the clang library ii libclang-cpp21 1:21.1.8-13 amd64 C++ interface to the Clang library ii libclang-cpp21-dev 1:21.1.8-13 amd64 C++ interface to the Clang library ii libclang-cpp22 1:22.1.8-4 amd64 C++ interface to the Clang library ii libclang-dev 1:21.1.8-74 amd64 clang library - Development package ii libclang-rt-21-dev 1:21.1.8-13 amd64 Compiler-rt - development package ii libclang-rt-22-dev 1:22.1.8-4 amd64 Compiler-rt - development package ii libclang1-21 1:21.1.8-13 amd64 C interface to the Clang library ii libclang1-22 1:22.1.8-4 amd64 C interface to the Clang library ii libllvm21:amd64 1:21.1.8-13 amd64 Modular compiler and toolchain technologies, runtime library ii libllvm21:i386 1:21.1.8-13 i386 Modular compiler and toolchain technologies, runtime library ii libllvm21-dbgsym:amd64 1:21.1.8-13 amd64 debug symbols for libllvm21 ii libllvm21-dbgsym:i386 1:21.1.8-13 i386 debug symbols for libllvm21 ii libllvm22:amd64 1:22.1.8-4 amd64 Modular compiler and toolchain technologies, runtime library ii libllvmspirvlib-21-dev:amd64 21.1.5-1 amd64 bi-directional translator for LLVM/SPIRV -- development files ii libllvmspirvlib-21-dev:i386 21.1.5-1 i386 bi-directional translator for LLVM/SPIRV -- development files ii libllvmspirvlib21.1:amd64 21.1.5-1 amd64 bi-directional translator for LLVM/SPIRV -- shared library ii libllvmspirvlib21.1:i386 21.1.5-1 i386 bi-directional translator for LLVM/SPIRV -- shared library ii llvm 1:21.1.8-74 amd64 Modular compiler and toolchain technologies ii llvm-21 1:21.1.8-13 amd64 Modular compiler and toolchain technologies ii llvm-21-dev 1:21.1.8-13 amd64 Modular compiler and toolchain technologies, libraries and headers ii llvm-21-linker-tools 1:21.1.8-13 amd64 Modular compiler and toolchain technologies - Plugins ii llvm-21-runtime 1:21.1.8-13 amd64 Modular compiler and toolchain technologies, IR interpreter ii llvm-21-tools 1:21.1.8-13 amd64 Modular compiler and toolchain technologies, tools ii llvm-22 1:22.1.8-4 amd64 Modular compiler and toolchain technologies ii llvm-22-dev 1:22.1.8-4 amd64 Modular compiler and toolchain technologies, libraries and headers ii llvm-22-linker-tools 1:22.1.8-4 amd64 Modular compiler and toolchain technologies - Plugins ii llvm-22-runtime 1:22.1.8-4 amd64 Modular compiler and toolchain technologies, IR interpreter ii llvm-22-tools 1:22.1.8-4 amd64 Modular compiler and toolchain technologies, tools ii llvm-runtime:amd64 1:21.1.8-74 amd64 Modular compiler and toolchain technologies, bytecode interpreter ii llvm-spirv-21 21.1.5-1 amd64 bi-directional translator for LLVM/SPIRV ii llvmlite-doc 0.50.0-0.2 all LLVM Python binding for writing JIT compilers (docs) ii python3-llvmlite 0.50.0-0.2 amd64 LLVM Python 3 binding for writing JIT compilers ii rust-llvm 1.98.1+dfsg1-amd64 Rust LLVM integration -- System Information: Debian Release: forky/sid APT prefers testing-debug APT policy: (500, 'testing-debug'), (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 7.3.4+deb14-amd64 (SMP w/32 CPU threads; PREEMPT) Kernel taint flags: TAINT_CPU_OUT_OF_SPEC Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages bindgen depends on: ii libc6 2.43-7 ii libclang-dev 1:21.1.8-74 ii libgcc-s1 16.2.0-5 Versions of packages bindgen recommends: ii rustfmt 1.98.1+dfsg1-1 bindgen suggests no packages. -- no debconf information
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads