-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
libgcc_s.so is missing from glibc when cross compiling #40797
Comments
See #36948. |
We really should try to get this fixed for next release! Please :). |
Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly:
|
I stumbled on it today as well. I think I vaguely understand why loss of The real project to provide Native case pulls nixpkgs/pkgs/development/libraries/glibc/default.nix Lines 69 to 76 in b3da007
A few notes:
Cross case goes a great length to break this mechanism. A few things I noticed:
I 'll try to tackle a few of these problems. |
Oh, it's even trickier:
Here we see that on a system with |
Removing |
This is most likely resolved now by PR #209870 or related changes. Or at least it needs more concrete reformulation of what's wrong, based on the changed situation. |
Ah, it still doesn't find the library, at least by the reproducer described in #213453 (so let's keep that one open) |
The complete fix is in #238154 |
Issue description
I'm not sure what the intended behavior actually is, but there is an issue with
libgcc_s.so
when cross-compiling, or perhaps the native case is actually incorrect.I came across this problem when debugging why
tmon
crashes with the error:libgcc_s.so.1 must be installed for pthread_cancel to work
when exiting, but only when it is cross-compiled. I noticed that, for native builds only, glibc copies libgcc_s.so from bootstrap gcc. Thislibgcc_s.so
from the bootstrap tools is present in the glibc used to build all other derivations, which does not seem right to me (it doesn't seem like normal derivations should have access to any libraries/binaries from the the bootstrap tools).pthreads needs
libgcc_s.so
, and it is able to find it when built natively becauselibgcc_s.so
is part of glibc, which is on the RPATH. When cross-compiling, glibc does not havelibgcc_s.so
, and the gcc libs are not on the RPATH, so pthreads cannot findlibgcc_s.so
.I can see that there are a number of cases where people have worked around this problem in nixpkgs, by manually linking to
libgcc_s
. This solves the problem for tmon, but I still think there is a bug because of the different behavior between native and cross builds.cc @vcunat
The text was updated successfully, but these errors were encountered: