Description
Compatibility package for running GCC on Fedora. Required for current CUDA packages. This tracks the current CUDA release and the current Fedora releases when an incompatibility arises.
https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#host-compiler-support-policy
Installation Instructions
When running the CUDA stack on a recent Fedora distribution, you’re very likely to hit the compatibility issue with the current GCC release not being yet supported by NVCC. This is quite easy to address, but not many people seem to know it.
Since a few years I’ve been shipping a cuda-gcc
package which appears as a drop in replacement for NVCC. It can be installed along with CUDA and the drivers from the Nvidia or multimedia repository or from a Fedora COPR if you are running the upstream CUDA packages provided by Nvidia.
This GCC version is hidden from the main path and is explicitly used by NVCC when compiling something. Installing the cuda-gcc-c++
package creates profile entries in /etc/profile.d
that just do this:
$ sudo dnf -y install cuda-gcc-c++
$ cat /etc/profile.d/cuda-gcc.sh
export NVCC_PREPEND_FLAGS='-ccbin /usr/bin/cuda'
Logout/login or reload your profile and you’re good to go.
This way, every time you invoke NVCC you are not using the system compiler but the one provided by the cuda-gcc package.
On a Red Hat Enterprise Linux based distribution you can achieve the same result by installing the development toolset of your choice and activating the environment for it. This is usually not an issue as NVCC is officially supported on those distributions.
Active Releases
The following unofficial repositories are provided as-is by owner of this project. Contact the owner directly for bugs or issues (IE: not bugzilla).
Release | Architectures | Repo Download |
---|---|---|
Fedora 38 | aarch64 (104)*, ppc64le (79)*, x86_64 (321)* | Fedora 38 (0 downloads) |
Fedora 39 | aarch64 (104)*, ppc64le (88)*, x86_64 (281)* | Fedora 39 (105 downloads) |
Fedora 40 | aarch64 (143)*, ppc64le (60)*, x86_64 (711)* | Fedora 40 (281 downloads) |
Fedora 41 | aarch64 (102)*, ppc64le (20)*, x86_64 (245)* | Fedora 41 (36 downloads) |
Fedora rawhide | aarch64 (206)*, ppc64le (102)*, x86_64 (206)* | Fedora rawhide (217 downloads) |
* Total number of downloaded packages.