Cannot upgrade to Fedora 42

Trying to upgrade to fedora 42 with the following command:

sudo dnf system-upgrade download --releasever=42

However, I am getting the below error:

Problem: installed package gcc13-c+±13.3.1-2.fc41.1.x86_64 requires gcc13 = 13.3.1-2.fc41.1, but none of the providers can be installed

  • gcc13-13.3.1-2.fc41.1.x86_64 does not belong to a distupgrade repository
  • problem with installed package

I do not want to remove this, as I need it for CUDA, so are there any ways forward here?

Thanks!

frenzybiscuit@fedora:~$ sudo dnf system-upgrade download --enable-repo=updates-testing --releasever=42
[sudo] password for frenzybiscuit:
Updating and loading repositories:
Fedora 42 - x86_64 - Test Updates 100% | 2.1 MiB/s | 3.6 MiB | 00m02s
Repositories loaded.
Failed to resolve the transaction:
Problem: installed package gcc13-c+±13.3.1-2.fc41.1.x86_64 requires gcc13 = 13.3.1-2.fc41.1, but none of the providers can be installed

  • gcc13-13.3.1-2.fc41.1.x86_64 does not belong to a distupgrade repository
  • problem with installed package

Are you sure? I compile my own cuda programs, which usually requires GCC 13.

It’s not about installing cuda, its about being able to compile the programs.

What programs did you compile?

I just tried to compile llamacpp on Fedora 42 and I’m running into errors.

Is there a way to re-install GCC-13?

               from <command-line>:

/usr/local/cuda-12.8/bin/../targets/x86_64-linux/include/crt/host_config.h:143:2:
error: #error – unsupported GNU version! gcc versions later than 14 are
not supported! The nvcc flag ‘-allow-unsupported-compiler’ can be used to
override this version check; however, using an unsupported host compiler
may cause compilation failure or incorrect run time execution. Use at your
own risk.

143 | #error -- unsupported GNU version! gcc versions later than 14 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
    |  ^~~~~

–error 0x1 –

Thats great… it needs GCC-13.

yep just tested, same error.

What cuda programs did you test on by chance when you tried to compile them?

It’s weird because cuda/nvcc should support gcc-14 according to the docs.

But then the docs explicitly mention fedora and using gcc-13 with it.

I’ll have to look into compiling GCC-13 and installing it on my own, because even though CUDA may support GCC-14 I dont think these programs do.

I’ll post a guide when I finally get around to it, as I’m sure other people that use CUDA actively are going to be running into the same issue.

Basically you need to install the gcc14 package and then do the steps that this package does (slaanesh/cuda-gcc Copr) just with g++14 instead of g++13. Any CUDA toolkit that installs on F42 will work with gcc14.