protonscr

Steam and some games ship their own versions of libstdc++

steamopen reviewedruntime
ValveSoftware/steam-for-linux#3773 · opened 2015-03-29 by nickguletskii · updated 2019-07-18 · 1 comments · github
Nnickguletskii 2015-03-29 github

Related:

https://github.com/ValveSoftware/steam-for-linux/issues/3273
https://github.com/ValveSoftware/steam-for-linux/issues/3393
https://github.com/ValveSoftware/steam-for-linux/issues/3394
https://github.com/ValveSoftware/steam-for-linux/issues/2904

There is absolutely no reason to ship copies of libstdc++ with Steam or any of the games available on Steam unless the distribution's libstdc++ is older than the one required by Steam. This only causes problems on newer distros where libraries are linked against newer libstdc++ versions.

For example, if you try to launch Steam in Ubuntu 15.04 running in the latest VirtualBox with guest additions installed, you will get something like this:

libGL error: failed to get magic
libGL error: failed to load driver: vboxvideo
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast

With LIBGL_DEBUG=verbose:

 DISPLAY=:0 LIBGL_DEBUG=verbose steam
 Running Steam on ubuntu 15.04 64-bit
 STEAM_RUNTIME is enabled automatically
 Installing breakpad exception handler for appid(steam)/version(1427176184)
 libGL error: failed to get magic
 libGL error: failed to load driver: vboxvideo
 libGL: OpenDriver: trying /usr/lib/i386-linux-gnu/dri/tls/swrast_dri.so
 libGL: OpenDriver: trying /usr/lib/i386-linux-gnu/dri/swrast_dri.so
 libGL: dlopen /usr/lib/i386-linux-gnu/dri/swrast_dri.so failed     (/home/test/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /usr/lib/i386-linux-gnu/dri/swrast_dri.so))

Suggested fix:

Only use the bundled libstdc++ when the distro comes with an older version of libstdc++.

Ssylware 2015-04-20 github

The client and games should statically link their libstdc++ (and their libgcc).
Each is one command line option for gcc from gcc version 4.7.
Query the game devs to do so through the steam community.
This is the result of c++ ABI hell and c++ standardization body fenzy.
More issues are to come if third-party software rely on distro c++ runtime (which is compiler dependant!!)