大家好,欢迎来到IT知识分享网。
下午在编译 grpc
时报错如下:
utilities/blob_db/blob_log_reader.cc:74:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
next_byte_ += kb_size;
~~~~~~~~~~~^~~~~~~~~~
utilities/blob_db/blob_log_reader.cc:76:5: note: here
case kReadHeaderKey:
^~~~
utilities/blob_db/blob_log_reader.cc:94:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
next_byte_ += record->GetBlobSize();
~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
utilities/blob_db/blob_log_reader.cc:96:5: note: here
case kReadHeaderKeyBlob:
^~~~
cc1plus: all warnings being treated as errors
Makefile:1813: recipe for target 'utilities/blob_db/blob_log_reader.o' failed
make: *** [utilities/blob_db/blob_log_reader.o] Error 1
make: *** Waiting for unfinished jobs....
CMake Warning at CMakeLists.txt:122 (message):
gRPC_INSTALL will be forced to FALSE because gRPC_ZLIB_PROVIDER is "module"
CMake Error at third_party/boringssl/CMakeLists.txt:30 (message):
Could not find Go
-- Configuring incomplete, errors occurred!
See also "/home/zhang/paxosstore/certain/third/grpc/CMakeFiles/CMakeOutput.log".
See also "/home/zhang/paxosstore/certain/third/grpc/CMakeFiles/CMakeError.log".
[MAKE] Generating cache.mk
[AR] Creating /home/zhang/paxosstore/certain/third/grpc/libs/opt/libgpr.a
[C] Compiling third_party/boringssl/crypto/bio/fd.c
[C] Compiling third_party/boringssl/crypto/bio/file.c
[C] Compiling third_party/boringssl/crypto/bn/add.c
[C] Compiling third_party/boringssl/crypto/bn/asm/x86_64-gcc.c
third_party/boringssl/crypto/bio/file.c: In function ‘file_ctrl’:
third_party/boringssl/crypto/bio/file.c:186:11: error: this statement may fall through [-Werror=implicit-fallthrough=]
num = 0;
~~~~^~~
third_party/boringssl/crypto/bio/file.c:187:5: note: here
case BIO_C_FILE_SEEK:
^~~~
third_party/boringssl/crypto/bio/fd.c: In function ‘fd_ctrl’:
third_party/boringssl/crypto/bio/fd.c:192:11: error: this statement may fall through [-Werror=implicit-fallthrough=]
num = 0;
~~~~^~~
third_party/boringssl/crypto/bio/fd.c:193:5: note: here
case BIO_C_FILE_SEEK:
解决方法如下:
make CFLAGS='-Wno-implicit-fallthrough'
参考:[NEW] gcc 7 and -Werror=implicit-fallthrough · Issue #13854 · grpc/grpc
免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://yundeesoft.com/22296.html