#1153637 nvidia-cuda-toolkit: nvcc on debian sid hangs forever on a single line compile

#1153637#5
Date:
2026-11-10 15:35:21 UTC
From:
To:
Dear Maintainer,

I was trying to compile a local version of libelpa with gpu support, but the
compilation blocked forever, with 100% cpu usage, on some .cu files.
Upon investigating, I found out that a single line suffices to reproduce the bug:

$ printf '#include <complex.h>\n' > c1.cu
$ nvcc -arch sm_75 -c c1.cu          # compiler backend chosen by Debian default = gcc-13: cicc hung at 100% cpu forever
$ nvcc -arch sm_75 -ccbin g++-12 -c c1.cu   # 2 s, OK

it is cicc that hangs, cudafe++ and gcc-13 preprocessing go through
also #include "/usr/include/complex.h" causes the same hung cicc, whereas
<complex> alone compiles, as well as <complex.h> compiled with
-D__STRICT_ANSI__

The difference appears to be that bits/floatn.h e bits/floatn-common.h
do not define any more typedef _Float32/_Float64/_Float32x , assuming
they are native in the compiler. Apparently they are not in cicc, even if
it declares itself to be gcc 13.5

While this is not critical (other sources compile without problems), it
is a real problem, and should be assessed or, at the very least,
documented, explaining how to work around it.

Thanks, best regards
Giacomo Mulas