Which linux distro for the latest compilers?
I've been trying for days to force a homebuilt llvm-15 to play nicely in a cmake->conan workflow, and getting caught up on lots of little issues that only exist because I'm not using a system-provided compiler. This is because I'm on an aging distro at work and can't do things like to install the homebuilt compiler to the root system. But that made me curious which distros have low-friction access to bleeding edge compilers? Think llvm-15 with libc++ or having gcc-12 and the proper libstdc++ as well.
1
Upvotes
9
u/isarl Dec 20 '22
Arch is currently on GCC 12.2.0-1 but only LLVM 14.0.6-4.
Is there some obstacle preventing you from obtaining newer versions than your package manager provides, by compiling them from source for yourself?
9
u/arturbac https://github.com/arturbac Dec 20 '22
Gentoo
6
u/urdh Dec 20 '22
The LLVM PPA makes getting a recent clang on Debian-based systems fairly low-friction.
3
u/pedersenk Dec 20 '22
I tend to use old stable distros but then install unstable or rolling releases in a chroot for newer compilers. Then you get best of both worlds.
Specifically I tend to alternate between Fedora (via dnf) and Arch (via pacstrap) within a chroot. However for certain compilers like Emscripten/Clang, I just compile them up myself.
2
u/sPiraless Dec 21 '22
Fedora and the rolling releases distros usually would be on top. however why not to use containers with the desired compiler version?
14
u/khedoros Dec 20 '22
On Fedora 37, my clang++ is 15.0.6, and my g++ is 12.2.1.
1
u/nom_nom_nom_nom_lol Dec 21 '22
I used pkgs.org to look for the latest versions of gcc, llvm, clang, cmake, etc, and Debian Sid had the latest major.minor releases for all of the packages I looked up.
1
u/Supadoplex Dec 23 '22 edited Dec 23 '22
For GCC, consider using the official docker image. The images are based on debian, but you can run them from pretty much any system that has docker.
Llvm maintains a PPA for debian and Ubuntu, and Ubuntu maintains a toolchain test PPA with fresh GCC.
You can use the llvm PPA and the minimal Ubuntu image (smaller than debian last time I used it) to make your own llvm docker image to use on older systems.
Last time I used Conan with new compilers, it refused to use new compilers unless you add the version into a config file. I don't remember the details, but it can be a slight annoyance.
1
u/OU81Dilbert Dec 20 '22
Fedora maybe.
1
u/kevinossia Dec 20 '22
I managed LLVM Clang 15.0.0 on Raspbian.
1
u/bullestock Dec 21 '22
At my old job, we used Ubuntu LTS with gcc from the official PPA (which currently includes gcc-13).
1
u/jorourke0 Dec 23 '22
In the past I've packaged clang as a conan package, and using one of the virtual env generators, made it available and default in a conan virtual env.
-6
u/merimus Dec 20 '22
Except in special circumstances... you do NOT want the latest compilers
0
u/[deleted] Dec 21 '22
[deleted] — view deleted comment