-
Notifications
You must be signed in to change notification settings - Fork 84
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
Add CI setup that builds and tests Nighthawk using gcc #382
Comments
That looks like the Envoy dependency is failing to build. I wonder if this is specific to gcc or a specific gcc version? |
Thanks Otto. |
I'm not sure; maybe we should ask around over at Envoy's Slack channel. If gcc support was intentionally dropped then there's not much we can do about it. If it's not, this may resolve when we update the Envoy dependency at some point (or we go in and fix it if we want to) |
@htuch ^^ do you have any thoughts on this? |
gcc support is best effort, @dmitri-d do you know if there are known regressions here? |
It's a regression, noticed it last week. I wonder if I should just add |
Thanks for the updates here. If Envoy no longer supports gcc, neither should we. @qqustc please attempt to switch to clang and once you figure out the correct procedure (settings), we should document that in the Nighthawk repository. Let's keep this issue to track the missing documentation. |
We link to Envoy's documentation from our own docs for the first steps in the build procedure, including supported compiler versions. That has:
So on the tin it says it is known to support GCC7++. Not sure how to take that :-) This Envoy doc fragment leaves less wiggle room however:
I'm not sure what the future looks like, but maybe if we do turn out to want to support GCC, maybe we should add |
It's a WIP: envoyproxy/envoy#10236 |
@dmitri-d awesome. @mum4k should we double down and add a CI check ourselves too when after envoyproxy/envoy#10236 lands to make sure we don't accidentally break GCC builds in our own code base? |
@oschaaf I think that is a very good idea. On top of that we should verify if we can build with stock settings or do need any modification of .bazelrc, etc. If we do we should track that separately and add documentation to ease the entry for new developers. Unless we have that somewhere already? @qqustc can you verify if you do need any custom configuration to build Nighthawk after envoyproxy/envoy#10236 lands? |
Yes, I will verify that after envoyproxy/envoy#10236 lands and update in this issue. |
Some background in the causes of the above error: The use of MOCK_METHOD is causing the hiding of the base class methods pause, paused and start. Essentially the redeclaration of method using virtual in a base class (and here we have overloading with two different signature)
will: "Adding virtual here creates a new virtual function that could be overridden in the derived classes of Derived itself. It doesn’t check that f in Derived overrides f in Base. The code compiles without a problem and lets the bug slip in." https://www.fluentcpp.com/2020/02/21/virtual-final-and-override-in-cpp/ The safest option is to use the following:
This indicates to the compiler to reference the base class methods rather than redefine. This pattern is explained
The patch needed, that is tested and works with both gcc and clang is:
|
- First iteration on testing gcc support in CI. This restricts the task to just building Nighthawk, and not testing it yet, as that needs a change in Envoy to go in first. - Small cleanup, and a bugfix for those who use the script to run locally, which would be detected as running in CircleCI. Related issue: #382 (needs a follow up to close, left in as a code-level todo). Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Also, run gcc-built tests in CI because now we can. Fixes envoyproxy#382 Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Also, run gcc-built tests in CI because now we can. Fixes envoyproxy#382 ----- Prerequisite: envoyproxy/envoy#12057 Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
- First iteration on testing gcc support in CI. This restricts the task to just building Nighthawk, and not testing it yet, as that needs a change in Envoy to go in first. - Small cleanup, and a bugfix for those who use the script to run locally, which would be detected as running in CircleCI. Related issue: envoyproxy#382 (needs a follow up to close, left in as a code-level todo). Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Update Envoy + run gcc-built tests in CI because now we can. Fixes #382 Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
error msg:
The text was updated successfully, but these errors were encountered: