-
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
Unkown warning option '-Wunused-but-set-parameter' when using clang #3622
Comments
Upon digging some more, this in fact does not seem to be related to Bazel's version. I discovered what is triggering these warnings. It seems that these warnings appear if the Also, while changing the |
Thanks @RenatoUtsch . As you said, it is not working by changing the $ sw_vers $ gcc --version $ clang -v $ bazel version |
I don't think we do any autoconf with cc. We just check operating system and set flags. |
Thanks @gunan . For the detail of the error on TF, I post here just in case you need it:
|
For the error on TF, refer to tensorflow/tensorflow#12123 and it works now, thanks. |
/cc @mhlopko We do auto config in Bazel itself. |
cc_autoconf sets these two offending flags conditionally depending on if
the compiler supports them. My guess is that it is doing it wrongly on
linux, but I couldn't figure out why. I'll update to 0.5.4 later and see if
this still persists.
…On Mon, Aug 28, 2017, 06:05 Damien Martin-Guillerez < ***@***.***> wrote:
/cc @mhlopko <https://github.com/mhlopko>
We do auto config in Bazel itself.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3622 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAzC7as27qjg0c9yLkiWCCo6o_aov5G3ks5scoLVgaJpZM4PC6Y_>
.
|
We do have an ability to specify/detect which compiler should be used by bazel. It all happens in This is where we check for flags in question: So it's running something like:
and searching for
@RenatoUtsch do I understand correctly that this was working correctly with older bazel? Or with the upgrade you also changed the value of @luchensk |
@mhlopko got it, thanks:), let's wait for the result from @RenatoUtsch with update to 0.5.4. |
This is also breaks rules_protobuf with bazel
Issue is resolved on
|
I updated to 0.5.4 and the issue is resolved. This was an issue on 0.5.3 only. I'll close the issue as it was resolved already. |
Hi @pcj, can you also verify it works with 0.5.4 please? |
He edited his last comment to say that it was resolved with 0.5.4. |
Oh I haven't noticed. Thanks. So this really is resolved. Thanks everybody! |
All my C++ projects started throwing the following two warning lines after I updated Bazel to the latest version:
These warnings are extremely irritating, because they appear for all source files and clutter the terminal. Even more, as I use
-Werror
, these warnings break my build.This happens with every C++ library/binary I try to build. For example, upon inspecting the build commands of one of these libraries with the
-s
option, you can see that Bazel adds these two warning options when it shouldn't:Just to be clear, I am not adding these two flags to the command line.
I'm using clang in ArchLinux, with bazel release 0.5.3.- (@non-git). I installed Bazel using pacman, so I don't know why it shows (@non-git).
It seems some people on Tensorflow are also having the same problem:
tensorflow/tensorflow#12123
The text was updated successfully, but these errors were encountered: