-
Notifications
You must be signed in to change notification settings - Fork 49
steam-runtime-tools scripts may error with getopt: command not found
#414
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
Comments
getopt: command not found
The nixpkgs So far, the (Note, however, that since NixOS/nixpkgs#381047 the I've not yet tried to reproduce the issue, however it sounds like the That said, we probably don't need all of them; some may relate to the steam launcher itself or running native games, so aren't relevant to umu, proton, or steamrt. If so, then we should just be able to add a few things like |
#75
|
That issue sounds like it would affect However, "command not found" errors imply the I can see
For steam, this is getopt 1.1.6, packaged as I'm struggling to see where For heroic, it is |
Hm, I'm seemingly unable to reproduce the issue on NixOS (I can't test on SteamOS): $ PROTONPATH=GE-Proton umu-run ""
INFO: umu-launcher version 1.2.5 (3.12.9 (main, Feb 4 2025, 14:38:38) [GCC 14.2.1 20241116])
INFO: No GAMEID set, using umu-default
INFO: Setting up Unified Launcher for Windows Games on Linux...
INFO: Downloading GE-Proton9-26.sha512sum...
INFO: Downloading GE-Proton9-26.tar.gz...
INFO: Downloading steamrt3 (latest), please wait...
INFO: SteamLinuxRuntime_sniper.tar.xz: SHA256 is OK
INFO: Verifying integrity of sniper_platform_3.0.20250306.120299...
INFO: sniper_platform_3.0.20250306.120299: mtree is OK
INFO: Using steamrt3 (latest)
INFO: GE-Proton9-26.tar.gz: SHA512 is OK
INFO: Extracting GE-Proton9-26.tar.gz...
INFO: /home/matt/.cache/umu/tmpk6e20x2w/GE-Proton9-26 -> /home/matt/.local/share/Steam/compatibilitytools.d
INFO: Using GE-Proton9-26
pressure-vessel-wrap[5748]: W: Found more than one possible libdrm data directory from provider
Proton: Upgrading prefix from None to GE-Proton9-26 (/home/matt/Games/umu/umu-default/)
ProtonFixes[5867] INFO: Running protonfixes
ProtonFixes[5867] INFO: Running checks
ProtonFixes[5867] INFO: All checks successful
ProtonFixes[5867] WARN: Game title not found in CSV
ProtonFixes[5867] INFO: Non-steam game UNKNOWN (umu-default)
ProtonFixes[5867] INFO: No store specified, using UMU database
ProtonFixes[5867] INFO: Using global defaults for UNKNOWN (umu-default)
ProtonFixes[5867] INFO: Non-steam game UNKNOWN (umu-default)
ProtonFixes[5867] INFO: No store specified, using UMU database
ProtonFixes[5867] INFO: No global protonfix found for UNKNOWN (umu-default)
Proton:
Proton: Executable is inside wine prefix, launching normally.
fsync: up and running.
Application could not be started, or no application associated with the specified file.
ShellExecuteEx failed: File not found.
Command exited with status: 1 |
If you are able to reproduce with the flake in this repo, can you test if this patch helps? diff --git a/packaging/nix/package.nix b/packaging/nix/package.nix
index 2030f87..b1572b5 100644
--- a/packaging/nix/package.nix
+++ b/packaging/nix/package.nix
@@ -41,5 +41,9 @@ in
if overrides == {}
then umu-launcher-unwrapped
else umu-launcher-unwrapped.override overrides;
+
+ extraPkgs = pkgs: [
+ pkgs.util-linux
+ ];
}
) Otherwise, if you're installing from nixpkgs you could use this overlay instead: (final: prev: {
umu-launcher = prev.umu-launcher.override {
extraPkgs = pkgs: [ pkgs.util-linux ];
};
}) E.g. using an overlay with home-manager
Assuming home-manager is managing its own # Either in home.nix or an imported home-manager module
{
nixpkgs.overlays = [
(final: prev: {
umu-launcher = prev.umu-launcher.override {
extraPkgs = pkgs: [
pkgs.util-linux
];
};
})
];
} |
To note, I do not get the
Using the overlay where home-manager is managing its own pkgs instance, I get a new error:
|
This issue seems to be dependency related when entering the FHS-environment and only applicable to the official umu-launcher NixOS package. I haven't tested the Flake yet or to see if the issue is only specific to home-manager. Though, I don't expect the former to be an issue.
That's strange, assuming you were using home-manager and umu-launcher. |
I guess because you're running steamos, all of steamrt's dependencies will be installed as part of the distro. So in that scenario it should be fine to use the unwrapped package. The goal of the unwrapped package is to ensure all dependencies and env vars are correct regardless of that is installed on the main system. It is strange/interesting that the wrapper package would make things worse though. Maybe bubblewrap blocks access to some of the host's environment?
It shouldn't make a difference how the package is installed (nixos, home-manager, shell), whatever method is used it'll be the same package. It's more likely that something impure from the wider system is different. It's also possible that my system has even more dependencies missing than yours, and so I'm running into a different (earlier) issue. I've tested both the nixpkgs package and this repo's flake. Both exit with this error:
(See full output above)
Looks like you may be using binaries that aren't nix compatible. Nix packages need to be built or patched to link correctly with nix-installed libraries. It could also be a lib version discrepancy. Hopefully once we get iron out all the required dependencies things will start to work 🤞 It's a shame we can't add a test to the nix package to cover this usage; nix tests need to be able to run in the build sandbox (without network access), so I don't think this case can be tested easily. We can try adding more of steam's requirements to the overlay for now: This overlay should bring in the same dependencies the steam wrapper does. I suspect many of them are steam client dependencies, not steamrt dependencies, but if it works with these we can try gradually commenting out the ones we don't think we need. (final: prev: {
umu-launcher = prev.umu-launcher.override {
# https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/blob/main/docs/distro-assumptions.md#command-line-tools
extraPkgs = pkgs: with pkgs; [
# commented out, since it isn't listed in the steam package... maybe we'll need it anyway?
# util-linux
# We could also try using the other getopt package:
# getopt
# this shouldn't be needed, but maybe it has some transitives?
# if uncommenting this helps, we can investigate further
# steam-unwrapped
bash
coreutils
file
lsb-release # not documented, called from Big Picture (we shouldn't need this)
pciutils # not documented, complains about lspci on startup (maybe we need this?)
glibc_multi.bin
xz
zenity
];
# https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/blob/main/docs/distro-assumptions.md#shared-libraries
multiPkgs = pkgs: with pkgs; [
glibc
libxcrypt
libGL
libdrm
libgbm
udev
libudev0-shim
libva
vulkan-loader
networkmanager # not documented, used for network status things in Big Picture
# (we shouldn't need this)
libcap # not documented, required by srt-bwrap
]
};
}) |
Additionally, I will say that the error |
The host env could be related. Depending on what revision of nixpkgs you've updated from/to, a packaging regression is also possible. We could try git-bisecting your nixpkgs input if needed. |
As far as dependencies goes, I believe we should only need to cover the ones between the boundaries of umu-launcher and the container runtime. In our case, since we only support container runtimes (e.g., soldier, sniper), this should only be the shell interpreter related or GNU coreutil related ones. The dependencies for the binaries within the |
Yeah, I just figured we'd start overkill with dependencies. If that works, then we can gradually remove some/most until things stop working again. If having all the same dependencies as steam isn't enough, then there's probably additional issues unrelated to dependencies. If this is a regression, then maybe something in the |
Hmm, is there an easy way to track the changes for the umu-launcher
umu-launcher-unwrapped
|
Bubble wrap does have an impact on the dependencies it's part of why nix packages can cause libGL errors iirc |
It is generated, however you could checkout different revisions of nixpkgs and build the wrapper to inspect/compare it. That said, the
Yeah that inner wrapper is less exciting; it's just setting up To clarify, we have a few layers of indirection here:
The easiest way to debug this if you have With nixpkgs cloned locally and your terminal $ # Clone nixpkgs
$ git clone https://github.com/NixOS/nixpkgs.git
$ cd nixpkgs
$ # Build umu-launcher
$ nix-build -A umu-launcher
$ # Run umu-launcher
$ PROTONPATH=GE-Proton9-26 ./result/bin/umu-run ""
$ # Start a bisect for run and profit
$ git bisect start
$ git bisect bad # (assuming you reproduced the issue)
$ git checkout 3f5198c5 # commit before #381047
$ # Rebuild & rerun:
$ nix-build -A umu-launcher
$ PROTONPATH=GE-Proton9-26 ./result/bin/umu-run ""
$ git bisect good # (assuming the issue wasn't reproduced)
$ # Checkout the commit from #381047
$ git checkout fc333939
$ nix-build -A umu-launcher
$ PROTONPATH=GE-Proton9-26 ./result/bin/umu-run ""
$ git bisect bad # (assuming you reproduced the issue) If needed, you can edit the package definition directly at: vim pkgs/by-name/um/umu-launcher/package.nix (no need to mess with overlays) Also, idk if you'll get any useful info from |
Uh oh!
There was an error while loading. Please reload this page.
Description
When running umu-launcher in certain environments/system configurations, the Steam Runtime tool's shell scripts may result in errors due to missing commands not found in PATH. In the case for
v2-entry-point
akaumu
, I get the errorgetopt: command not found
.Terminal output
Reproduce
PROTONPATH=GE-Proton umu-run ""
cc @MattSturgeon @LovingMelody @beh-10257 for insight
The text was updated successfully, but these errors were encountered: