CROSSTOOL中的tensorflow链接器_标志
我正在使用Tensorflow 1.1.0、gcc 5.2.0和bazel 0.4.5 当我这样做时: ./configure bazel build --verbose_failures --config=opt //tensorflow/tools/pip_package:build_pip_package /配置 bazel构建——详细的失败——config=opt//tensorflow/tools/pip\u包:构建pip\u包 我收到以下错误消息: ERROR: /remote/us03home4/rogerlo/.cache/bazel/_bazel_rogerlo/c6e718933b1d81ab029d890c5eecbc01/external/protobuf/BUILD:67 9:1: null failed: protoc failed: error executing command (cd /remote/us03home4/rogerlo/.cache/bazel/_bazel_rogerlo/c6e718933b1d81ab029d890c5eecbc01/execroot/tensorflow && \ exec env - \ bazel-out/host/bin/external/protobuf/protoc '--python_out=bazel-out/local-opt/genfiles/external/protobuf/python' -Iexternal/protobuf/python -Ibazel-out/local-opt/genfiles/external/protobuf/python bazel-out/local-opt/genfiles/external/protobuf/python/google/protobuf/any.proto bazel-out/local-opt/genfiles/external/protobuf/python/google/protobuf/api.proto bazel-out/local-opt/genfiles/external/protobuf/python/google/protobuf/compiler/plugin.proto bazel-out/local-opt/genfiles/external/protobuf/python/google/protobuf/descriptor.proto bazel-out/local-opt/genfiles/external/protobuf/python/google/protobuf/duration.proto bazel-out/local-opt/genfiles/external/protobuf/python/google/protobuf/empty.proto bazel-out/local-opt/genfiles/external/protobuf/python/google/protobuf/field_mask.proto bazel-out/local-opt/genfiles/external/protobuf/python/google/protobuf/source_context.proto bazel-out/local-opt/genfiles/external/protobuf/python/google/protobuf/struct.proto bazel-out/local-opt/genfiles/external/protobuf/python/google/protobuf/timestamp.proto bazel-out/local-opt/genfiles/external/protobuf/python/google/protobuf/type.proto bazel-out/local-opt/genfiles/external/protobuf/python/google/protobuf/wrappers.proto): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1. bazel-out/host/bin/external/protobuf/protoc: /usr/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: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by bazel-out/host/bin/external/protobuf/protoc) bazel-out/host/bin/external/protobuf/protoc: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by bazel-out/host/bin/external/protobuf/protoc) bazel-out/host/bin/external/protobuf/protoc: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by bazel-out/host/bin/external/protobuf/protoc) ____Building complete. Target //tensorflow/tools/pip_package:build_pip_package failed to build ____Elapsed time: 101.992s, Critical Path: 54.24s make: *** [tensorflow] Error 1 错误:/remote/us03home4/rogerlo/.cache/bazel/_bazel_rogerlo/c6e718933b1d81ab029d890c5eecbc01/external/protobuf/BUILD:67 9:1:null失败:协议失败:执行命令时出错 (cd/remote/us03home4/rogerlo/.cache/bazel/_bazel_rogerlo/c6e718933b1d81ab029d890c5eecbc01/execroot/tensorflow&&\ 行政环境\ bazel out/host/bin/external/protobuf/protoc'-python_out=bazel out/local opt/genfiles/external/protobuf/python-Ibazel out/local opt/genfiles/external/protobuf/python bazel out/local opt/genfiles/external/protobuf/python/google/protobuf/any.protobazel out/local opt/genfiles/genfiles/external/protobuf/external/protobuf/protobuf/api.proto bazel out/local opt/genfiles/external/protobuf/python/google/protobuf/compiler/plugin.proto bazel out/local opt/genfiles/external/protobuf/python/descriptor.proto bazel out/local opt/genfiles/external/protobuf/python/python/google/protobuf/empty.proto bazel out/local opt/genfiles/external/protobuf/python/google/protobuf/field_mask.proto bazel out/local opt/genfiles/external/protobuf/python/source_context.proto bazel out/local opt/genfiles/external/protobuf/python/protobuf/python/struct.protobazel out/local opt/genfiles/external/protobuf/python/python/protobuf/timestamp.proto bazel out/local opt/genfiles/external/protobuf/python/google/protobuf/type.proto bazel out/local opt/genfiles/external/protobuf/python/google/protobuf/wrappers.proto):com.google.devtools.build.lib.shell.badexitstatuseException:进程退出,状态为1。 bazel out/host/bin/external/protobuf/protoc:/usr/lib64/libstdc++.so.6:找不到版本'GLIBCXX_3.4.20'(bazel out/host/bin/external/protobuf/protoc所需) bazel out/host/bin/external/protobuf/protoc:/usr/lib64/libstdc++.so.6:找不到版本“CXXABI_1.3.8”(bazel out/host/bin/external/protobuf/protoc需要) bazel out/host/bin/external/protobuf/protoc:/usr/lib64/libstdc++.so.6:找不到版本'GLIBCXX_3.4.18'(bazel out/host/bin/external/protobuf/protoc所需) bazel out/host/bin/external/protobuf/protoc:/usr/lib64/libstdc++.so.6:找不到版本'GLIBCXX_3.4.21'(bazel out/host/bin/external/protobuf/protoc所需) ____大楼完工了。 目标//tensorflow/tools/pip\u包:生成\u pip\u包未能生成 ____运行时间:101.992s,关键路径:54.24s make:**[tensorflow]错误1 但如果我加上这一行: linker_flag: "-Wl,-rpath,/depot/gcc-5.2.0/lib64" 链接器_标志:“-Wl,-rpath,/depot/gcc-5.2.0/lib64” 归档 $TENSORFLOW_ROOT/bazel-tensorflow/external/local_config_cc/CROSSTOOL $TENSORFLOW\u ROOT/bazel TENSORFLOW/external/local\u config\u cc/CROSSTOOL 构建将通过 我想知道是否可以从配置文件或其他地方配置链接器_标志 我确实将它添加到构建选项中,但它不起作用 bazel build --verbose_failures --config=opt --linkopt="-Wl,-rpath,/depot/gcc-5.2.0/lib6 4" //tensorflow/tools/pip_package:build_pip_package bazel构建——详细_失败——config=opt--linkopt=“-Wl,-rpath,/depot/gcc-5.2.0/lib6 4”//tensorflow/tools/pip\u包:构建pip\u包 编辑:添加了bazel版本 解决方案:CROSSTOOL中的tensorflow链接器_标志,tensorflow,installation,linker,bazel,Tensorflow,Installation,Linker,Bazel,我正在使用Tensorflow 1.1.0、gcc 5.2.0和bazel 0.4.5 当我这样做时: ./configure bazel build --verbose_failures --config=opt //tensorflow/tools/pip_package:build_pip_package /配置 bazel构建——详细的失败——config=opt//tensorflow/tools/pip\u包:构建pip\u包 我收到以下错误消息: ERROR: /remot
(请原谅我上面那些难看的超链接。我的名声不足以在一篇文章中包含2个以上的链接。)将标志添加为--linkopt无效?它应该(在我的小测试用例中也是如此)。是否将该标志添加到链接命令行?您可以使用-s标志检查Bazel发出的各个命令行。@mhlopko,否--linkopt对我不起作用,因为目标是由外部crosstool生成的。我将在原始帖子中更新我的解决方案。--linkopt应该仍然有效,即使目标是由自动生成的crosstool构建的。你能复制吗?我会的