-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Steam beta 2021-09-07: steamwebhelper cannot find LIBTHAI_0.1.25 on NixOS #462
Comments
@kisak-valve or @benneti, please could you retitle this to "Steam beta 2021-09-07: steamwebhelper cannot find LIBTHAI_0.1.25 on NixOS"? If people on different non-FHS distros like Guix have similar issues, then we'll want to track those separately. |
@benneti, do you know who maintains the Steam package in NixOS? Can you ask them to participate in solving this issue? |
I hope it is fine for you to be pinged here, could you maybe help @jagajaga @jonringer or maybe the maintainers of the runtime are more suited @hrdinka @abbradar ? |
Steam for Linux is primarily designed to be run on a FHS-ish operating system like Ubuntu, Arch or Fedora, so it's always going to be a bit of an awkward fit on NixOS. I know NixOS is not FHS, but I also know (from previous issues) that it builds a small FHS container and runs Steam inside that container, to make an environment a bit closer to Steam's expectations. Some information that would help:
It might also be helpful to edit
I think this is probably the root cause, or a large part of the root cause. On a more normal, FHS distribution,
However, there is clearly something a bit weird going on here, because we're successfully picking up I think the easiest way to make this work might be something like this:
|
I think it is a problem with the LD library path order (putting system library at the very end omitts this error, but then it mesa doesn't work as expected anymore). Additionally for completeness:
(steam-run runs the following application in the environment steam sees) |
The intended library path order is as I said: "pinned" libraries (those that are strictly newer in the runtime than on the host, or have had incompatible changes), then your libraries from NixOS' FHS container (which you can update), and finally our libraries from the In your case there are no "pinned" libraries, which is expected when running on a reasonably up-to-date host OS. The problem is that on NixOS, the "your libraries" part of the search order is only finding some of your libraries, but not the rest, for whatever reason. If you add pango's dependencies (in particular libthai) to the FHS environment, so that they will appear in |
I already tried to add them, but then I simply hit the next library with such a problem. Thank you for the details by the way! |
Something else to consider here is: what would happen on a more typical OS that we actually have the resources to test, like Ubuntu or Arch? And if the answer on NixOS is "something totally different", then it's always going to be more likely to break on NixOS. On a more typical OS, we're not running in a special minimal container, we're running on the host OS - so we can see all libraries, including those that the desktop environment depends on. The Steam Runtime is designed to work with this, rather than against it. You've chosen to use an unusual non-FHS operating system, so in a sense you've brought this on yourself; but you can mitigate it by reducing the number of things visible to Steam that are unusual.
Which is ...? You can make this process take fewer iterations by assuming you are likely to need "most" of the libraries in |
I made a PR to append the pinned libraries to LD_LIBRARY_PATH: https://github.com/NixOS/nixpkgs/pull/120829/files I could rebase the PR to see if it would fix anything, but:
just for clarity, this would be:
I can't seem to find a |
This issue is about the Steam beta, not the general-availability version (at the moment). The general-availability version has a much simpler setup for The intention is that for the steamwebhelper, after going through To achieve that, I think all you would need to put in the caller environment should be However, the way this currently works, and with your FHS environment not having a |
thanks john for joining in, was about to write an answer but smcv summarizes it better than I could |
It is not supposed to be necessary to add these directories to the search path before running Steam. Any parts of Steam that need to search these directories are meant to edit the Looking at NixOS/nixpkgs#120829, it is not supposed to be necessary to add those directories to the search path either. |
Is there a way to get rid of using LD_LIBRARY_PATH altogether? I think part of the issue is that LD_LIBRARY_PATH is destructively forcing a lot of unwanted behavior as well. For a while we were building a ldconfig.cache for steam to consume. Would there be another way to communicate dependency preference? |
Are you not still doing that? If you can provide a ldconfig cache, together with a |
After today's update, the general-availability version is also likely to be affected by this. The shortest path to a working package is probably one of these:
or
If you are maintaining a Steam package in a distro, particularly one that is unusually-set-up and likely to experience compatibility issues, then I would recommend testing the beta client so that behaviour changes will not come as an unwelcome surprise when they appear in the general-availability branch. |
Sorry, this is not going to happen any time soon. The scripts based around LD_LIBRARY_PATH are far from ideal, but they're the best answer we currently have for portability to all distributions. The most likely way to stop using LD_LIBRARY_PATH in the long term is to start running parts of Steam in containers, but that would make container support a mandatory dependency (not just for modern Proton, but for Steam itself), and we're not ready to have that dependency at the moment. |
FWIW, if the Steam flatpak was officially supported, I will gladly drop the NixOS native steam package and use that. Saves you guys the maintenance burden of supporting dozens of distros too. Just my 2c. |
The Flatpak app is not officially supported by Valve, but neither is NixOS, so the Flatpak app is certainly an option... I would suggest weighing up the advantages and disadvantages of the Flatpak app vs. the NixOS-native package for yourself. Both can be summarized as putting Steam in a more-FHS-like container so that it won't be broken by NixOS' non-FHS layout. |
While true technically, in terms of design, Flatpak is not designed to act like a traditional FHS environment. It is FHS-like, but it intentionally breaks some things in the name of isolation and sandboxing. NixOS's FHSEnv, on the other hand, is designed to run traditional FHS apps, and is not designed to be a sandbox. Something not working that works in the least common denominator of FHS distros, is a bug in NixOS's FHSenv imo. Unfortunately, it is currently a VERY leaky abstraction and there are many such bugs. I think at some point in the near future fhsenv will need to be redesigned entirely for a few reasons. |
(steam.override {
extraPkgs = pkgs: with pkgs; [ pango harfbuzz libthai ];
}) This fixed my issue. @smcv The irony of all this DLL hell, is that nix is designed to solve this, if Steam and all sub components were built inside a pure nix derivation, Valve would pick up on any missing dll's pretty quickly, my biggest gripe is that the updates are pushed with no warning of changes, and don't seem to be widely tested, and no way to revert back to older versions, nix provides these facilities. If I break my ArchLinux system I have to find a rescue disk and then fix it, if I screw up my NixOS all I have to do is select a different generation from my boot menu. This could be easily fixed if Valve used a sandboxing system to test their code, and then explicit defining what OS libraries are required for steam to build, using containers on the client end I don't think necessary. And then perhaps having a notice board somewhere that OS maintainers can quickly check and update their packages (maybe even parse), before these updates come out. Yesterday Valve shipped this broken "beta" to everyone without waiting an extra few days to fix it for OS maintainers, why can't they wait a few extra days? On top of that, it would be nice if there was a guide to debugging native steam games, Half-Life Seg-faults on my system, the dump files are instantly deleted and uploaded to Valves server, I can't figure out how to get a debugger attached inside the layers of runtimes, and even when I do get a crash dump file |
Picking up on @smcv comment on it being weird to use both the nix version of Perhaps there's an assumption that the FHS container has a valid but minimized ecosystem of dependencies when it only has a minimum set added through trial and error. I suspect the short term fix is collecting the valid dependency set as a group and adding it to the FHS container on the nixos side. Notes on Adding |
as this will most likely be fixed on the nixos side (and there are already workarounds) feel free to close it here |
To most closely resemble what is expected from a typical FHS distribution, the libraries in If the FHS environment does that, then that will pre-emptively fix various possible future issues.
I do not have control over Valve's update schedule for Steam. There are other regressions triggered by fixing ValveSoftware/steam-for-linux#7935 that I had hoped would be fixed in a new beta before going to GA, such as #458, but fixes for those didn't make it either.
It wasn't my decision, but I would guess: either because ValveSoftware/steam-for-linux#7935 was breaking distributions that are more widely used than NixOS, or because changes in the Windows version of Steam were being released and the Linux version had to keep up. Again, I would recommend that people who are involved in maintaining distros' Steam packages should use the Steam beta, so that changes that happen in the general-availability branch of Steam do not come as an unwelcome surprise when it's too late to work around them by switching between branches. |
Fixes #137279 and ValveSoftware/steam-runtime#462. (cherry picked from commit 64c6851)
Fixes #137279 and ValveSoftware/steam-runtime#462. (cherry picked from commit 64c6851)
fixed in nixos |
Your system information
SteamLinuxRuntime/VERSIONS.txt
?SteamLinuxRuntime_soldier/VERSIONS.txt
?Please describe your issue in as much detail as possible:
The issue described here ValveSoftware/steam-for-linux#7935 (comment) i.e. LIBRARY + SHOP only work in big picture mode because steamwebhelper is broken.
steamwebhelper.log
Either the NixOS package needs to be changed to accomodate the missing libraries or they should be in the runtime.
Steps for reproducing this issue:
The text was updated successfully, but these errors were encountered: