supertux icon indicating copy to clipboard operation
supertux copied to clipboard

Move SuperTux to C++20

Open Grumbel opened this issue 4 years ago • 4 comments

This is restoring #1602 back into a compilable state. Let's see what breaks.

Grumbel avatar Apr 19 '21 20:04 Grumbel

Everything outside of UBPorts compiles with C++20 set. UBPorts is a bit problematic, as it's stuck on an ancient Ubuntu 16.04, which is EOL in a week. No idea how far away the UBPorts 20.04 update is or if there are any PPAs that could give us a newer gcc/clang on that system. UBPorts doesn't support C++17 either.

Grumbel avatar Apr 20 '21 03:04 Grumbel

Consideration: Ubuntu 18.04 can no longer compile SuperTux out of the box. Neither CMake nor the default GCC, as given by the repositories, support C++20; for the compiler, Canonical provides later versions of Clang; for CMake, I couldn't find later versions that support C++20.

I have no idea how other distros are affected, as I only run Ubuntu 18.04 and 20.04.

Semphriss avatar Apr 20 '21 19:04 Semphriss

I am not too worried about Ubuntu 18.04, as newer compiler are easily available from PPA and we have appimage/flatpak/guix packages on top of that.

But UBPorts will be difficult, as there doesn't seem to be an easy way to get a new compiler onto that. We might need to compile one ourselves.

Grumbel avatar Apr 22 '21 11:04 Grumbel

Related:

I've investigated supporting the Steam Linux Runtime to fix #2112 and #2083, everything went well until the compilation hit the missing Boost dependencies. It appears SLR doesn't include Boost, and the documentation instructs not to add any extra dependency.

Since this PR seems to remove all dependencies to Boost, I believe I'll have to wait until this gets merged before resuming my work on the Steam version.

Semphriss avatar Jul 23 '22 23:07 Semphriss

This is probably replaced by #2473

mrkubax10 avatar Jun 11 '23 18:06 mrkubax10

Since #2473 was merged a while ago and this PR has a lot of conflicts it was decided to close this PR. Personally I think that it's to early to move to C++20, maybe in 1.5 years when compilers supporting C++20 will be available on more systems.

mrkubax10 avatar Jul 27 '23 12:07 mrkubax10