I’m having some trouble getting CUDA’s nvcc working with Fedora 32. I’ve followed the rpmfusion instructions (Howto/CUDA - RPM Fusion), however, when I try to install GCC9 using the kwizart package (Howto/CUDA - RPM Fusion), I get a conflict with the existing version of GCC:
Error:
Problem: problem with installed package gcc-10.2.1-1.fc32.x86_64
- package gcc-10.2.1-1.fc32.x86_64 requires cpp = 10.2.1-1.fc32, but none of the providers can be installed
- package gcc-10.0.1-0.11.fc32.x86_64 requires cpp = 10.0.1-0.11.fc32, but none of the providers can be installed
- cannot install both cpp-9.3.1-3.fc32.x86_64 and cpp-10.2.1-1.fc32.x86_64
- cannot install both cpp-10.2.1-1.fc32.x86_64 and cpp-9.3.1-3.fc32.x86_64
- cannot install both cpp-10.0.1-0.11.fc32.x86_64 and cpp-9.3.1-3.fc32.x86_64
- package cuda-gcc-9.3.1-3.fc32.x86_64 requires cpp = 9.3.1-3.fc32, but none of the providers can be installed
- conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
Adding the --allowerasing flag would remove a bunch of packages that depend on GCC (including CUDA!). cuda-gcc would install with the cuda-gcc-10.1 repo without any conflicts, however, that compiler does not work on F32 due to another depedency issue. Any suggestions for getting GCC9 installed along side the system GCC10? Thanks!
Not GCC 9, but negativo17’s fedora-multimedia package repo contains a cuda-gcc package built on GCC 8.3.0, which is totally standalone (it pulls in its own cuda-gcc-c++ for the C++ compiler) and totally compatible with both the RPM Fusion and Nvidia CUDA packages.
I’d also report a bug @ rpm fusion regarding the cuda-gcc-9.3.1 package. (Since it’s a COPR repo I guess it’s not really RPM Fusion’s problem.) I don’t think it’s intended to require a backrev system cpp, but I’m not sure.
Oh, wait, actually: Did you follow the instructions at https://rpmfusion.org/Howto/CUDA#GCC_versionexactly, including telling DNF to install bothcuda-gcc and cuda-gcc-c++ in the same command? If there’s a cuda-gcc-c++ in that COPR that supplies cpp, it may just have been a dependency resolution error that caused it to not be picked up automatically.
(In fact, now that I look that COPR repo supplies the exact same cuda-gcc{,-c++}-8.3.0 version as negativo17’s repo.)
I also just tried it myself, and sudo dnf install cuda-gcc cuda-gcc-c++ gave me no conflicts with any of the existing C++ compiler packages on my system, of which there are like 5.
So, if the install still fails because you don’t have all of the requisite tools installed, it’s likely DNF is trying to pull them in and picking the wrong versions. So one thing you can do is just sudo dnf install gcc gcc-c++ libmpc-devel mpfr-devel zlib-devel isl-devel gmp-devel flex binutils beforehand, without the COPR packages, to make sure all of those packages are fully sorted out. Then the COPR packages should install cleanly.
If that works, then this is still a bug with Kwizart’s cuda-gcc packages probably, since it doesn’t seem like they should be requiring things like (especially) gcc and gcc-c++.
Thanks for the suggestions, @ferdnyc. I should have mentioned it in my original post, but I’m using the cuda-11 version of the @kwizart repo: kwizart/cuda-gcc-11 Copr. I had the cuda-10.2 previously installed fine (although it wouldn’t actually compile anything on F32, as there was an version issue with mpfr). The cuda-11 version of the repo has a lot more dependencies, including the specific version of cpp that is causing the issue:
Thanks @kwizart! With the 10.1 version of the repo, I got an error when running nvcc that libmpfr.so.4 is missing. However, I was able to build and install that from source (GNU MPFR version 3.1.6) which resolved the issue. Looks like everything is working now. Thanks for your help!
Thanks for the suggestion @t0xic0der. I managed to get everything working, but that looks much easier so I’ll definitely give it a try next time I set up a new system.