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

Revert "Add -Wl,-z,undefs to linux links" #98

Merged

Conversation

hofbi
Copy link
Contributor

@hofbi hofbi commented Aug 8, 2024

Reverts #90 which introduced #94 causing also issues for https://github.com/pybind/pybind11_abseil. The revert closes #94.

@@ -68,10 +68,7 @@ def pybind_extension(
linkopts = linkopts + select({
"@platforms//os:osx": ["-undefined", "dynamic_lookup"],
Label("@pybind11//:msvc_compiler"): [],
"//conditions:default": [
"-Wl,-Bsymbolic",
"-Wl,-z,undefs",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you still need "-Wl,-z,undefs"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't. I am just reverting the PR to restore the previous working state.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jiawen Kind reminder

Copy link
Collaborator

Choose a reason for hiding this comment

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

My apologies. I've been slammed with other stuff but I'll take a look at it this weekend.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry this took so long. I finally skimmed what -z undefs means (thanks @MaskRay !) - yeesh this is a rabbit hole I did not expect to go into.

For some reason, I misread your PR - -Wl,-Bsymbolic was pre-existing. Approving now.

@@ -68,10 +68,7 @@ def pybind_extension(
linkopts = linkopts + select({
"@platforms//os:osx": ["-undefined", "dynamic_lookup"],
Label("@pybind11//:msvc_compiler"): [],
"//conditions:default": [
"-Wl,-Bsymbolic",
"-Wl,-z,undefs",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry this took so long. I finally skimmed what -z undefs means (thanks @MaskRay !) - yeesh this is a rabbit hole I did not expect to go into.

For some reason, I misread your PR - -Wl,-Bsymbolic was pre-existing. Approving now.

@jiawen jiawen merged commit 0cded48 into pybind:master Aug 27, 2024
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 this pull request may close these issues.

Linker error when using ld.gold
2 participants