diff --git a/pressure-vessel/runtime.c b/pressure-vessel/runtime.c index 78f9e2f98a5e792c91b91f600f0a5713ea283702..ab75c2dd103f1eb309fa384fd64bc3c4eedcf66f 100644 --- a/pressure-vessel/runtime.c +++ b/pressure-vessel/runtime.c @@ -1885,6 +1885,18 @@ pv_runtime_adverb_regenerate_ld_so_cache (PvRuntime *self, "--add-ld.so-path", ld_path, NULL); + /* If we are not operating from a mutable sysroot, then we do not + * have the opportunity to delete the runtime's version of overridden + * libraries, so ldconfig will see both the provider's version and + * the runtime's version. If the runtime's version has an OS ABI tag + * and the provider's version does not, then ldconfig will prioritize + * the runtime's older version. Work around this by adding the + * provider's version to LD_LIBRARY_PATH *as well as* regenerating + * the ld.so.cache - this will not work for games that incorrectly + * reset the LD_LIBRARY_PATH, but is better than nothing! */ + if (self->mutable_sysroot == NULL) + pv_search_path_append (ldlp_after_regen, ld_path); + pv_search_path_append (ldlp_after_regen, aliases); }