protonscr

libSDL pinned but not libSDL-image

steamclosed Steam clientruntime
ValveSoftware/steam-for-linux#6488 · opened 2019-09-12 by nanonyme · updated 2019-11-08 · 9 comments · github
Nnanonyme 2019-09-12 github

Your system information

  • Steam client version (build number or date): Aug 21 2019, at 21:56:33
  • Distribution (e.g. Ubuntu): Flathub Steam
  • Opted into Steam client beta?: [Yes/No] no
  • Have you checked for system updates?: [Yes/No]no

Please describe your issue in as much detail as possible:

https://www.libsdl.org/tmp/SDL/WhatsNew.txt
SDL 2.0.10 "The SDL_RW* macros have been turned into functions that are available only in 2.0.10 and onward"

Steam run.sh only pins libSDL but not libSDL-image so if host has SDL 2.0.10, no games using libSDL-image can start because you end up loading libSDL-image 2.0.10 and an older libSDL that is missing necessary symbols. End result is https://github.com/flathub/com.valvesoftware.Steam/issues/417

You should either remove pinning for libSDL or pin also all the libSDL-* libraries.

Steps for reproducing this issue:

  1. Have distro that has libSDL 2.0.10
  2. Run any game that uses libSDL-image (eg Shadow of Mordor)
  3. Observe game does not run
Nnanonyme 2019-09-14 github

This affects native Steam too in case where distro has SDL 2.0.10 (which was released this Summer) so for those this is pretty much a time bomb. For Flatpak we can workaround, native will just break unless you fix pinning.

Ssmcv 2019-09-20 github

You should either remove pinning for libSDL

I would personally say this is the answer. If a distro's SDL2 is newer than the one in the Steam Runtime, pinning the one in the Steam Runtime will potentially break anything that came from the distro and has SDL2 somewhere in its dependency chain - the SDL2_foo family of libraries are an obvious example, but not necessarily the only one.

Pinning libraries to the Steam Runtime version is quite a big hammer, and we should ideally only use it in cases where there are known to be incompatibilities, like libcurl.so.4 (where the version in the Steam Runtime came from a time where Debian/Ubuntu had versioned symbols that were incompatible with everyone else's).

Ssmcv 2019-09-20 github

you end up loading libSDL-image 2.0.10

The versions of SDL2 and SDL2_image are out of sync (they're separate upstream source releases, with SDL2_image currently at 2.0.5), so more precisely this should have said:

You end up loading a version of libSDL_image that was compiled against (and hence depends on) SDL2 2.0.10

The practical effect is the same though.

Ssmcv 2019-09-20 github

A fix is in progress, removing the special pinning for SDL2 so that it follows the same logic as most other libraries (use the Steam Runtime version or the distro version, whichever one looks newer).

TTTimo 2019-09-20 github

Fix will be in the next beta update (> Sep 20).

Kkisak-valve maintainer 2019-09-23 github

Hello @nanonyme, per "Fix titles depending on SDL_image not working on distros that use SDL2 2.0.10" in the 2019-09-23 Steam client beta update, please retest this issue.

Nnanonyme 2019-09-24 github

There's some reports from users that the fix helped with games that do not have our workaround. I requested test results directly here but anyway.

Nnanonyme 2019-10-03 github

Since this is pending in beta, Flatpak Steam will now block SDL2 2.0.9 (and only that version) from loading from Steam Runtime effective for all games. It will be clearly visible from logs when this happens so we should be able to know when above fix lands.

Kkisak-valve maintainer 2019-11-08 github

Closing per "Fix titles depending on SDL_image not working on distros that use SDL2 2.0.10" in the 2019-10-30 Steam client update.

Launch options