Problem description:
glxinfo returns a library error
Expected behavior:
glxinfo should run without error and return info about the virtual video device. tested the same on nix using ubuntu on a physical machine and found it runs without error and returns virtualgl device info
Actual behavior:
glxinfo fails to run and crashes with an error
Steps to reproduce:
create a new repl, bash (or C or C++, template doesnt matter, need shell access)
click shell tab
in the shell tab, type the following:
~/nixglxinfotest1$ glxinfo
output:
glxinfo: command not installed. Multiple versions of this command were found in Nix.
Select one to run (or press Ctrl-C to cancel):
<you will be given 4 options, these all return the same library error. i chose virtualgl>
Adding virtualgl to replit.nix
success
/nix/store/s9k1a324zk0yxajlqhfly7gwmajixc42-virtualgl-3.0.2
glxinfo: symbol lookup error: /nix/store/s9qbqh7gzacs7h68b2jfmn9l6q4jwfjz-glibc-2.33-59/lib/libpthread.so.0: undefined symbol: __libc_siglongjmp, version GLIBC_PRIVATE
I couldn’t figure out what was going wrong. I went into the .replit file and changed something
OLD VALUE:
[nix]
channel = "stable-22_11"
NEW VALUE:
channel = "fffffasfsfdastable-22_11"
Result:
Glxinfo works, no more __libc_siglongjmp error
i’ll look into this further, perhaps i need to set an older nix channel version. But - setting an invalid nix channel in my .replit file fixed my issue, i am now able to run glxinfo in a replit
The problem was introduced because we used to export X11 libraries from a different Nix channel via LD_LIBRARY_PATH. This is no longer done, and glxinfo should work in any channel now.