-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
build-fhsenv-bubblewrap: remove /usr/lib and /usr/lib32 from LD_LIBRARY_PATH #263201
Conversation
Result of 1 package blacklisted:
5 packages failed to build:
157 packages built:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll have to check whether this breaks the Steam runtime but otherwise, I don't see why we should have the lib dirs in LD_LIBRARY_PATH.
This was taken over from the old chroot made by @abbradar. Do you know why you added these in 3e395b7?
To get this merged quickly without testing steam, you could add these paths back in the Steam package (and verify LD_LIBRARY_PATH
is still the same inside steam-run
) and we can do that later.
Btw, have you ran a sample of dependant packages to check whether they still work? They should but you never know.. |
Mangohud just stopped working but that happens regardless of your change and I doubt it'd cause that too. |
Successfully created backport PR for |
Git push to origin failed for release-23.05 with exitcode 1 |
I've been running it for a few days but hadn't tested steam. Quick check now and it still opens but haven't tested any games. |
If you build a FHS environment to run Xilinx Vivado, this patches breaks it as Vivado fails to find libtinfo (seems to be #218534). |
@sbourdeauducq I'd recommend you to add the paths back for that particular package then. |
Wasn't the premise for this PR that /usr/lib was in the search path already? Why do packages need fixes after this PR? (E.g. cdc306e.) Can we fix this centrally (without relying on $LD_LIBRARY_PATH)? (I wonder what percentage of FHS env packages need fixes after this PR.) |
If an FHS program requires default FHS library paths in LD_LIBRARY_PATH in order to run inside an FHS, it's quite honestly broken. |
Can you elaborate? I thought that on normal FHS distros /usr/lib was in the dynamic linker search path, so that you could do |
1 similar comment
Can you elaborate? I thought that on normal FHS distros /usr/lib was in the dynamic linker search path, so that you could do |
Not just FHS packages - it is nice to be able to spin FHS shells on NixOS to run whatever (possibly proprietary) binary apps that one needs without having to worry about Nix/Nixpkgs internals. |
LD_LIBRARY_PATH takes precedence over /nix/store deps in non-FHS executables, which was too high a priority and causes programs to run against unexpected library versions. That caused #262080 which reported widespread breakage inside FHS envs on the stable release. I suggest raising new issues with specific breakages that you find since it's unlikely this will be reverted. #89769 and #218534 track an issue with ncurses libtinfo.so's soname causing it not to be found by some FHS apps, which seems to be the main cause of apps relying on LD_LIBRARY_PATH being set. |
workaround due to NixOS/nixpkgs#263201 explanation and taken from NixOS/nixpkgs#89769
This updates nixpkgs in `flake.lock` to bring in a fix for the `FHSUserEnv` required to run Bazel on NixOS. Without this fix, on recent NixOS, an improper LD_LIBRARY_PATH will be set, causing glibc to crash processes with "stack smashing detected." See NixOS/nixpkgs#263201
This commit bumps nixpkgs to 23.11, while incorporating small changes to ensure everything works. At the same time, nixpkgsUnstable has been removed as it does not seem to be needed anymore. android-nixpkgs has been bumped to the latest version as well. `LD_LIBRARY_PATH` paths has been added to buildFHSUSerEnv, because of upstream changes. Please see the following information if curious. NixOS/nixpkgs#103648 NixOS/nixpkgs#112266 NixOS/nixpkgs#262775 NixOS/nixpkgs#263201 NixOS/nixpkgs#278361
This commit bumps nixpkgs to 23.11, while incorporating small changes to ensure everything works. At the same time, nixpkgsUnstable has been removed as it does not seem to be needed anymore. android-nixpkgs has been bumped to the latest version as well. `LD_LIBRARY_PATH` paths has been added to buildFHSUSerEnv, because of upstream changes. Please see the following information if curious. NixOS/nixpkgs#103648 NixOS/nixpkgs#112266 NixOS/nixpkgs#262775 NixOS/nixpkgs#263201 NixOS/nixpkgs#278361
Description of changes
#262775
#262080
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)