Skip to content
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

keep compatible for glibc 2.12 when build on ubuntu 22.04 #823

Closed
gzm55 opened this issue Mar 21, 2023 · 0 comments · Fixed by #825
Closed

keep compatible for glibc 2.12 when build on ubuntu 22.04 #823

gzm55 opened this issue Mar 21, 2023 · 0 comments · Fixed by #825

Comments

@gzm55
Copy link
Contributor

gzm55 commented Mar 21, 2023

In issue #812 , the old method for keeping runtime compatibility of glibc 2.12 doesn't work when building against the modern glibc (>=2.34). #812 rollback to another combination: runtime glibc >= 2.17, build on ubuntu 20.04.

I think it could be possible to move to a better one: runtime glibc >= 2.12 and build on ubuntu 22.04 (glibc = 2.35).

PS: The output native image requires pthread_setname_np api, which first appeared in glibc 2.12, so this the least version for now.

gnodet pushed a commit that referenced this issue Mar 23, 2023
…823)

The modern glibc from 2.34 had two breaking changes: move all api in lib{pthread,dl,rt}.so into libc.so, new static start up code breaking the runtime compatibility for old glibc (<2.34). See https://developers.redhat.com/articles/2021/12/17/why-glibc-234-removed-libpthread for more info.

This commit has 3 changes to overcome these changes:
- override gcc path to redefine glibc symbols on the fly in the generated .o by graalvm when linking
- provide a dynamic startup code to support both old and modern runtime glibc
- add needed dynamic libraries: lib{pthread,rt,dl}.so.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant