-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Envoy failed on Bazel CI with "unused variable 'factory_name'" #13079
Comments
bazel-out/k8-opt/bin/include/envoy/registry/_virtual_includes/registry/envoy/registry/registry.h:348:44: error: unused variable 'factory_name' [-Werror=unused-variable] |
@ratulb Did you encounter the same build failure? |
I created fix in #13125 |
I had to put the following in my .bazelrc to get around this.
build:linux --cxxopt=-Wno-error=unused-variable
…________________________________
From: guoruijing <notifications@github.com>
Sent: Wednesday, September 16, 2020 2:15 PM
To: envoyproxy/envoy <envoy@noreply.github.com>
Cc: Ratul <ratul75@hotmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [envoyproxy/envoy] Envoy failed on Bazel CI with "unused variable 'factory_name'" (#13079)
I created fix in #13125<#13125>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#13079 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAM3HO5X5DT5ZOHOJ4PPMGTSGB3JRANCNFSM4RLQCNMA>.
|
@guoruijing @ratulb @meteorcloudy which compiler version is this? Has this just switched to on-by-default? I think we should fix this structurally in Envoy so we don't have this come up again, probably by adding to |
@meteorcloudy Can you reproduce if you use gcc version 9? |
I can reproduce the issue with gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 |
I believe we also use gcc 7.5 on Bazel CI. Somehow this unused variable is treated as an error on Bazel CI, but probably as a warning on circle CI? |
I think GCC 9 is used in Envoy's CI https://github.com/envoyproxy/envoy-build-tools/blob/e7ea4e81bbd5028abb9d3a2f2c0afe063d9b62c0/build_container/build_container_ubuntu.sh#L12, is it possible that this is why? |
Sorry, I have no idea. |
I pulled down latest sources - still facing the same build failure. I am using:
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
I would upgrade gcc and see how it goes later today.
…________________________________
From: asraa <notifications@github.com>
Sent: Thursday, September 17, 2020 7:41 PM
To: envoyproxy/envoy <envoy@noreply.github.com>
Cc: Ratul <ratul75@hotmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [envoyproxy/envoy] Envoy failed on Bazel CI with "unused variable 'factory_name'" (#13079)
I think GCC 9 is used in Envoy's CI https://github.com/envoyproxy/envoy-build-tools/blob/e7ea4e81bbd5028abb9d3a2f2c0afe063d9b62c0/build_container/build_container_ubuntu.sh#L12, is it possible that this is why?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#13079 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAM3HO2WNBB3JWN4IK765ELSGIKH7ANCNFSM4RLQCNMA>.
|
there are lots of locations using unused variables. I can change like followings or we just upgrade compiler version?
|
We support and use GCC 9 in CI. But these docs https://github.com/envoyproxy/envoy/blob/4706ee01abe191eef73c64d86c1835baf566323c/bazel/README.md#supported-say compiler-versions currently has GCC 7+ as supported. There was some refactor after C++17 was enabled to use structured binding, which should be find since structured bindings appear in GCC 7. However, I did find a GCC bug about this: https://gcc.gnu.org/bugzilla/show_bug.cgi?format=multiple&id=81767 I think I would suggest upgrading compiler version. |
I don't think we can easily upgrade the gcc version on Bazel CI, other projects may still depend on the current version. |
FYI, according to https://buildkite.com/bazel/envoy/builds?branch=master&page=7, |
IMO we should either downgrade Envoy GCC to match Bazel CI, or just do this:
I think ^ is probably simpler? |
Got latest clang installed on ubuntu 20.04 LTS - latest sources built smoothly.
root@ubuntu-box:~$ clang-11 --version
Ubuntu clang version 11.0.0-++20200916113328+8f2c29681ce-1~exp1~20200916094014.99
Target: x86_64-pc-linux-gnu
Thread model: posix
FYI.
…________________________________
From: Matt Klein <notifications@github.com>
Sent: Monday, September 21, 2020 7:46 PM
To: envoyproxy/envoy <envoy@noreply.github.com>
Cc: Ratul <ratul75@hotmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [envoyproxy/envoy] Envoy failed on Bazel CI with "unused variable 'factory_name'" (#13079)
IMO we should either downgrade Envoy GCC to match Bazel CI, or just do this:
For fixing envoy on Bazel CI purpose, maybe you can disable this warning in the config script (.bazelci/presubmit.yml) or in the bazelrc file?
I think ^ is probably simpler?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#13079 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAM3HOYOFY6FSBJK6NMXJ4DSG5N2TANCNFSM4RLQCNMA>.
|
Perhaps we can simply remove GCC Bazel CI jobs, we do test RBE and Coverage (via local installed clang-10), IMO they are enough to catch issues from Bazel. |
Bazel CI by design only installs tools and toolchains from packages supplied by a given distribution version and we do not upgrade these beyond what the distribution offers in their own repositories. This is so Bazel and other projects can verify that they are compatible with e.g. Ubuntu 18.04 LTS out of the box. Thus, from Bazel CI's perspective this is working as intended: It alerted you to the fact that Envoy can no longer be built on Ubuntu 18.04 LTS out of the box. 😊 Whether this is fine or not, I can't decide - every project has their own guidelines regarding with which distributions they want to stay compatible. If you don't need to be compatible with Ubuntu 18.04 LTS, I would recommend to stop testing on that distro. Unfortunately Ubuntu 20.04 LTS is not yet available on Bazel CI, but I'll add it shortly: bazelbuild/continuous-integration#1035 |
https://buildkite.com/bazel/envoy/builds/1295#b92e2abd-a008-49b7-a929-2a5dde5a0152
The text was updated successfully, but these errors were encountered: