when I build tensorflow with "bazel build -c opt -- tensorflow_serving/... -tensorflow_serving/example/...", encounter an error:
ERROR: /root/.cache/bazel/_bazel_root/53bfa30163750db6ab7cbcd6cc66ed01/external/boringssl/BUILD:91:1: C++ compilation of rule '@boringssl//:crypto' failed: gcc failed: error executing command /usr/local/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -B/usr/local/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object ... (remaining 47 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S: Assembler messages:
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1002: Error: no such instruction: vbroadcasti128 .Lsigma(%rip),%ymm11'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1003: Error: no such instruction:vbroadcasti128 (%rcx),%ymm3'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1004: Error: no such instruction: vbroadcasti128 16(%rcx),%ymm15'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1005: Error: no such instruction:vbroadcasti128 (%r8),%ymm7'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1011: Error: suffix or operands invalid for vpshufd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1012: Error: suffix or operands invalid forvpshufd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1014: Error: suffix or operands invalid for vpshufd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1016: Error: suffix or operands invalid forvpshufd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1020: Error: suffix or operands invalid for vpshufd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1021: Error: suffix or operands invalid forvpshufd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1023: Error: suffix or operands invalid for vpshufd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1025: Error: suffix or operands invalid forvpshufd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1029: Error: suffix or operands invalid for vpshufd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1030: Error: suffix or operands invalid forvpshufd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1032: Error: suffix or operands invalid for vpshufd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1034: Error: suffix or operands invalid forvpshufd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1038: Error: suffix or operands invalid for vpshufd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1039: Error: suffix or operands invalid forvpshufd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1040: Error: suffix or operands invalid for vpaddd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1041: Error: suffix or operands invalid forvpshufd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1043: Error: suffix or operands invalid for vpshufd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1067: Error: suffix or operands invalid forvpaddd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1072: Error: no such instruction: vbroadcasti128 (%r10),%ymm15'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1079: Error: suffix or operands invalid forvpaddd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1080: Error: suffix or operands invalid for vpxor'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1081: Error: suffix or operands invalid forvpshufb'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1082: Error: suffix or operands invalid for vpaddd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1083: Error: suffix or operands invalid forvpxor'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1084: Error: suffix or operands invalid for vpshufb'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1085: Error: suffix or operands invalid forvpaddd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1086: Error: suffix or operands invalid for vpxor'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1087: Error: suffix or operands invalid forvpslld'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1088: Error: suffix or operands invalid for vpsrld'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1089: Error: suffix or operands invalid forvpor'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1090: Error: no such instruction: vbroadcasti128 (%r11),%ymm14'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1091: Error: suffix or operands invalid forvpaddd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1092: Error: suffix or operands invalid for vpxor'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1093: Error: suffix or operands invalid forvpslld'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1094: Error: suffix or operands invalid for vpsrld'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1095: Error: suffix or operands invalid forvpor'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1096: Error: suffix or operands invalid for vpaddd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1097: Error: suffix or operands invalid forvpxor'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1098: Error: suffix or operands invalid for vpshufb'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1099: Error: suffix or operands invalid forvpaddd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1100: Error: suffix or operands invalid for vpxor'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1101: Error: suffix or operands invalid forvpshufb'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1102: Error: suffix or operands invalid for vpaddd'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1103: Error: suffix or operands invalid forvpxor'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1104: Error: suffix or operands invalid for vpslld'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1105: Error: suffix or operands invalid forvpsrld'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1106: Error: suffix or operands invalid for vpor'
external/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S:1107: Error: no such instruction:vbroadcasti128 (%r10),%ymm15'
.......
gcc version on centos 6.5:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/6.3.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure -enable-checking=release -enable-languages=c,c++ -disable-multilib
Thread model: posix
gcc version 6.3.0 (GCC)
boringssl in cache:
/root/.cache/bazel/_bazel_root/53bfa30163750db6ab7cbcd6cc66ed01/external/boringssl
bbcaa15b0647816b9a1a9b9e0d209cd6712f0105.tar.gz err_data.c linux-x86 src
BUILD LICENSE linux-x86_64 win-x86
BUILD.generated.bzl linux-aarch64 mac-x86 win-x86_64
BUILD.generated_tests.bzl linux-arm mac-x86_64 WORKSPACE
Please help me solve it , thanks.
I am the same problemïŒthe configure of gcc also same
I installed some library of the GCC 4.8.5 to solve this problem
libgompăbinutilsăbinuitls-develălibgcc
I am the same problem, my gcc version=4.8.1
do you Solve the problem?
gcc version=4.8.2 ïŒsame problemïŒhow to solveïŒ
As an experiment, you may want to try compiling without the "-c opt" flag. The instructions that are having issues are AVX2 instructions introduced by Intel around 2015. In theory the -c opt will do the right thing when selecting compiler options, but maybe it is not making the right choice.
my OS is CentOS 6.4, the same problem even with my privately build GCC version 4.9.4
Eventually, I upgrade my system GCC version to 4.9.2 and this problem solved.
BTW, upgrade System GCC version could reference this gist:
https://gist.github.com/stephenturner/e3bc5cfacc2dc67eca8b
gcc 4.8.5 I installed binutils-2.30.tar.gz solved this problem. Thks @lllfx
still have the similar problem:
ERROR: /root/.cache/bazel/_bazel_root/efb88f6336d9c4a18216fb94287b8d97/external/boringssl/BUILD:115:1: C++ compilation of rule '@boringssl//:crypto' failed (Exit 1)
external/boringssl/src/crypto/bytestring/cbb.c: In function 'cbb_buffer_add_u':
external/boringssl/src/crypto/bytestring/cbb.c:156:3: error: 'for' loop initial declarations are only allowed in C99 mode
for (size_t i = len_len - 1; i < len_len; i--) {
^
external/boringssl/src/crypto/bytestring/cbb.c:156:3: note: use option -std=c99 or -std=gnu99 to compile your code
external/boringssl/src/crypto/bytestring/cbb.c: In function 'CBB_add_asn1_uint64':
external/boringssl/src/crypto/bytestring/cbb.c:450:3: error: 'for' loop initial declarations are only allowed in C99 mode
for (size_t i = 0; i < 8; i++) {
^
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: 1.546s, Critical Path: 0.77s
INFO: 10 processes: 10 local.
FAILED: Build did NOT complete successfully
gcc -v
info is
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/ppc64le-redhat-linux/4.8.5/lto-wrapper
Target: ppc64le-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-ppc64le-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-ppc64le-redhat-linux/cloog-install --enable-gnu-indirect-function --enable-secureplt --with-long-double-128 --enable-targets=powerpcle-linux --disable-multilib --with-cpu-64=power8 --with-tune-64=power8 --build=ppc64le-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC)
This error drives me crazy......
Please, help :(
Most helpful comment
I installed some library of the GCC 4.8.5 to solve this problem
libgompăbinutilsăbinuitls-develălibgcc