Why does NVIDIA exclude users of newer Linux distributions from using the NVIDIA 10.1.243 SDK? All of these use the gcc / g ++ - 9 compiler as default. To use CUDA one would have to make a step backwards to an older distro. A clear disadvantage to users of newer version. Why is there no working workaround to use the gcc-9?
To allow the writing of host device code, CUDA integrates so tightly with supported host toolchains that changes to the host toolchain frequently break this tight integration, requiring adjustments on the CUDA side. This isn’t just a theoretical concern, as those who have tried to remove the host compiler version checks in CUDA have found out regularly in the past.
All right and good, but why is not there a temporary workaround that users of a new distro CUDA 10.1.243 can also use with the gcc-9 / g ++ - 9?
You shouldn’t use an unsupported config for development purposes with CUDA.
Any sort of published “temporary workaround” would only encourage that behavior, which is discouraged.
That means in plain language I can not use NVIDIA CUDA 10.1.243 on Fedora 30, openSUSE Tumbleweed, Ubuntu 19.04 and so on, all of which use the gcc-9 as a default compiler. Well, that makes me want to give up CUDA and use AMD or Intel Knight. Okay who does not want to have
Well I have found another solution for the problem in the meantime I use the openSUSE Leap 15.2 Beta 498 version here I can easily install the gcc-8.3.1 after and the CUDA SDK is fully functional. So i must wait for the next CUDA Release ( or Beta ) which supports the GCC-9
Having just run into the same problem on ubuntu 19.10, here’s my solution:
First, install gcc-8 through your package manager; on ubuntu 19 that’s sudo apt install g+±8
Then, remove gcc-9 (sudo apt remove gcc-9)
Finally, use update-laternatives to select gcc-8 as default compiler on that system:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 8
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g+±8 8
sudo update-alternatives --install /usr/bin/cc gcc /usr/bin/gcc-8 8
sudo update-alternatives --install /usr/bin/cc g++ /usr/bin/g+±8 8
After that you box will use gcc 8 by default, and cuda will run just fine.
Note your probably don’t have to remove gcc-9 for that to work … I just wanted to make doubly-sure it’s gone :-)