You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to build the latest code from the v1.0.x as part of TensorFlow, I got the following errors:
ERROR: /var/lib/jenkins/workspace/tensorflow-cl-cpu/bazel-ci_build-cache/.cache/bazel/_bazel_jenkins/eab0d61a99b6696edb3d2aff87b585e8/external/grpc/BUILD:1637:1: C++ compilation of rule '@grpc//:grpc++_unsecure' failed: gcc failed: error executing command
(cd /var/lib/jenkins/workspace/tensorflow-cl-cpu/bazel-ci_build-cache/.cache/bazel/_bazel_jenkins/eab0d61a99b6696edb3d2aff87b585e8/execroot/workspace && \
exec env - \
LD_LIBRARY_PATH='' \
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
/usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -MD -MF bazel-out/local-fastbuild/bin/external/grpc/_objs/grpc++_unsecure/external/grpc/src/core/lib/iomgr/closure.pic.d -fPIC -iquote external/grpc -iquote bazel-out/local-fastbuild/genfiles/external/grpc -iquote external/protobuf -iquote bazel-out/local-fastbuild/genfiles/external/protobuf -iquote external/bazel_tools -iquote bazel-out/local-fastbuild/genfiles/external/bazel_tools -iquote external/nanopb_git -iquote bazel-out/local-fastbuild/genfiles/external/nanopb_git -isystem external/grpc/include -isystem bazel-out/local-fastbuild/genfiles/external/grpc/include -isystem external/grpc -isystem bazel-out/local-fastbuild/genfiles/external/grpc -isystem external/protobuf/src -isystem bazel-out/local-fastbuild/genfiles/external/protobuf/src -isystem external/bazel_tools/tools/cpp/gcc3 -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c external/grpc/src/core/lib/iomgr/closure.c -o bazel-out/local-fastbuild/bin/external/grpc/_objs/grpc++_unsecure/external/grpc/src/core/lib/iomgr/closure.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
external/grpc/src/core/lib/iomgr/closure.c: In function 'grpc_closure_list_fail_all':
external/grpc/src/core/lib/iomgr/closure.c:62:3: error: 'for' loop initial declarations are only allowed in C99 mode
for (grpc_closure *c = list->head; c != NULL; c = c->next_data.next) {
^
external/grpc/src/core/lib/iomgr/closure.c:62:3: note: use option -std=c99 or -std=gnu99 to compile your code
For some reason a .c file is being compiled as part of building the (C++) grpc++_unsecure library. That library doesn't have a -std=gnu99 copt, so we get a failure. On further inspection (i) this code is included in grpc_unsecure, and attempting to link grpc++_unsecure into a shared object fails because it links both grpc++_unsecure.a and grpc_unsecure.a, and some symbols are defined in both.
The solution seems to be to remove all of the .c files from the grpc++_unsecure rule. We're doing that in TensorFlow with a substituted BUILD file (not yet public), but we'd love to switch the upstream one from gRPC!
(FWIW, it looks like the grpc++ rule might have the same problem.)
The text was updated successfully, but these errors were encountered:
FWIW, grpc++ definitely doesn't build either, with the same root cause. The symptom I'm seeing is tons of duplicate symbols at link time -- most of the .c files are srcs for both the 'grpc++' target and 'grpc', which it depends on.
When attempting to build the latest code from the v1.0.x as part of TensorFlow, I got the following errors:
For some reason a
.c
file is being compiled as part of building the (C++)grpc++_unsecure
library. That library doesn't have a-std=gnu99
copt, so we get a failure. On further inspection (i) this code is included ingrpc_unsecure
, and attempting to linkgrpc++_unsecure
into a shared object fails because it links bothgrpc++_unsecure.a
andgrpc_unsecure.a
, and some symbols are defined in both.The solution seems to be to remove all of the
.c
files from thegrpc++_unsecure
rule. We're doing that in TensorFlow with a substituted BUILD file (not yet public), but we'd love to switch the upstream one from gRPC!(FWIW, it looks like the
grpc++
rule might have the same problem.)The text was updated successfully, but these errors were encountered: