-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Document how to work around dynamic linking problems caused by glibc updates #170897
Comments
I didn't realize there was actually a way to work around this? When I encounter it I just try to use less from my non-NixOS distro so everything I need is glibc 2.34. Are you referring to messing with |
"Yes, glibc has great ABI compatibility, but only one way. ". If that's the case then why is it so hard to persuade unstable nixos that maybe it should be using the latest version? export LD_PRELOAD=/nix/store/jd21wzn6z4sw68gpk01xj33l2j4rzbjy-glibc-2.34-115/lib/libc.so.6 I am randomly preloading things that look sorta like libc in the hope that one of them migh have the right kind of elf header. We shouldn't fall in a heap when libc gets upgraded. home-manager won't even downgrade. If anyone knows what magic I should be pasting where it would be much appreciated. |
I'm pretty sure that this is the cause of #169464 too. |
Very likely cause of #167735 too. |
#5 NixOS/nixpkgs#170897 Signed-off-by: Anthony Rabbito <[email protected]>
@gilescope As I understand, people want to avoid I don't know much of the internals of glibc, but I can imagine a generic solution that combines the best of both world (runnable on newer systems, and purity when running on older systems): if we wrap all packages, we could check in the wrapper the GLIBC version used by the drivers of the system. If the version is newer than the GLIBC used by the current system, then we |
@sternenseemann Is the fix for this just to randomly try |
No, ideally you just update the impure stuff on your system to line up with whatever nixpkgs provides at the moment. Preloading the right version for a specific binary (not globbaly) can be a good workaround if that's not attainable. |
Right now on 22.05 trying to downgrade to 21.05: $ /nix/store/c1gvl27x3jnzc1z842r24xj37b7rlraw-nixos-system-virtualbox-21.05.4678.932ec35ff8a/bin/switch-to-configuration switch |
An attempt to solve this: #177788 |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/buildfhsuserenv-creates-a-small-root-directory/31220/1 |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: |
With the recent update to glibc 2.34, a lot of people have been running into problems caused by nixpkgs and their non-NixOS distribution switching glibc version at a different pace (and the problem is probably also possible to run into on NixOS, albeit rarer). I've seen two different class of issues recently:
GLIBC_PRIVATE
): Cannot run test with raw-strings-qq - GHC 8.10.7, nixpkgs unstable #169332GLIBC_2.34
when an older version gets loaded by accident: Prisma 3.12.0 is broken #170550 (comment), Teamviewer panic on Steam Deck and Ubuntu #169040, https://discourse.nixos.org/t/opening-links-in-brave-from-discord-is-broken-version-glibc-2-34-not-found/18764, https://discourse.nixos.org/t/glibc-2-33-vs-2-34-rust-madness/18909/3, …Related discussion (on solving the technical problem):
I think a great help short of solving the problem altogether would be documenting it and how to work around it in a central place, i.e. the nixpkgs manual. Then it becomes easier to link to an answer to the recurring question. I lack the time and precise understanding of the problem at the moment, so it'd be great if someone could pick this up!
I think most important is to document the causes and how to diagnose / guess the appropriate one: Usually this issue is caused by the use of something impure (e.g. OpenGL drivers, compiled artifacts in some build directory, ...) that assume the wrong kind of ABI compatibility.
The text was updated successfully, but these errors were encountered: