【发布时间】:2017-11-14 16:29:45
【问题描述】:
我正在尝试在 Scientific Linux 7.2 上使用 bazel 0.5.1、gcc 6.2、binutils 2.28、Anaconda2 python 构建 MKL 加速版本的 TensorFlow。 显然系统 /lib64/libstdc++.so.6 太旧了,所以我尝试使用安装在另一个目录中的 gcc。 PATH、LD_LIBRARY_PATH 被修改为添加相应的路径(使用模块)。然而,虽然 bazel 可以为 gcc、ld、python 正确选择可执行文件,但它仍然会尝试加载旧系统 /lib64/libstdc++.so.6。如何强制它使用 gcc 6.2 中的那个?为什么它不从 LD_LIBRARY_PATH 中获取它? 根据谷歌的说法,很多人都遇到了这个问题,但我找不到适合我的解决方案。我在标准位置有足够新 gcc 的 Ubuntu 16.04 下构建 TensorFlow 没有任何问题。
我愿意:
1) ./配置 我选择的唯一非默认选项是使用 MKL 并下载 MKL
2) bazel build --config=mkl --copt="-DEIGEN_USE_VML" -s -c opt //tensorflow/tools/pip_package:build_pip_package
.....
example/example_parser_configuration.proto tensorflow/core/protobuf/control_flow.proto tensorflow/core/protobuf/meta_graph.proto tensorflow/core/protobuf/named_tensor.proto tensorflow/core/protobuf/saved_model.proto tensorflow/core/protobuf/ tensorflow_server.proto tensorflow/core/util/event.proto tensorflow/core/util/test_log.proto)
错误:/scratch/midway2/ivy2/TF_intel/tensorflow/tensorflow/tools/tfprof/BUILD:42:1: null failed: protoc failed: error execution command bazel-out/host/bin/external/protobuf/protoc'-- python_out=bazel-out/local-opt/genfiles/' -I. -一世。 -Iexternal/protobuf/python -Ibazel-out/local-opt/genfiles/external/protobuf/python ...(剩余 5 个参数已跳过):com.google.devtools.build.lib.shell.BadExitStatusException:进程以状态 1 退出。
bazel-out/host/bin/external/protobuf/protoc: /lib64/libstdc++.so.6: version GLIBCXX_3.4.20' not found (required by bazel-out/host/bin/external/protobuf/protoc)
bazel-out/host/bin/external/protobuf/protoc: /lib64/libstdc++.so.6: versionCXXABI_1.3.8' not found (bazel-out/host/bin/external/protobuf/protoc 需要)
bazel-out/host/bin/external/protobuf/protoc: /lib64/libstdc++.so.6: 找不到版本“GLIBCXX_3.4.21”(bazel-out/host/bin/external/protobuf/protoc 需要)
.....
谢谢你, 伊戈尔
【问题讨论】:
标签: tensorflow bazel