Build failure for 1.12.1 on Debian unstable

Building Julia 1.12.1 from source on Debian unstable I get a build failure while compiling the embedded LLVM, with a complaint that uint32_t is not defined. This is obviously an issue with failure to include standard headers (versus relying on them being auto-included).

The build does succeed on HEAD. I would report an issue, but the fact that it succeeds on the current development branch makes me think it’s been noticed and fixed already, but at a quick look I didn’t see a relevant issue or commit whose title mentioned this failure.

Does anyone have guidance? Debian’s gcc is 15.2.0:

gcc (Debian 15.2.0-7) 15.2.0
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Here’s the start of the build log, showing a bunch of warnings about undefined SIZE_MAX etc. before the actual error with uint64_t not defined.

    CC src/aotcompile.o
In file included from /usr/local/src/julia/usr/include/llvm/ADT/Twine.h:12,
                 from /usr/local/src/julia/usr/include/llvm/TargetParser/Triple.h:12,
                 from /usr/local/src/julia/src/aotcompile.cpp:7:
/usr/local/src/julia/usr/include/llvm/ADT/SmallVector.h:1331:5: warning: 'SIZE_MAX' is not defined, evaluates to '0' [-Wundef]
 1331 | #if SIZE_MAX > UINT32_MAX
      |     ^~~~~~~~
/usr/local/src/julia/usr/include/llvm/ADT/SmallVector.h:1331:16: warning: 'UINT32_MAX' is not defined, evaluates to '0' [-Wundef]
 1331 | #if SIZE_MAX > UINT32_MAX
      |                ^~~~~~~~~~
/usr/local/src/julia/usr/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/local/src/julia/usr/include/llvm/ADT/SmallVector.h:29:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'

Did you tried using Juliaup installer? Run following command in terminal.

curl -fsSL https://install.julialang.org | sh

I’m aware of other ways to install Julia, I was asking specifically about compiling from source. (Of course I’m also working at my own risk by using Debian unstable.)

It’s an upstream bug in LLVM, for a simple workaround see Julia 1.10 and 1.11 do not compile cleanly with GCC 15 · Issue #58478 · JuliaLang/julia · GitHub.

You already commented in that same issue.

2 Likes

Doh! Thanks for the pointer.

1 Like