I am currently making binaries for games with low glibc using Debian Jessie, which will be out of support soon - around half of 2022.
Unfortunately it doesn’t provide Wayland libraries and headers necessary for building SDL2 with Wayland support.
What’s the recommended distro and version to use for portable binaries that can provide SDL2 with Wayland support and have a low enough glibc version for running on most Linux computers?
You could just link against some sufficiently old version of SDL2 and not bundle it with your game, but use the version installed by the users distro instead (i.e. tell users to install SDL2 on their system, though most probably already have it).
If Wayland is used, the available libsdl2 should support it
Also, Debian Jessie has libwayland-dev, and if SDL2 also needs the wayland-protocols package you could try installing the one from Stretch?
Yes, that’s exactly what I do. But the version of SDL2 available from the distro’s repository can be quite old, for example even on the very latest Raspberry Pi 4 it’s still 2.0.9 (so no batching).
sorry, I have to support both way, static and dynamic linking of SDL2.
SDL2 does need wayland-protocols package for wayland support. Can you explain a bit more on how to install the stretch version on Jessie? I am not that familiar with Debian.
Edit: btw, lots of desktop software offers different builds for differents distros (Zoom even has different builds for different versions of distros). It would be pretty dandy if it was possible to do the same with games, but unfortunately outside of Itch.io which allows just giving people binaries, Steam and others really just want a magic linux package that works everywhere and this is really hard to provide.