I'm considering switching to Fedora, but the latest stable Fedora (36) only ships Clang 14, while the latest release is Clang 15.

Is there any way to get up-to-date binaries, without switching to the beta version of Fedora?

I found https://copr.fedorainfracloud.org/coprs/g/fedora-llvm-team/llvm-snapshots/, but they only produce trunk builds, not the stable releases.

1 Answer 1


Just build the Fedora37 package of clang locally :)

Install mock, add your user to the mock group, go to the RPM source page, i.e., https://src.fedoraproject.org/rpms/clang , click on clang-15 for F37, get the clang-15.0.0-2.fc37.src.rpm , and tell mock to build it in a container for your target architecture (assuming that is x86_64):

mock --config /etc/mock/fedora-36-x86_64.cfg --rebuild clang-15.0.0-2.fc37.src.rpm

Make yourself a coffee or two, and install the resulting rpms from the target directory you'll see at the very end of a successful run. (Hint: use cd /path/to/the/binary/rpms; sudo dnf install ./rpm1.rpm ./rpm2.rpm … to install them, satisfying dependencies as needed. You will need to install clang, libllvm and so on from that directory at once, to let dnf satisfy the dependencies.)

  • Thanks! I'm going to accept this for now, and try it latter, when I muster enough courage to switch. Oct 8, 2022 at 18:01
  • The good thing is that this way, as you're building distro-compatible packages, it's trivial to uninstall and install the original version Oct 8, 2022 at 18:03
  • The wording of your comment makes it seem you think this method requests a distro update: it does not! This takes the version of clang in fedora 37 and builds it for your current fedora 36, so that you do not have to switch!! That was the whole point. Oct 8, 2022 at 18:05
  • Ah, sorry. :) What I mean is, I'll try this when I finally decide to switch to Fedora from a different distro. Oct 8, 2022 at 18:08
  • 1
    Though mock is the one thing that won't work in a container, as it will try to nest containers within containers. (You can do the very same without mock, it's just gradually more work) Oct 9, 2022 at 1:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .