-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
libstdc++.so.6 from GCC requires GLIBC_2.33 but gets linked with glibc-2.32 #138821
Comments
How to repro? |
Likely a duplicate of #84043 |
Install intellij idea, create a simple java/kotlin/scala project trying to initialize rocksdb and run it. I may provide a test project if necessary. |
I'm not really sure if that'll trigger the problem. There is an issue template for a reason though. Please provide the information that's requested in there. |
Oh, don't worry, it definitely will.
I'm not sure if it would help anyone if I re-format the issue report according to the template, so I would probably leave it as is. |
OK, I see :) Would you mind creating such a simple project if possible? That'd speed up the reproduction significantly for me :) |
I'm unable to reproduce the problem directly in the shell:
But a project under IDEA, doing exactly the same thing, fails. Possibly the issue is not related to IDEA itself but something is wrong with graalvm formula. I'll make a repro. |
Actually I guess the most interesting question is why do I have two glibc versions in my system? I believe that shouldn't be possible with nix versioning model?.. |
Well, the problem is solved. Wrong glibc version had been pulled by home-manager. |
@pshirshov : how did you solved it ? I have the same issue with IntelliJ and I'm also using home-manager |
check your channels |
@Artturin : they seems fine to me, but perhaps I miss something, I'm a nix noob 🥵 |
|
@Artturin : I don't have any nixos root channel. I'm currently using Nix installed on an Ubuntu 20.04 LTS |
do you have packages installed with nix-env?(other than home-manager) if so remove them |
not sure but probably not. try garbage collecting |
@Artturin : I now have a slighty different message, and I wonder if the problem is not related to an ubuntu package ? Traceback (most recent call last):
File "/usr/lib/command-not-found", line 28, in <module>
from CommandNotFound import CommandNotFound
File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 19, in <module>
from CommandNotFound.db.db import SqliteDatabase
File "/usr/lib/python3/dist-packages/CommandNotFound/db/db.py", line 5, in <module>
import apt_pkg
ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /nix/store/7fv9v6mnlkb4ddf9kz1snknbvbfbcbx0-gcc-10.3.0-lib/lib/libstdc++.so.6) because after purging ubuntu package command-not-found I no longer have the issue. Thanks a lot for your help. |
How was this fixed? I don't use home-manager and I hven't installed anything with nix-env, still I'm getting the same
UPD: I've found the issue. My Nix shell was using the |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/proper-setup-for-python-development-with-nix-and-vs-code/19011/1 |
LD_LIBRARY_PATH needs to be patched in shell hook. Ref: - https://nixos.wiki/wiki/Packaging/Quirks_and_Caveats#ImportError:_libstdc.2B.2B.so.6:_cannot_open_shared_object_file:_No_such_file - NixOS/nixpkgs#138821 (comment)
JNI libraries which need
libstdc++.so.6
fail to load under IntelliJ IDEA.Seems like something is wrong with gcc package or the way LD_LIBRARY_PATH is defined in the jetbrains formula.
Error messages look like
A quick search over the issues shows that other people experience similar linking issues with other software:
etc
At the same time everything works in FHS environments, for some reason glibc version is correct there:
I'm not sure if this problem is related to IDEA or stdenv/gcc, but I noticed that the formula for Android Studio uses FHS env, maybe IDEA should do that as well?
The text was updated successfully, but these errors were encountered: