Skip to content

identify-library-api: On Exherbo, run both versions of ldconfig

Simon McVittie requested to merge wip/sr615 into main
  • 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.

    Helps: https://github.com/ValveSoftware/steam-runtime/issues/615


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:

  1. Unpack ~/.steam/root/ubuntu12_32/steam-runtime.tar.xz into a suitable place. I used ~/tmp, so I have a ~/tmp/steam-runtime directory.
  2. Overwrite ~/tmp/steam-runtime/run.sh with the proposed version, and make sure it's executable
  3. Overwrite ~/tmp/steam-runtime/amd64/usr/bin/steam-runtime-identify-library-abi with the proposed version, and make sure it's executable
  4. rm -fr ~/tmp/steam-runtime/pinned_libs_*
  5. export STEAM_RUNTIME="$HOME/tmp/steam-runtime"
  6. export STEAM_RUNTIME_SCOUT="$HOME/tmp/steam-runtime"
  7. export STEAM_RUNTIME_VERBOSE=1
  8. 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
Edited by Simon McVittie

Merge request reports