-
Notifications
You must be signed in to change notification settings - Fork 54
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
-undefined dynamic_lookup
is missing when using rules_apple
and --incompatible_enable_cc_toolchain_resolution
#57
Comments
I put up a PR (#58) that fixes this issue by explicitly adding Let me know if you have any questions or concerns. Thanks so much for providing this great project! |
Thanks for the great bug report! This seems reasonable to me. Good to merge, @rwgk? |
Yes, looks good to me, please go ahead. (Although I have to admit I'm confused about where Apple is going with |
@kersson thank you so much for this fix, running into the same issue. When can we expect a release with this fix? |
My initial intention was to have a 1:1 mapping from pybind11_bazel releases to pybind11 releases and P.S. Note that pybind11_bazel releases were inaugurated a couple of months ago entirely for the sake of BCR. Unless you use Bzlmod, there's no strong reason to wait for a release as such. |
We don't have a timeline. The release schedule has been and still is rather ad hoc.
TBH I don't feel I have enough context, but a direct coupling via an artifact as arbitrary as a version number does sound troublesome in general. What comes to mind: maybe a mechanism like requirements.txt is needed? |
My experience with |
I don't think so: I was just tossing out the first thing that come to mind, as a start.
That sounds like a good direction. |
As of commit c65db0a, we support @shuyangsun, please let me know whether you do indeed require a release ( |
As foretold by the prophecy, Bazel 7 broke pybind11_bazel on macOS, so I'm going to cut the |
We have a repo in which we use
rules_apple
and have recently adopted--incompatible_enable_cc_toolchain_resolution
, which is set to become the default in Bazel 7.0.0 (bazelbuild/bazel#7260).With this set of constraints, the
-undefined dynamic_lookup
is no longer included when linking thepybind_extension
, causing undefined symbols linker errors.I'm assuming this is due to the following:
In other words, bazel no longer includes
-undefined dynamic_lookup
by default when using the Apple toolchain, which was moved torules_apple
.A bit more context:
ld: warning: -undefined dynamic_lookup may not work with chained fixups
bazelbuild/bazel#16413 (comment)Here's how to repro this:
WORKSPACE
BUILD
foo.cc
Run this command:
The text was updated successfully, but these errors were encountered: