FS#80156 - [cuda] 12.3.0 compilation errors
Attached to Project:
Arch Linux
Opened by Marcin Rzeźnicki (mrzeznicki) - Saturday, 04 November 2023, 02:59 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:21 GMT
Opened by Marcin Rzeźnicki (mrzeznicki) - Saturday, 04 November 2023, 02:59 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:21 GMT
|
Details
Description:
cuda does not support gcc 13.x yet. See https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#host-compiler-support-policy If you try to compile almost anything, you will get errors such as: /usr/include/bits/floatn.h(86): error: invalid combination of type specifiers typedef __float128 _Float128; ^ /usr/include/bits/floatn-common.h(214): error: invalid combination of type specifiers typedef float _Float32; ^ /usr/include/bits/floatn-common.h(251): error: invalid combination of type specifiers typedef double _Float64; ^ |
This task depends upon
Closed by Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:21 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/cuda/issues/1
Saturday, 25 November 2023, 20:21 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/cuda/issues/1
[1]: https://github.com/NVIDIA/cuda-samples/blob/v12.3/Samples/1_Utilities/deviceQuery/Makefile#L163-L164
[2]: https://github.com/NVIDIA/cuda-samples/blob/v12.3/README.md#linux
Edit:
The above change allowed all but two samples to build:
Samples/4_CUDA_Libraries/{cuDLALayerwiseStatsHybrid,cuDLALayerwiseStatsStandalone}
FS#80157related?FS#80157related?The second issue mentioned in
FS#80157was caused by gcc 13 being used but is fixed in cuda-12.3.0-3/cuda 12.3.0-4. The first issue fromFS#80157is unrelated and needs an upstream patch or pkgver update.nvcc warning : incompatible redefinition for option 'compiler-bindir', the last value of this option was used
I reported this to Nvidia's private bug tracker as "CUDA 12.3.0 breaks default GCC configuration by symlinks in $CUDA_ROOT/bin/" where we ping-ponged about 10 messages with their "bug wrangler" but now the engineering team should look at it and maybe fix it in the next release (or some later release).
Some core points from the discussion:
- Nvidia does not support GCC 13 as a host compiler and probably does not officially support a Linux distro which uses GCC 13 as default, so it was difficult to prove our case
- nvcc has several components (gcc/cudafe++/cicc/fatbinary…) and only cudafe++ was looking into /opt/cuda/bin/g++ in previous releases (you can check by running `nvcc --verbose something.cu` and notice `--gnu_version=130201` being passed around)
- our hack which removes the host compiler checks from the headers [1] did not help, I had to rebuild two CUDA versions (as I was arguing about a regression) without this change to get the "officially correct" error messages
[1] https://gitlab.archlinux.org/archlinux/packaging/packages/cuda/-/blob/main/PKGBUILD?ref_type=heads#L126-131