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

linker warnings on macOS XCode 14: ld: warning: -undefined dynamic_lookup may not work with chained fixups #149

Closed
garymm opened this issue Sep 27, 2022 · 2 comments

Comments

@garymm
Copy link

garymm commented Sep 27, 2022

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
Copy link

FYI.. https://issues.guix.gnu.org/issue/57849

Looks like using -Wl,-w will help.

@garymm
Copy link
Author

garymm commented Oct 6, 2022

I think the issue is in the built-in rules so I moved this to the main bazel repo: bazelbuild/bazel#16413

@garymm garymm closed this as completed Oct 6, 2022
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

No branches or pull requests

2 participants