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 #3315

Closed
garymm opened this issue Oct 7, 2022 · 1 comment

Comments

@garymm
Copy link
Contributor

garymm commented Oct 7, 2022

Note I reported a similar issue for cc_library here.

If we apply the same fix, then it would just be to remove this line:
https://github.com/bazelbuild/rules_go/blob/d517cd9bec43f0541b421315fe633cdd0f204270/go/tools/builders/cgo2.go#L215

What version of rules_go are you using?

v0.34.0

What version of gazelle are you using?

v0.26.0

What version of Bazel are you using?

5.3.1

Does this issue reproduce with the latest releases of all the above?

yes

What operating system and processor architecture are you using?

macOS 12.6, arm64

Any other potentially useful information about your toolchain?

XCode Command Line tools v14

What did you do?

Build anything that depends on CGo

What did you expect to see?

No warnings

What did you see instead?

NFO: From GoLink ...:
ld: warning: -undefined dynamic_lookup may not work with chained fixups
@garymm
Copy link
Contributor Author

garymm commented Feb 24, 2023

OK I looked at this more closely and it looks like this code path is only ever done as a fallback, so it's not actually resulting in warnings in the normal case. The warnings I was seeing my build are due to the cc_library stuff that's built in to bazel and is fixed by bazelbuild/bazel#16414.

Either the fallback should be in place for MacOS and Linux, or for neither. I'm going to close this.

@garymm garymm closed this as completed Feb 24, 2023
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 a pull request may close this issue.

1 participant