slaanesh/cuda-gcc

Project ID: 18340

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 (82)*, ppc64le (55)*, x86_64 (281)* Fedora 38 (95 downloads)
Fedora 39 aarch64 (43)*, ppc64le (41)*, x86_64 (168)* Fedora 39 (59 downloads)
Fedora 40 aarch64 (20)*, ppc64le (18)*, x86_64 (35)* Fedora 40 (18 downloads)
Fedora rawhide aarch64 (85)*, ppc64le (50)*, x86_64 (70)* Fedora rawhide (173 downloads)

* Total number of downloaded packages.