How to create a toolbox in Fedora 38 Silverblue with a downgraded gcc (gcc 12 instead of gcc 13)?

I’d like to run a toolbox but with gcc 12.X instead of 13.X.

How do I go about this?


Looking at the information for the gcc package, it appears that F37 is still using gcc 12.X.

So the easiest method would be to create a F37 toolbox and install gcc there.

toolbox create -r 37
toolbox enter fedora-toolbox-37

If you need a F38 toolbox for some reason, you can try downloading a 12.X build from koji and installing that way. Though in my brief experiments, I ran into a dependency hell that would be difficult to solve manually.


That … seems to be a valid approach.

I’m actually installing this all to run CUDA on my 3070. And that is almost a better idea as nVidia doesn’t currently support Fedora 38.


Not true.
I have installed nvidia drivers from the rpmfusion repo on F38, and it runs very well, including cuda. Instructions are located at
with cuda instructions at\bCategoryHowto\b)#CUDA

I have never had a problem with nvidia. When using secure boot there is a requirement to sign the modules and instructions for that are located at\bCategoryHowto\b)

How all that would work on silverblue I have no experience with, though it seems rpm-ostree should be able to manage it.

Unfortunately, for example, cuda-samples (GitHub - NVIDIA/cuda-samples: Samples for CUDA Developers which demonstrates features in CUDA Toolkit) does not support gcc 13.X and consequently fails to build on F38.

So, you might be able to run a precompiled CUDA on F38 (dunno … I didn’t try), but you can’t actually develop a CUDA program on F38 because of the compiler dependency.

Another option might be to add the archives repo to a Fedora 38 toolbox to get older GCC releases.