-
Notifications
You must be signed in to change notification settings - Fork 802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to C++20 #6484
Switch to C++20 #6484
Conversation
45fda9d
to
9a88b25
Compare
You think we can maybe update the compiler but keep the same libc 🤔 Feels strange having Linux support be the thing that holding everyone else back. |
Trying with a gcc from https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test |
c8c3f5d
to
78e05f9
Compare
One blocker is that ubuntu-toolchain-r/test PPA does not have the Aarch64 cross compilers. |
Maybe we can use 22.04 just for the aarch64 build? Ubuntu 22.04 glibc is version 2.35 Raspberry Pi OS is currently Debian 11 (glibc too old) but an unofficial Debian 12 image is already available at https://raspi.debian.net/tested-images/ (https://raspberrytips.com/install-debian-on-raspberry-pi/) |
Would it be tied to the newer libc? Probably not then, I think Raspberry Pi people are already pretty shocked it's not 32bit |
Yeah it would be tied to the newer libc. Official Raspberry Pi OS based on Bookworm will probably get released within a month or so though. |
0395144
to
3ef9b28
Compare
I'm pretty sure that by the time 1.6.0 is released a Bookworm-based Raspberry Pi OS will have already been released, so how about we just go with Ubuntu 22.04 for the aarch64 build? |
My issue with that is that Pi owners appear slow to upgrade there os |
Well they can always compile from source, it's easy and Pi users are tinkererers |
Some re pretty new to tinkering. But won't it fail to compile from src if we bump the requirement? |
It will compile natively on the Pi with GCC from ppa:ubuntu-toolchain-r/test, we can add a note about it in the instructions |
Ah it's not Ubuntu, so need to find the Debian equivalent of that |
sudo mkdir /nix
sudo chown ${USER}: /nix
sh <(curl -L https://nixos.org/nix/install) --no-daemon
source ~/.nix-profile/etc/profile.d/nix.sh
nix-shell -p gcc |
Actually, both Debian 11 and Ubuntu 20.04 have clang-11 that has most of C++20 support. Perhaps we can use that |
a0254e5
to
3ff188d
Compare
8f3d085
to
34f1e8d
Compare
Ubuntu 20.04 is missing the |
glibc compatibility remains the same. We now use Clang 18 and static libc++ for the Aarch64 build. Linux x86 and x86_64 builds now use GCC 13.
Looks good. But just to be clear, if we build like this can we distribute the builds to users of 20.04 (arm64/amd64) as we normally do, or do they need to also install some of these externals for it to run? |
No need for any externals, this should launch as-is on Ubuntu 20.04 because the new libraries (libc++ / libstdc++) are linked statically. |
Another option for aarch64 users is to download flatpak version, since runtime is downloaded separately, and it doesn't affect system libraries |
For x86 and x86_64 builds, we use GCC 13 from ppa:ubuntu-toolchain-r/test (glibc requirement remains the same).
For aarch64, we use Ubuntu 22.04 (which also comes with GCC 13) because aarch64 cross compilers are not available in ppa:ubuntu-toolchain-r/test.
Aarch64 Linux is the only platform that requires a newer glibc with this PR.
We expect that Raspberry Pi OS based on Debian 12 Bookworm will be released within a month or so, well before the 1.6.0 release.
Note that the PS Vita SDK still uses GCC 10.3.0 which doesn't have full C++20 support (but it's still pretty decent https://gcc.gnu.org/projects/cxx-status.html).