-
Notifications
You must be signed in to change notification settings - Fork 244
[Bug]: ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory #1276
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
Hey @Tubo, I'm working on recreating this. Do you have an example of the test you're trying to run with pytest that triggers this issue? |
One thing that might work is running |
It's dead simple:
|
Nah didn't work unfortunately:
Debug information:
|
Gotcha that's finding the libstdc file now, but it's not the right version. Let me do a little more debugging from there |
Got the same problem. I cannot import python modules if I do not add the stdlib. But when I do that, other packages such as libsrvg are not working anymore. Unsetting LD_LIBRARY_PATH in the init hook resolve the problem for packages but breaks the import. |
@aacebedo we're digging into this class of errors. Could you please share some files so we can repro it: devbox.json, devbox.lock, requirements.txt, and possibly some command to repro your specific error? While a good fix may take some time, we can try to advise you on how to get unblocked. Feel free to pull it into a new issue to keep this one scoped to Tubo's scenario? |
Thanks @savil for the answer. here is my devbox.yaml
and the requirements file:
If you try it you will see that python import matplotlib is working but not the |
Thanks @aacebedo. I'm not quite able to repro because the drawio nix package appears to be broken, so it won't install (for my intel mac). I can try (I have to pause for a few hours for some personal work, but can look at it a bit later today) |
Thanks ! I am using it on NixOS. |
@aacebedo in a debian-container I can get a I can import
but running
Is this the error you saw? |
For some reason rsvg is not in |
It is exactly this issue. You can also try |
you can try adding unset LD_LIBRARY_PATH to the init hook |
@aacebedo I think changing the
We're investigating more principled fixes. |
Hi, |
@aacebedo I was discussing a similar issue with a user on Discord (is that you as well?). In that case, something like this helped:
The reasoning is:
|
Yes it is me. I thought I could find some help from the community on it. Still I am facing other libc errors on other software installed with devbox so I try to investigate this with the clue about the libc version change you gave me. |
@aacebedo we've been researching a fix for your issue. In this repository https://github.com/savil/devbox-issue-1276, I have a Could you please try it out in your project, and let us know if this approach works? If it does, we can build this as a feature in Devbox. Ideally, it should work with minimal user work i.e. no need to manually write your own |
Thanks for the work ! |
@aacebedo That's a bummer. Sorry to hear that. A couple of requests: Request 1: repro code Request 2: try Devbox 0.8.0-dev's glibc_patch feature
It would be great if you could try that out, and let us know if it works or not for you. Thanks! |
I cloned the |
@aacebedo 😱 oh wow. That is odd. Its been a while, but IIRC I'd been running the Dockerfile in that repo to test it out on a debian-slim image (since I have a Mac; this issue affects linux). I'll have to retry my steps in case something changed so that it is no longer working. |
@aacebedo sorry for the delay. After trying out the steps, I think I understand the problem. In my prototype, I've patched python and You are trying Or better, I'd suggest using Devbox |
@savil thanks a lot to take a look to this ! Ok I'll try the 0.8.0-dev to check this out |
Ok, so I checked out the
and
|
@aacebedo indeed, I think something is not working correctly. I can repro the error you are seeing. We're looking into it... |
@aacebedo thank you ! @gcurtis and I just looked at this. We added This exposed a couple of issues:
|
Thanks to you both looking into this ! |
I have the same issue. I was using poetry command after installing it with devbox add poetry. poetry = pkgs.symlinkJoin {
name = "poetry";
paths = [ pkgs.poetry ];
buildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/poetry --set LD_LIBRARY_PATH ${lib.makeLibraryPath [ pksgs.stdenv.cc.cc.lib ]}
'';
};
ciDeps = with pkgs; [
cmake
] ++ [ poetry ]; |
Same problem here. Unsetting EDIT: Solved by setting EDIT: Not quite solved: My script now works, but:
although I think it might've failed even before the fix.
EDIT: Importing numpy does not fail when done in IPython (installed through devbox). Uh, what? |
I ended up using a |
This problem looks very similar to a problem I worked around recently. Maybe it is the same one here? To See the fix, uncomment the line |
Resolved in latest devbox. |
Current Behavior (bug)
When using Python packages via
requirements.txt
, this time the package isortools
.This bug was related to #710 and #760.
LD_LIBRARY_PATH
is/home/tubo/Sync/Projects/radscheduler/.devbox/nix/profile/default/lib
Content of
LD_LIBRARY_PATH
is:Error messages:
Expected Behavior (fix)
Running
pytest
should not have this error.Additional context
OS: KDE Neon (Ubuntu 22.04)
Devbox version:
0.5.5
to0.5.7
devbox.json
:requirements.txt
:The text was updated successfully, but these errors were encountered: