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

**URL:** https://discourse.nixos.org/t/steam-run-game-tries-to-open-wrong-libstdc-so-6/11465
**Category:** Help
**Created:** [February 9, 2021, 8:10pm UTC](https://discourse.nixos.org/t/steam-run-game-tries-to-open-wrong-libstdc-so-6/11465 "2021-02-09T20:10:32Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![davidak](https://discourse.nixos.org/user_avatar/discourse.nixos.org/davidak/32/49_2.png) [@davidak](https://discourse.nixos.org/u/davidak)
#### Post date: [February 9, 2021, 8:10pm UTC](https://discourse.nixos.org/t/steam-run-game-tries-to-open-wrong-libstdc-so-6/11465/1 "2021-02-09T20:10:32Z")

</div>

I tried to run the game [Unvanquished](https://unvanquished.net/) with steam-run, but it fails with this error:

```auto
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:

```auto
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:

```auto
  # 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: [Provided linux build reported to not work on NixOS · Issue #1302 · Unvanquished/Unvanquished · GitHub](https://github.com/Unvanquished/Unvanquished/issues/1302)

---

<div class="post-metadata">

### Author: ![jonringer](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jonringer/32/1348_2.png) [@jonringer](https://discourse.nixos.org/u/jonringer)
#### Post date: [February 9, 2021, 9:24pm UTC](https://discourse.nixos.org/t/steam-run-game-tries-to-open-wrong-libstdc-so-6/11465/2 "2021-02-09T21:24:45Z")

</div>

do you mind trying `stream-run` from unstable?

---

<div class="post-metadata">

### Author: ![davidak](https://discourse.nixos.org/user_avatar/discourse.nixos.org/davidak/32/49_2.png) [@davidak](https://discourse.nixos.org/u/davidak)
#### Post date: [February 9, 2021, 10:49pm UTC](https://discourse.nixos.org/t/steam-run-game-tries-to-open-wrong-libstdc-so-6/11465/3 "2021-02-09T22:49:20Z")

</div>

no. it wasn’t straight forward

and it didn’t change the behavior

one difference is that strace don’t work anymore 😃

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

```

---

<div class="post-metadata">

### Author: ![jonringer](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jonringer/32/1348_2.png) [@jonringer](https://discourse.nixos.org/u/jonringer)
#### Post date: [February 9, 2021, 11:16pm UTC](https://discourse.nixos.org/t/steam-run-game-tries-to-open-wrong-libstdc-so-6/11465/4 "2021-02-09T23:16:43Z")

</div>

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](https://wiki.unvanquished.net/wiki/Compiling_the_source#Linux)

---

<div class="post-metadata">

### Author: ![davidak](https://discourse.nixos.org/user_avatar/discourse.nixos.org/davidak/32/49_2.png) [@davidak](https://discourse.nixos.org/u/davidak)
#### Post date: [February 9, 2021, 11:31pm UTC](https://discourse.nixos.org/t/steam-run-game-tries-to-open-wrong-libstdc-so-6/11465/5 "2021-02-09T23:31:50Z")

</div>

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.
