tensorflow 构建在 2016 年 10 月 6 日失败

tensorflow build fail at october 6 2016

Ubuntu 16.04

gcc 5.4.0

java1.8.0_91

bazel 0.3.1(下载版本,还没有从源代码构建,因为它构建失败)

我根据讨论 here and here 更改了配置文件,因为它适用于 ./configure

我克隆了最新的代码并配置了没有 GPU。这是我在 tensorflow

根目录下的构建指令
bazel build -c opt //tensorflow/tools/pip_package:build_pip_package

错误日志:

ERROR: /home/gt/.cache/bazel/_bazel_gt/3d5d29ec73796bda2fc5b2dffed26f47/external/protobuf/BUILD:333:1: Linking of rule '@protobuf//:protoc' failed: gcc failed: error executing command /usr/bin/gcc -o bazel-out/host/bin/external/protobuf/protoc -Wl,-no-as-needed -B/usr/bin -B/usr/bin -pass-exit-codes '-Wl,--build-id=md5' '-Wl,--hash-style=gnu' -Wl,-S -Wl,--gc-sections ... (remaining 1 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
bazel-out/host/bin/external/protobuf/_objs/protoc/external/protobuf/src/google/protobuf/compiler/main.o: In function `main':
main.cc:(.text.startup.main+0x2db): undefined reference to `vtable for google::protobuf::compiler::php::Generator'
main.cc:(.text.startup.main+0x642): undefined reference to `vtable for google::protobuf::compiler::php::Generator'
main.cc:(.text.startup.main+0x740): undefined reference to `vtable for google::protobuf::compiler::php::Generator'
collect2: error: ld returned 1 exit status
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.

这是 protobuf 中的一个错误,我们已经在两周前发出了信号。参见 https://github.com/google/protobuf/issues/2133