linker warnings on macOS XCode 14: `ld: warning: -undefined dynamic_lookup may not work with chained fixups`
garymm opened this issue · 2 comments
garymm commented
Description of the problem / feature request:
cc_binary
built on MacOS with XCode 14 results in warnings link the following being printed:
ld: warning: -undefined dynamic_lookup may not work with chained fixups
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
git clone https://github.com/bazelbuild/examples
cd examples/cpp-tutorial/stage3
bazel build //...
Output:
➜ bazel build //...
Starting local Bazel server and connecting to it...
INFO: Analyzed 3 targets (38 packages loaded, 172 targets configured).
INFO: Found 3 targets...
INFO: From Linking main/libhello-greet.so:
ld: warning: -undefined dynamic_lookup may not work with chained fixups
INFO: From Linking lib/libhello-time.so:
ld: warning: -undefined dynamic_lookup may not work with chained fixups
INFO: From Linking main/hello-world:
ld: warning: -undefined dynamic_lookup may not work with chained fixups
What operating system are you running Bazel on?
MacOS 12.6
What's the output of bazel info release
?
release 5.3.1
What version of rules_cc do you use? Can you paste the workspace rule used to fetch rules_cc? What other relevant dependencies does your project have?
built in, but also tried 0.0.4
What Bazel options do you use to trigger the issue? What C++ toolchain do you use?
Didn't specify any bazel options or configure any custom toolchain.
Have you found anything relevant by searching the web?
python/cpython#97524
ruby/ruby#6193
https://issues.guix.gnu.org/issue/57849
CsBigDataHub commented
FYI.. https://issues.guix.gnu.org/issue/57849
Looks like using -Wl,-w
will help.
garymm commented
I think the issue is in the built-in rules so I moved this to the main bazel repo: bazelbuild/bazel#16413