Bug#1098879: llvm-18-dev: missing #include when compiling SmallVector.h with GCC-15

Andreas Beckmann anbe at debian.org
Tue Feb 25 13:09:27 GMT 2025


Package: llvm-18-dev
Version: 1:18.1.8-16
Severity: important
Tags: upstream
Control: clone -1 -2 -3
Control: reassign -2 llvm-17-dev 1:17.0.6-21
Control: retitle -2 llvm-17-dev: missing #include when compiling SmallVector.h with GCC-15
Control: reassign -3 llvm-14-dev 1:14.0.6-16
Control: retitle -3 llvm-14-dev: missing #include when compiling SmallVector.h with GCC-15
Control: block 1097919 with -2
Control: block 1097921 with -1
Control: block 1097514 with -2
Control: block 1097515 with -1
Control: block 1097627 with -1


Hi,

/usr/lib/llvm-18/include/llvm/ADT/SmallVector.h is missing
  #include <cstdint>
when being compiled with GCC-15:

http://qa-logs.debian.net/2025/02/16/amd64exp/spirv-llvm-translator-18_18.1.8-1_unstable_gccexp.log.gz

...
In file included from /build/reproducible-path/spirv-llvm-translator-18-18.1.8/include/LLVMSPIRVOpts.h:42,
                 from /build/reproducible-path/spirv-llvm-translator-18-18.1.8/include/LLVMSPIRVLib.h:44,
                 from /build/reproducible-path/spirv-llvm-translator-18-18.1.8/lib/SPIRV/OCLTypeToSPIRV.h:45:
/usr/lib/llvm-18/include/llvm/ADT/SmallVector.h:119:62: error: ‘uint64_t’ was not declared in this scope
  119 |     std::conditional_t<sizeof(T) < 4 && sizeof(void *) >= 8, uint64_t,
      |                                                              ^~~~~~~~
/usr/lib/llvm-18/include/llvm/ADT/SmallVector.h:29:1: note: ‘uint64_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
   28 | #include <memory>
  +++ |+#include <cstdint>
   29 | #include <new>
/usr/lib/llvm-18/include/llvm/ADT/SmallVector.h:120:24: error: ‘uint32_t’ was not declared in this scope
  120 |                        uint32_t>;
      |                        ^~~~~~~~
...

There may be more missing #includes exposed by GCC-15, I didn't do
exhaustive header checks.

The same issue exists in llvm-14-dev and llvm-17-dev but not in
llvm-19-dev.


Andreas


More information about the Pkg-llvm-team mailing list