-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Bazel 0.15.0 breaks C++ linking on MacOS #5468
Comments
It looks like the implementation of
Note that the stderr reports the flag as |
cc @laurentlb (RM) |
I've hit the same issue,
|
Can confirm, 0.15.0 working with |
@laurentlb Can/Should we have a patch release for this? I'll work on the fix. |
I am on |
Same thing happened to me, brew didn't have the versions I wanted to try so I removed it and installed from source like described here. Downgrading to bazel 0.14.1 fixed it |
@laurentlb FYI: this is now fixed. |
@mhlopko In which version of Bazel is it fixed? |
@c-parsons is the release manager for 0.16.0. I suggest you ping the usual release issue. |
@hectim @mhlopko I don't think this is fixed, the above PR merely changed which linker flag is incorrectly allowed:
Note that the |
Any thoughts? Given that downgrading brew is not a fun task this is
becoming somewhat of a sore thumb
…On Thu, 5 Jul 2018 at 22:11 jmillikin-stripe ***@***.***> wrote:
@hectim <https://github.com/hectim> @mhlopko <https://github.com/mhlopko>
I don't think this is fixed, the above PR merely changed which linker flag
is incorrectly allowed:
ERROR: /private/var/tmp/_bazel_jmillikin/272411befdf8076e3a18b870d1a93c0f/external/com_google_protobuf/BUILD.bazel:399:1: Linking of rule ***@***.***_google_protobuf//:js_embed' failed (Exit 1)
ld: unknown option: -z
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Note that the cc -Wl,-z,relro,-z,now generates an error about -z only,
not mentioning the rest of the flag string.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#5468 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUIFz_vBaY2w_RJNevBmAVO-W0J9aqmks5uDmTFgaJpZM4U4W3E>
.
|
Clang reports missing -Wl,-z,relro as "ld: unknwon option: -z"). This cl fixes the autodetection to expect the short variant. Fixes #5468. RELNOTES: NONE. PiperOrigin-RevId: 203449206
Ouch. Can you pls verify it's fixed now? |
Bazel at head (with your second commit) works on my machine. |
Flags passed through clang to linker get -Wl, stripped in the error message (e.g. -Wl,-no-as-needed will be reported as "ld: unknwon option: -no-as-needed"). This cl fixes the autodetection to expect the stripped variant. Fixes #5468. RELNOTES: None. PiperOrigin-RevId: 203341563
Clang reports missing -Wl,-z,relro as "ld: unknwon option: -z"). This cl fixes the autodetection to expect the short variant. Fixes #5468. RELNOTES: NONE. PiperOrigin-RevId: 203449206
Now we get: ld: unknown option: -no-as-needed I upgraded to bazel-0.15; it now might be: bazelbuild/bazel#5468 Note: with bazel-0.14, I get: ``` gcc: error: unrecognized command line option '-Wthread-safety'; did you mean '-fthread-jumps'? gcc: error: unrecognized command line option '-Wself-assign'; did you mean '-Wcast-align'? ``` Next step: building the bazel-0.16.0 branch (with bazel-0.15) and then will test if it fixes this issue. Well, it stops that issue, but we're still back to `-pie`.
Thanks so much! |
any idea when 0.16.0 will be released? We have users constantly hitting this so maybe a patch release would help |
+1 we’d love a patch release. 0.16 is great but there is not guarantee I won’t also have as yet undiscovered issues. Seems this is exactly what patch releases are for. |
cc @laurentlb |
+1 to patch release |
OK, I can prepare a patch release. |
@laurentlb Is there a ticket to track the patch release? This is still causing problems for us. |
See #5591 |
Flags passed through clang to linker get -Wl, stripped in the error message (e.g. -Wl,-no-as-needed will be reported as "ld: unknwon option: -no-as-needed"). This cl fixes the autodetection to expect the stripped variant. Fixes #5468. RELNOTES: None. PiperOrigin-RevId: 203341563
Clang reports missing -Wl,-z,relro as "ld: unknwon option: -z"). This cl fixes the autodetection to expect the short variant. Fixes #5468. RELNOTES: NONE. PiperOrigin-RevId: 203449206
Flags passed through clang to linker get -Wl, stripped in the error message (e.g. -Wl,-no-as-needed will be reported as "ld: unknwon option: -no-as-needed"). This cl fixes the autodetection to expect the stripped variant. Fixes #5468. RELNOTES: None. PiperOrigin-RevId: 203341563
Clang reports missing -Wl,-z,relro as "ld: unknwon option: -z"). This cl fixes the autodetection to expect the short variant. Fixes #5468. RELNOTES: NONE. PiperOrigin-RevId: 203449206
Flags passed through clang to linker get -Wl, stripped in the error message (e.g. -Wl,-no-as-needed will be reported as "ld: unknwon option: -no-as-needed"). This cl fixes the autodetection to expect the stripped variant. Fixes bazelbuild#5468. RELNOTES: None. PiperOrigin-RevId: 203341563
Clang reports missing -Wl,-z,relro as "ld: unknwon option: -z"). This cl fixes the autodetection to expect the short variant. Fixes bazelbuild#5468. RELNOTES: NONE. PiperOrigin-RevId: 203449206
Flags passed through clang to linker get -Wl, stripped in the error message (e.g. -Wl,-no-as-needed will be reported as "ld: unknwon option: -no-as-needed"). This cl fixes the autodetection to expect the stripped variant. Fixes bazelbuild#5468. RELNOTES: None. PiperOrigin-RevId: 203341563
Clang reports missing -Wl,-z,relro as "ld: unknwon option: -z"). This cl fixes the autodetection to expect the short variant. Fixes bazelbuild#5468. RELNOTES: NONE. PiperOrigin-RevId: 203449206
Flags passed through clang to linker get -Wl, stripped in the error message (e.g. -Wl,-no-as-needed will be reported as "ld: unknwon option: -no-as-needed"). This cl fixes the autodetection to expect the stripped variant. Fixes #5468. RELNOTES: None. PiperOrigin-RevId: 203341563
Clang reports missing -Wl,-z,relro as "ld: unknwon option: -z"). This cl fixes the autodetection to expect the short variant. Fixes #5468. RELNOTES: NONE. PiperOrigin-RevId: 203449206
Flags passed through clang to linker get -Wl, stripped in the error message (e.g. -Wl,-no-as-needed will be reported as "ld: unknwon option: -no-as-needed"). This cl fixes the autodetection to expect the stripped variant. Fixes bazelbuild#5468. RELNOTES: None. PiperOrigin-RevId: 203341563
Clang reports missing -Wl,-z,relro as "ld: unknwon option: -z"). This cl fixes the autodetection to expect the short variant. Fixes bazelbuild#5468. RELNOTES: NONE. PiperOrigin-RevId: 203449206
Flags passed through clang to linker get -Wl, stripped in the error message (e.g. -Wl,-no-as-needed will be reported as "ld: unknwon option: -no-as-needed"). This cl fixes the autodetection to expect the stripped variant. Fixes #5468. RELNOTES: None. PiperOrigin-RevId: 203341563
Clang reports missing -Wl,-z,relro as "ld: unknwon option: -z"). This cl fixes the autodetection to expect the short variant. Fixes #5468. RELNOTES: NONE. PiperOrigin-RevId: 203449206
Description of the problem / feature request:
After updating to Bazel 0.15.0, C++ binaries are being linked with the flag
-Wl,-no-as-needed
which does not exist in the MacOS linker.What operating system are you running Bazel on?
MacOS
What's the output of
bazel info release
?release 0.15.0
The text was updated successfully, but these errors were encountered: