grpc: GRPC C++ Build Fails for gcc 8.2
What version of gRPC and what language are you using?
1.15.0 and C++
What operating system (Linux, Windows, …) and version?
Linux - CentOS 7
What runtime / compiler are you using (e.g. python version or version of gcc)
gcc 8.2
What did you do?
If possible, provide a recipe for reproducing the error. Try being specific and include code snippets if helpful.
# With gcc 8.2 in environment
$ gcc --version
gcc (GCC) 8.2.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ git clone --recursive https://github.com/grpc/grpc
$ cd grpc && git checkout v1.15.0 -b v1.15.0
$ mkdir build && cd build
$ cmake ..
$ make -j4
What did you expect to see?
Build Successfully
What did you see instead?
/home/ksharma/Downloads/grpc/third_party/boringssl/crypto/x509/x509_test.cc: In member function ‘virtual void X509Test_ZeroLengthsWithX509PARAM_Test::TestBody()’:
/home/ksharma/Downloads/grpc/third_party/boringssl/crypto/x509/x509_test.cc:712:10: error: declaration of ‘struct X509Test_ZeroLengthsWithX509PARAM_Test::TestBody()::Test’ shadows a previous local [-Werror=shadow]
struct Test {
^~~~
In file included from /home/ksharma/Downloads/grpc/third_party/boringssl/crypto/x509/x509_test.cc:19:
/home/ksharma/Downloads/grpc/third_party/boringssl/third_party/googletest/include/gtest/gtest.h:375:23: note: shadowed declaration is here
class GTEST_API_ Test {
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Anything else we should know about your project / environment?
I tried building it with gcc 7.3
and it built successfully. So, I some default warnings/error compiler flags introduced in gcc 8
fails the build.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 20 (7 by maintainers)
This is not fixed and unfortunately the crypto module ( boringssl/crypto ) doesn’t have any flag which controls building the test. It will have to be fixed by boringssl
Seems to not be fixed, on Debian 10.
Here is a Quick fix: just checkout the boringssl’s master branch, and done.
I’m still getting it, yes
How exactly can I disable compiling the tests? It seems like
gRPC_BUILD_TESTS
already defaults to off @nicolasnobleWe’re trying to stick on the same released versions of boringssl as the chromium project.