Issues / #2576

#2576 setup: a default g++ newer than the CUDA toolkit accepts stops the engine build; an installed older g++ is not tried (follow-up to #2054)

open · @qiuzan2001 · 0 Kommentare · Auf GitHub

Setup & installNVIDIA / CUDA

Beschreibung

Follow-up to #2054 (the maintainer asked for it as its own issue).

**What happens.** On a rolling distribution the system `g++` can move past what the installed CUDA toolkit accepts.
In #2054, gcc went from 14 to 16 on CachyOS with CUDA 12.8, and the engine build stopped in CMake's CUDA compiler
check with nvcc's `#error -- unsupported GNU version! gcc versions later than 14 are not supported`, although
`g++-14` was installed. The same build had worked the day before.

**Where.** `setup.py:3876` (`host_compiler_defs`, `296b59d2`) passes `CMAKE_C_COMPILER` / `CMAKE_CXX_COMPILER` /
`CMAKE_CUDA_HOST_COMPILER` only when the user sets `CC` / `CXX` / `CUDAHOSTCXX` (#1645). Otherwise CMake takes the
default `g++`, and nothing tries an older one.

**Workaround (from #2054).** `CC=gcc-14 CXX=g++-14 CUDAHOSTCXX=g++-14 ./update.sh`.

**Possible change.** When none of the three is set and the default `g++` is newer than the toolkit accepts, look for
an installed `g++-N` / `gcc-N` the toolkit does accept (newest first) and pass it as the host compiler, saying so.
Or, at least, catch nvcc's "unsupported GNU version" and print the workaround.

Not reproduced here: this box (Ubuntu, CUDA 13.1, gcc 15.2) builds with its default compiler.

Mehr auf der Site

Links zu Install, Modellen, Releases.