Steam-run: game tries to open wrong libstdc++.so.6

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

1 Like

do you mind trying stream-run from unstable?

no. it wasn’t straight forward

and it didn’t change the behavior

one difference is that strace don’t work anymore :smiley:

[davidak@gaming:~/Downloads]$ steam-run strace -ff ./UnvanquishedUpdater 
strace: symbol lookup error: /lib64/libc.so.6: undefined symbol: _dl_fatal_printf, version GLIBC_PRIVATE

On master, I was able to launch it with steam-run-native. Which doesn’t use the steam scout runtime.

EDIT: I was able to do the launcher, the game crashes with your original error.

It might just be easier to package the game Compiling the source - Unvanquished

Yeah, the Launcher/Updater works, downloading the game works, but starting it don’t.
Packaging it would be the proper solution, but i don’t know yet if it’s worth it. I would like to try it out first.
Maybe i have to use a different Linux distro for that.