Skip to content

Commit

Permalink
umu_run: handle ldconfig failing to find libc.so
Browse files Browse the repository at this point in the history
- Related to Open-Wine-Components#106

- This is a temporary solution until we figure out how to properly setup an environment for distributions like NixOS so the steam runtime container framework can search for key libraries in shared library paths
  • Loading branch information
R1kaB3rN committed May 22, 2024
1 parent 389e6d7 commit 230f506
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion umu/umu_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,19 @@ def enable_steam_game_drive(env: dict[str, str]) -> dict[str, str]:
break

if os.environ.get("LD_LIBRARY_PATH"):
log.debug("LD_LIBRARY_PATH=%s", os.environ["LD_LIBRARY_PATH"])
paths = {path for path in os.environ["LD_LIBRARY_PATH"].split(":")}

if env["STEAM_COMPAT_INSTALL_PATH"]:
paths.add(env["STEAM_COMPAT_INSTALL_PATH"])

# Set the shared library paths of the system after finding libc.so
# In some cases, using ldconfig to determine library paths can fail in Non-FHS
# compliant filesystems (e.g., NixOS). In those cases, depend on LD_LIBRARY_PATH
# See https://github.com/Open-Wine-Components/umu-launcher/issues/106
for path in steamrt_paths:
paths.add(path)
if not Path(path).is_symlink() and libc and Path(path, libc).is_file():
paths.add(path)
env["STEAM_RUNTIME_LIBRARY_PATH"] = ":".join(list(paths))

return env
Expand Down

0 comments on commit 230f506

Please sign in to comment.