Skip to content

RFC: ld-libs: Expand fallback search path to cover most common OS variants

https://github.com/ValveSoftware/steam-runtime/issues/704

  • ld-libs: Expand fallback search path to cover most common OS variants

    We don't necessarily know which OS we are running on, but we can easily search all the paths that are commonly used in the Debian family (multiarch), the Red Hat family (FHS multilib with 32-bit as unqualified), the Arch family (reversed-FHS multilib variant with 64-bit as unqualified), the Clear Linux and Solus family (multilib variant with no unqualified lib directory) and Exherbo (cross-compiler-style multiarch variant).

    If we search directories that the OS- and architecture-specific glibc would not have searched, that isn't necessarily such a bad thing: the worst that can happen is that we find a library (of the ELF class and machine type that we are looking for) that would not have been found by the real glibc, and even that is relatively unlikely. So, unless configured otherwise, we search all of these directories unconditionally.

    The directories are listed here with the highest-confidence variant first: for example, if we see the directories associated with Debian-style multiarch or Exherbo's multiarch variant, we can be very confident that any libraries in those directories are of the architecture we are looking for, whereas if we see lib, it's anyone's guess which architecture that directory is for.

/cc @refi64 @vivek

Merge request reports

Loading