OpenGL fails inside steam-run?

I was able to use the Natron software in NixOs 20.03 by running the program inside a steam-run shell. Unfortunately, it does not work anymore in unstable, I get complains about opengl:

$ LIBGL_DEBUG=verbose QT_X11_NO_MITSHM=1 steam-run ./Natron
Natron Version 2.3.15
Copyright (C) 2013-2018 INRIA and Alexandre Gauthier-Foichat
>>>Use the --help or -h option to print usage.<<<
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/me/.drirc: No such file or directory.
libGL: using driver i915 for 4
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/me/.drirc: No such file or directory.
libGL: using driver i915 for 4
libGL: pci id for fd 4: 8086:3ea0, driver iris
libGL: MESA-LOADER: failed to open /run/opengl-driver/lib/dri/iris_dri.so: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by /run/opengl-driver/lib/dri/iris_dri.so)
libGL error: MESA-LOADER: failed to open iris (search paths /run/opengl-driver/lib/dri)
libGL error: failed to load driver: iris
libGL: using driver i915 for 4
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/me/.drirc: No such file or directory.
libGL: using driver i915 for 4
libGL: pci id for fd 4: 8086:3ea0, driver iris
libGL: MESA-LOADER: failed to open /run/opengl-driver/lib/dri/iris_dri.so: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by /run/opengl-driver/lib/dri/iris_dri.so)
libGL error: MESA-LOADER: failed to open iris (search paths /run/opengl-driver/lib/dri)
libGL error: failed to load driver: iris
libGL: MESA-LOADER: failed to open /run/opengl-driver/lib/dri/swrast_dri.so: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by /run/opengl-driver/lib/dri/swrast_dri.so)
libGL error: MESA-LOADER: failed to open swrast (search paths /run/opengl-driver/lib/dri)
libGL error: failed to load driver: swrast
Error while loading OpenGL: GLX: Failed to create context
OpenGL rendering is disabled. 
GLX: Failed to create context
GLX: Failed to create context
Caught segmentation fault (SIGSEGV) from thread Main(0x30baa10), faulty address is 0x7f39916aa98d from 0x3f8
Segmentation fault (core dumped)

At the beginning, I also couldn’t make glxinfo work, but I found a solution for glxinfo here, it was an issue with versions. But now this works:

nix run -f channel:nixos-unstable glxinfo -c glxgears

But steam-run is installed systemwide, (not sure if it matters, but I setup it using sudo nixos-rebuild -I nixos-config=configuration.nix -I "nixpkgs=${nixos_unstable}"). Any idea what’s wrong?

Ok, so it seams that steam-run is using a different ldd version:

$  ldd --version
ldd (GNU libc) 2.32
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

$ steam-run bash
bash-4.4$ ldd --version
ldd (GNU libc) 2.30
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

And I checked… and indeed, I pinned steam-run from 20.03, I guess because I got some strange errors before… Nevermind, I removed the pin, and now it works. Stupid me, sorry for the noise.

1 Like