Skip to content

gh-127604: ensure -ldl is passed only once to the linker #133071

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

Merged
merged 3 commits into from
Apr 28, 2025

Conversation

picnixz
Copy link
Member

@picnixz picnixz commented Apr 28, 2025

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

In the current main branch, make shows me many lines starting with gcc -ldl -ldl -ldl -ldl -ldl -ldl. Ooops :-)

With this change, I get gcc -ldl which seems better.

@picnixz picnixz merged commit af3f6fc into python:main Apr 28, 2025
45 checks passed
@picnixz picnixz deleted the fix/warnings/ldl-linker-127604 branch April 28, 2025 09:55
@freakboy3742
Copy link
Contributor

This looks like it's addressed the 6x -ldl issue for linux, but the macOS and iOS buildbots are still showing duplicates - I think these are coming out of the handling of dlopen() in libFFI handling.

@picnixz
Copy link
Member Author

picnixz commented Apr 28, 2025

Ah... Why is life so hard. I'm no more on my dev session and I'll be busy this afternoon. Is it possible for someone to fix this as well? An alternate fix is to not pass -ldl for dlopen() if $ac_cv_require_ldl is yes as it's already in LDFLAGS.

I'm very sorry that I failed to fix the libffi part :(

@freakboy3742
Copy link
Contributor

@picnixz #133081 is an attempt at a cleanup for Apple platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants