I tried to run the game Unvanquished with steam-run, but it fails with this error:
steam-run ./UnvanquishedUpdater
...
.../nacl_loader: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
Warn: Error during initialization: IPC: Socket closed by remote end
When i run it with strace, i get the path of the libstdc++.so.6
it tries to open:
steam-run strace -ff ./UnvanquishedUpdater
...
[pid 75] openat(AT_FDCWD, "/nix/store/q53f5birhik4dxg3q3r2g5f324n7r5mc-glibc-2.31-74/lib/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 75] writev(2, [{iov_base="/home/davidak/.local/share/unvan"..., iov_len=56}, {iov_base=": ", iov_len=2}, {iov_base="error while loading shared libra"..., iov_len=36}, {iov_base=": ", iov_len=2}, {iov_base="libstdc++.so.6", iov_len=14}, {iov_base=": ", iov_len=2}, {iov_base="cannot open shared object file", iov_len=30}, {iov_base=": ", iov_len=2}, {iov_base="No such file or directory", iov_len=25}, {iov_base="\n", iov_len=1}], 10/home/davidak/.local/share/unvanquished/base/nacl_loader: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
before this failure, it successfully opens the library from /lib64/libstdc++.so.6
which is a symlink to /nix/store/g490crrmig6ffbjk5qxd5siavypng6ld-gcc-9.3.0-lib/lib/libstdc++.so.6
which does exist
So, why does the game tries to use libstdc++.so.6
from glibc package (that does not exist) instead of gcc?
I use NixOS 20.09.3009.8e78c2cfbae and this workaround, so the game starts at all:
# add additional dependencies to steam-run
nixpkgs.overlays = [
(self: super: {
steam-run = (super.steam.override {
extraLibraries = pkgs: with pkgs;
[
libxkbcommon # workaround for Unvanquished
];
}).run;
})
];
I tried adding libstdcxx5, gcc, glibc, stdenv.cc.cc.lib there without success.
Related issue with more details: https://github.com/Unvanquished/Unvanquished/issues/1302