-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Interpreter breaks due to not being able to load libpthread
#14195
Comments
The first thing I'm wondering about is why the interpreter even tries to load Maybe pkg-config for some other lib asks for |
I seem to get something similar, but with a different error message, on Slackware 15.0. But this only happens with certain programs, not all of them. Clipped for length
|
The culprit seems to be #14130 which fixed the pkg-config name for |
I think the easiest way to get back into working order is to revert the part of #14130 which defines the (correct) pkg-config name. Then for a proper fix we'll need to improve the loader to function when |
This issue went undetected because our build images (where interpreter CI runs) do not have |
In order to resolve this issue for real, we'll need to make some changes. Until now we have defined most1 of the special cases for the interpreter linking with conditional In order to cover that, we need to change the loader to have special rules for some libraries. Basically, for some lib flags it should ignore any errors when the library file cannot be found. This should be fine as long as all symbols can be found. These optional libs would be Footnotes
|
For reference, I don't think there's any easy way to clearly detect when We could try to mimic what happens in a compile time linker: It links the empty static library, and everything works because the symbols are already available through libc. |
Another approach could be to tailor the linker arguments more exactly to the libc requirements. For glibc >= 2.34 we should not add link annotations for the removed libraries. |
I have a branch for #14195 (comment): https://github.com/straight-shoota/crystal/tree/feat/loader-ignore-missing But I'm wondering if #14195 (comment) isn't a better solution in general. |
Since Crystal 1.11.0 the interpreter breaks while booting up because it cannot load
libpthread
.It works fine when
pkg-config
is unavailable.Reproduction steps (using Arch Linux, but it appears on other systems as well):
Without
pkg-config
it works.https://forum.crystal-lang.org/t/crystal-1-11-has-been-released/6284/10?u=straight-shoota
The text was updated successfully, but these errors were encountered: