identify-library-abi: Factor out a single run of ldconfig
No functional change intended.
identify-library-api: Add an option to list the ldconfig search path
If we use this in run.sh in preference to running /sbin/ldconfig directly, then we'll only need to add support for distributions with more than one parallel ldconfig binary (like Exherbo) in one place.
identify-library-api: Add an option to silence ldconfig's stderr
identify-library-api: On Exherbo, run both versions of ldconfig
Unlike other multiarch/multilib designs, Exherbo has one build of ldconfig per architecture, each with its own configuration that only searches libraries intended for that word size.
This is intended to be used in conjunction with steam-runtime!48, which is not currently visible to the public, but the tl;dr is that it's an updated
run.sh making use of this feature.
Versions for convenient testing:
Instructions for testing on Exherbo:
~/.steam/root/ubuntu12_32/steam-runtime.tar.xzinto a suitable place. I used
~/tmp, so I have a
~/tmp/steam-runtime/run.shwith the proposed version, and make sure it's executable
~/tmp/steam-runtime/amd64/usr/bin/steam-runtime-identify-library-abiwith the proposed version, and make sure it's executable
rm -fr ~/tmp/steam-runtime/pinned_libs_*
steam(in the same shell where the three variables above are set)
Instructions for faking Exherbo on a Debian/Ubuntu system for testing (this is a bit destructive, don't do this on a machine that is important to you):
$ sudo ln -s ld.so.cache /etc/ld-x86_64-pc-linux-gnu.cache $ sudo ln -s ld.so.cache /etc/ld-i686-pc-linux-gnu.cache $ sudo mkdir -p /usr/x86_64-pc-linux-gnu/bin $ sudo mkdir -p /usr/i686-pc-linux-gnu/bin $ sudo tee /usr/x86_64-pc-linux-gnu/bin/ldconfig >/dev/null <<'EOF' #!/bin/sh exec /sbin/ldconfig -f /etc/ld.so.conf.d/x86_64-linux-gnu.conf "$@" EOF $ sudo tee /usr/i686-pc-linux-gnu/bin/ldconfig >/dev/null <<'EOF' #!/bin/sh exec /sbin/ldconfig -f /etc/ld.so.conf.d/i386-linux-gnu.conf "$@" EOF $ sudo chmod +x /usr/x86_64-pc-linux-gnu/bin/ldconfig $ sudo chmod +x /usr/i686-pc-linux-gnu/bin/ldconfig