Commit 1b0ca6d1 authored by Yong Tang's avatar Yong Tang Committed by Shanqing Cai
Browse files

Fix build error with boringssl (#13734)



* Fix build error with boringssl

This fix tries to fix build error with boringssl on `Ubuntu 16.06`, `gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)`, and `bazel` `0.6.1`.

```sh
  /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections '-march=native' -MD -MF bazel-out/local-opt/bin/external/curl/_objs/curl/external/curl/lib/curl_multibyte.pic.d -fPIC -iquote external/curl -iquote bazel-out/local-opt/genfiles/external/curl -iquote external/zlib_archive -iquote bazel-out/local-opt/genfiles/external/zlib_archive -iquote external/bazel_tools -iquote bazel-out/local-opt/genfiles/external/bazel_tools -iquote external/boringssl -iquote bazel-out/local-opt/genfiles/external/boringssl -isystem external/curl/include -isystem bazel-out/local-opt/genfiles/external/curl/include -isystem external/zlib_archive -isystem bazel-out/local-opt/genfiles/external/zlib_archive -isystem external/bazel_tools/tools/cpp/gcc3 -isystem external/boringssl/src/include -isystem bazel-out/local-opt/genfiles/external/boringssl/src/include -Iexternal/curl/lib -D_GNU_SOURCE -DHAVE_CONFIG_H -DCURL_DISABLE_FTP -DCURL_DISABLE_NTLM -DHAVE_LIBZ -DHAVE_ZLIB_H -Wno-string-plus-int '-DCURL_MAX_WRITE_SIZE=65536' -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c external/curl/lib/curl_multibyte.c -o bazel-out/local-opt/bin/external/curl/_objs/curl/external/curl/lib/curl_multibyte.pic.o)
ERROR: /home/ubuntu/.cache/bazel/_bazel_ubuntu/ad1e09741bb4109fbc70ef8216b59ee2/external/boringssl/BUILD:128:1: C++ compilation of rule '@boringssl//:ssl' failed (Exit 1)
external/boringssl/src/ssl/t1_lib.cc: In function 'int bssl::ssl_ext_key_share_parse_clienthello(bssl::SSL_HANDSHAKE*, bool*, bssl::Array<unsigned char>*, uint8_t*, CBS*)':
external/boringssl/src/ssl/t1_lib.cc:2189:7: error: 'peer_key.cbs_st::len' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   CBS peer_key;
           ^
external/boringssl/src/ssl/t1_lib.cc:2189:7: error: 'peer_key.cbs_st::data' may be used uninitialized in this function [-Werror=maybe-uninitialized]
cc1plus: all warnings being treated as errors
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 107.966s, Critical Path: 18.12s
FAILED: Build did NOT complete successfully
```

This fix is related to PR 13638

This fix fixes 13733.

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Fix build error with clang

Change `-Wno-maybe-uninitialized` -> `-Wno-uninitialized`

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>
parent dc65f63c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment