Steam Deck can't launch Linux build due to outdated GLIBC version (build targeting newer GLIBC version)

Godot Version

Godot 4.8 dev 3 (personally compiled from commit 51105ccbe; dev workstation runs on Fedora Linux 44).

Also happened with Godot 4.8 dev 1 build.

Question

Right, so I decided to bring this up here, because I really would appreciate some advice on how to tackle this sort of issue, and keep that noted for the future if anything like this were to happen again.

So, long story short - I have been using a couple of dev builds of Godot and exported my game to Linux. It boots up perfectly fine on my main PC, but if I were to boot it up on my Steam Deck (SteamOS Holo 3.8.16)… it wouldn’t.

  • In Gamescope (“gaming mode”), I’d simply get thrown back to the game’s launch menu;
  • On desktop mode, if I were to run the game’s executable file in the terminal (in my case that’d be Konsole), I’d find the root cause of it not booting up as I hoped it would as it did previously: /usr/lib/libm.so.6: version ‘GLIBC_2.43’ not found (required by [game executable])

As of writing this, SteamOS on my handheld is bundled with an older version of glibc: glibc 2.41.

The Windows build of my game otherwise boots up fine via Proton, so that can work as a workaround, but since I prioritize the Linux builds (with Steam Deck/Steam Machine support) more, this is… far from a desirable situation someone wants to be dealing with, if you ask me! :sweat_smile:

I could track down an older build of Godot that targets an older glibc version (and possibly backport my project to that exact Godot version, if needed), but I will admit, I personally have no idea how to check Godot’s targeted glibc version.

But ideally, I would like to know how exactly I could recompile Godot while targeting an older glibc version! And if anyone frequently compiling Godot from the source has ever done that with a specific toolchain, I would love to know which one you use and would greatly appreciate instructions on how to use it with SCons in CLI!

Otherwise, the worst case scenario is that I’ll probably have to wait for Valve to provide a newer version of glibc in a future stable update…and I know that can take a very long time. I’ll admit, I probably won’t be able to wait, and I feel like the players wouldn’t wait for that either–

But thank you in advance!!!

It’s more about your operating system’s installed glibc version, you could build your specified Godot version/templates on the steamdeck to ensure compatibility with such a system. I believe steam has it’s own runtimes that you can build inside of like a virtual environment, but I’ve never done such a thing.

If you get godot from Steam then apparently it has export templates pre-bundled.

It is probably not Godot 4.8, however compatibility would be a maintenance issue for the Steam build maintainer.

If you get godot from Steam then apparently it has export templates pre-bundled.

It is probably not Godot 4.8, however compatibility would be a maintenance issue for the Steam build maintainer.

Oh, definitely not! Godot that is on Steam is typically from the Stable build branch, and isn’t bundled with .NET stuff, either, but that’s a whole 'nother problem. :laughing:

If you need .NET then that isnt any good then.

So the issue is that either libm.so or probably every other library in the export template was built with the newer glibc.

The glibc is the gnu c library, and is apparently mostly backward compatible … so i would say the best thing you could do is compile Godot on steamOS as Gertkeno said above, or make a VM and install the older version libc then compile godot and the export templates.

The c language doesnt change very much, but if the version number is newer it will cause an error.

(Note: this configuration issue could cause instability, bugs or failed builds if any of the godot libraries and external dependencies require features from the newer glibc library. Best practice may be rigorous unit tests, but that can explode into millions of tests, so checking the differences between versions of libc and then the libraries for each difference,and trusting the build process that may or may not automate test cases is sometimes the only thing a developer can or will do).

Recompiling Godot for an older libc is in principle simple:

  • Create a virtual machine or container with the older version of libc. (I use Docker.)
  • Install build dependencies in the container. (You’ll probably need to build your compiler and Python from source, and maybe some other dependencies. I’ve found gcc easier to build from source than clang, for what it’s worth.)
  • Build Godot in the container.

Yeahhh, now I can tell that’s ought to be the issue.

I actually tried giving that a shot after both of you suggested me to do so - been trying to run SCons on my Steam Deck only to give out an error message stating that the <includes.h> library is missing, despite gcc being already installed (and same thing happened even after restarting the system), which is… gravely inconvenient!! WOO!!!

I could have tried downgrading glibc on Fedora, but as it turns out the version that I need was in Fedora 42’s repo… and it was deleted not long ago. FUN!!!

So, that’s Attempt number One failed. I should definitely try doing that again in a virtual machine next time, or—

-–yeah. That.

So, I am not declaring this issue to be solved yet until I finally try recompiling Godot (or the templates at least) under an older version of glibc.

But thank you fellas for chiming in!! I already appreciate that a lot! c:

you will have to install development libraries on your steamdeck to build godot on it. This is the required packages for arch as a command.

sudo pacman -Sy --needed\
  scons \
  pkgconf \
  gcc \
  libxcursor \
  libxinerama \
  libxi \
  libxrandr \
  wayland-utils \
  mesa \
  glu \
  libglvnd \
  alsa-lib \
  pulseaudio

Maybe worth targeting those Steam Runtimes, they come in a container like docker and should have everything you need.

Highly recommend against trying to downgrade glibc, imagine your entire system sharing that same complaint of a mismatched glibc version. If you succeeded you would have to recover/reinstall your system.

No yeah, I already made sure of that in advance, the output is still the same as follows, unfortunately… :downcast_face_with_sweat:

scons: Reading SConscript files ...

Building for platform "linuxbsd", architecture "x86_64", target "template_debug".
INFO: Performing initial build, progress percentage unavailable!
scons: done reading SConscript files.
scons: Building targets ...
Compiling platform/linuxbsd/crash_handler_linuxbsd.cpp ...
In file included from /usr/include/c++/15.1.1/x86_64-pc-linux-gnu/bits/c++config.h:727,
                 from /usr/include/c++/15.1.1/cstddef:51,
                 from ./core/extension/gdextension_interface.gen.h:42,
                 from ./core/object/object.h:33,
                 from ./core/config/project_settings.h:33,
                 from platform/linuxbsd/crash_handler_linuxbsd.cpp:33:
/usr/include/c++/15.1.1/x86_64-pc-linux-gnu/bits/os_defines.h:39:10: fatal error: features.h: No such file or directory
   39 | #include <features.h>
      |          ^~~~~~~~~~~~
compilation terminated.
Generating drivers/gles3/shaders/particles.glsl.gen.h ...
scons: *** [bin/obj/platform/linuxbsd/crash_handler_linuxbsd.linuxbsd.template_debug.x86_64.o] Error 1
scons: building terminated because of errors.
INFO: Time elapsed: 00:00:00.23

I’ll keep that in mind!

Will try to get back when I give that a shot.

Okay, so I am happy to report that setting up a virtual environment using the Steam Linux Runtime (I went with Distrobox) and then recompiling the stuff I need again with it was the solution I needed after all! So, thank you fellas for that!

I have done so with the Steam Linux Runtime 4.0 OCI image which, conveniently, includes glibc 2.41 and other libraries the current stable version of SteamOS should also include, and I found that it also has a fresher version of SCons required to build Godot and/or the templates. I am noting that because I tried using the Steam Linux Runtime 3.0 (sniper) OCI image at first, which had an even older version of glibc… but it also came with SCons 4.0.1 or so.

So… yeah! Bringing in Distrobox did the trick after all!

Thanks again!!! :heart::heart::heart: