tensorflow: [building tensorflow with bazel ] Error:C++ compilation of rule '@boringssl//:crypto' failed.

Environment: GCC 4.9.1 glibc :2.11.3 bazel:0.4.0/0.4.5/0.5.3(these versions have been tried) OS: SUSE It seems that boringssl can’t work with command bazel build --copt=-march=native -c opt //tensorflow/tools/pip_package:build_pip_package. Here is the log:

WARNING: /hdata/users/rll/tensorflow/tensorflow/tensorflow/tensorflow/contrib/learn/BUILD:15:1: in py_library rule //tensorflow/contrib/learn:learn: target ‘//tensorflow/contrib/learn:learn’ depends on deprecated target ‘//tensorflow/contrib/session_bundle:exporter’: No longer supported. Switch to SavedModel immediately. WARNING: /hdata/users/rll/tensorflow/tensorflow/tensorflow/tensorflow/contrib/learn/BUILD:15:1: in py_library rule //tensorflow/contrib/learn:learn: target ‘//tensorflow/contrib/learn:learn’ depends on deprecated target ‘//tensorflow/contrib/session_bundle:gc’: No longer supported. Switch to SavedModel immediately. INFO: Found 1 target… ERROR: /var/lib/hive/.cache/bazel/_bazel_hive/e5053b6fc588ac2d9981b522e9f221e1/external/boringssl/BUILD:116:1: C++ compilation of rule ‘@boringssl//:crypto’ failed (Exit 1). In file included from /usr/include/fcntl.h:38:0, from external/boringssl/src/crypto/bio/socket_helper.c:21: /usr/include/sys/stat.h:372:56: error: array type has incomplete element type extern int futimens (int __fd, __const struct timespec __times[2]) __THROW; ^ 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: 47.092s, Critical Path: 17.01s

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 20 (7 by maintainers)

Most upvoted comments

@VarIr I tried it ,but the same error has been still there by adding --copt=-O .

Met the same error

gcc 4.8.5 20150623 (Red Hat 4.8.5-16) glibc 2.17-196. bazel 0.8.1- (@non-git) OS Red Hat Enterprise Linux Server release 7.4 (Maipo)

This error disappeared when I have upgraded all the software to the latest version. The environment works: Gcc gcc version 5.3.1 glibc: glibc-2.22-8.4.x86_64 bazel: 0.6.1 OS: openSUSE Leap 42.3 TF: commit 9ff05e9e7f471a8487cdd8a7bb6fdd554055e2dd