Skip to content

WIP: Wrap steam-runtime-tools-system-info in a shell script

Simon McVittie requested to merge wip/smcv/ld-so-wrapper into master

When running the version of -system-info that comes with the LD_LIBRARY_PATH-based Steam Runtime, we need to pick up libsteam-runtime-tools (and our other dependencies, like json-glib) from an adjacent library directory, even if the LD_LIBRARY_PATH is not correctly set. This enables us to use -system-info to diagnose an incorrectly-set LD_LIBRARY_PATH without chicken/egg problems.

We can't set LD_LIBRARY_PATH, because that would overwrite the one that we're trying to diagnose, even for child processes.

We also can't use a RUNPATH or RPATH, because those confuse the old version of dpkg-shlibdeps in SteamRT 1 'scout'.

What we can do is to run ld.so directly. This lets us alter the library path for just this one program execution, without altering the library path for its children; even better, this bypasses LD_LIBRARY_PATH.

Merge request reports