You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can't run getcap in steam-run (symbol lookup error: getcap: undefined symbol: cap_get_nsowner) #92795
Describe the bug
A clear and concise description of what the bug is.
You can't run getcap inside steam-run (returns getcap: symbol lookup error: getcap: undefined symbol: cap_get_nsowner).
This makes SteamVR's vrstartup script think that no capability is set on vrcompositor-launcher which causes it to show a popup prompt on every SteamVR startup asking for superuser permissions and then an error message becasue of #69338.
To Reproduce
Steps to reproduce the behavior:
steam-run getcap
Expected behavior
A clear and concise description of what you expected to happen.
It should print usage and, when pointed at a file, the capabilities of the file.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The linker error is caused by using nixpkgs getcap with libcap from steamrt. Adding libcap to the steam FHS multiPkgs fixes this, but seems to break other things:
diff --git a/pkgs/games/steam/chrootenv.nix b/pkgs/games/steam/chrootenv.nix
index 56e1a09f36e..ea8cd3bc39c 100644
--- a/pkgs/games/steam/chrootenv.nix+++ b/pkgs/games/steam/chrootenv.nix@@ -111,6 +111,9 @@ in buildFHSUserEnv rec {
libuuid
libbsd
alsaLib
++ # needed by getcap for vr startup+ libcap
] ++ (if (!nativeOnly) then [
(steamPackages.steam-runtime-wrapped.override {
inherit runtimeOnly;
@@ -144,7 +147,6 @@ in buildFHSUserEnv rec {
expat
dbus
cups
- libcap
SDL2
libusb1
dbus-glib
~/.local/share/Steam/steamapps/common/SteamVR/bin/linux64/vrcompositor-launcher: error while loading shared libraries: libcap.so.2: cannot open shared object file: No such file or directory
This made me think about RPATH / LD_LIBRARY_PATH / RUNPATH and the implications of getcap using RUNPATH instead of RPATH.
Fixing getcap gets rid of the popup if you manually setcap, but that causes other issues you've already discovered.
I'm going to leave this for now. I just wanted to document my investigation.
This fixes the issue, I am now able to run the regular vrstartup.sh from steam-run without any popup after setting the cap manually (automatic setcap via SUID wrappers doesn't work because of #69338).
It does not fix the issue in Steam itself though oddly, not even when Steam is run from within steam-run.
Which are those "other things" your patch breaks? I was able to run SteamVR and Beat Saber without any issue (well, none that I didn't have before).
As for your shared library issue, that's fixed by #55973.
I was just referring to ~/.local/share/Steam/steamapps/common/SteamVR/bin/linux64/vrcompositor-launcher: error while loading shared libraries: libcap.so.2: cannot open shared object file: No such file or directory
Activity
corngood commentedon Jul 29, 2020
The linker error is caused by using nixpkgs getcap with libcap from steamrt. Adding libcap to the steam FHS multiPkgs fixes this, but seems to break other things:
This made me think about RPATH / LD_LIBRARY_PATH / RUNPATH and the implications of getcap using RUNPATH instead of RPATH.
Fixing getcap gets rid of the popup if you manually setcap, but that causes other issues you've already discovered.
I'm going to leave this for now. I just wanted to document my investigation.
Atemu commentedon Jul 30, 2020
This fixes the issue, I am now able to run the regular vrstartup.sh from steam-run without any popup after setting the cap manually (automatic setcap via SUID wrappers doesn't work because of #69338).
It does not fix the issue in Steam itself though oddly, not even when Steam is run from within
steam-run.Which are those "other things" your patch breaks? I was able to run SteamVR and Beat Saber without any issue (well, none that I didn't have before).
As for your shared library issue, that's fixed by #55973.
corngood commentedon Jul 30, 2020
I was just referring to
~/.local/share/Steam/steamapps/common/SteamVR/bin/linux64/vrcompositor-launcher: error while loading shared libraries: libcap.so.2: cannot open shared object file: No such file or directorystale commentedon Jan 26, 2021
I marked this as stale due to inactivity. → More info
expipiplus1 commentedon Jan 27, 2021
still important to me, @stalebot
ashkitten commentedon Feb 23, 2021
fixed by #114024