area/buildbughelp wantedno stalebot
Repository metrics
- Stars
- (27,997 stars)
- PR merge metrics
- (Avg merge 8d) (378 merged PRs in 30d)
Description
Title: Build fails with GCC 11
Description:
Building envoy with GCC 11 fails with the following error. I am testing on Ubuntu 21.10.
user1@user1-MS-7B46:~/my_stuff/envoy$ bazel build -c opt envoy
INFO: Analyzed target //:envoy (753 packages loaded, 42550 targets configured).
INFO: Found 1 target...
ERROR: /home/user1/.cache/bazel/_bazel_user1/000cfbe7b945d70ffe5141196905c97b/external/boringssl/BUILD:162:11: Compiling src/crypto/curve25519/curve25519.c failed: (Exit 1): gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 41 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
external/boringssl/src/crypto/curve25519/curve25519.c:503:57: error: argument 2 of type 'const uint8_t[32]' {aka 'const unsigned char[32]'} with mismatched bound [-Werror=array-parameter=]
503 | int x25519_ge_frombytes_vartime(ge_p3 *h, const uint8_t s[32]) {
| ~~~~~~~~~~~~~~^~~~~
In file included from external/boringssl/src/crypto/curve25519/curve25519.c:33:
external/boringssl/src/crypto/curve25519/internal.h:109:58: note: previously declared as 'const uint8_t *' {aka 'const unsigned char *'}
109 | int x25519_ge_frombytes_vartime(ge_p3 *h, const uint8_t *s);
| ~~~~~~~~~~~~~~~^
external/boringssl/src/crypto/curve25519/curve25519.c:823:57: error: argument 2 of type 'const uint8_t *' {aka 'const unsigned char *'} declared as a pointer [-Werror=array-parameter=]
823 | void x25519_ge_scalarmult_base(ge_p3 *h, const uint8_t *a) {
| ~~~~~~~~~~~~~~~^
In file included from external/boringssl/src/crypto/curve25519/curve25519.c:33:
external/boringssl/src/crypto/curve25519/internal.h:117:56: note: previously declared as an array 'const uint8_t[32]' {aka 'const unsigned char[32]'}
117 | void x25519_ge_scalarmult_base(ge_p3 *h, const uint8_t a[32]);
| ~~~~~~~~~~~~~~^~~~~
cc1: all warnings being treated as errors
Target //source/exe:envoy-static failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 12.226s, Critical Path: 5.53s
INFO: 194 processes: 14 internal, 180 linux-sandbox.
FAILED: Build did NOT complete successfully
user1@user1-MS-7B46:~/my_stuff/envoy$
This appears to be a known issue in BoringSSL here and was fixed here, so bumping the BoringSSL version is likely to fix it.
Repro steps:
- Use Ubuntu 21.10
- Build envoy as per the instructions here