Skip to content

Instantly share code, notes, and snippets.

@reneruhr
reneruhr / cuda_fedora.md
Created December 30, 2022 16:17
Cuda on Fedora

Current Fedora 36 does not have/support the latest (open) nvidia drivers, which requires to use an older cuda version 11.8 instead of 12. However, the g++12 compiler with that fedora is too new for this older cuda, so a custom gcc11 install is required. Brew solution explained here: https://www.reddit.com/r/Fedora/comments/usnu0x/comment/ig0t9y7/?utm_source=share&utm_medium=web2x&context=3

  1. brew install 'gcc@11'
  2. sudo ln -s /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/g++-11 /usr/local/cuda/bin/g++

At some point, this causes some trouble after dynamically linking to a different libstdc++, which can be solved by making nvcc pass a static linking flag: