我想在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中選擇它? 根據谷歌許多人有這個麻煩,但我找不到解決方案,將爲我工作。在Ubuntu 16.04下構建TensorFlow時,我沒有任何問題,它在標準位置具有足夠新的gcc。building TensorFlow:bazel無法在非標準目錄中找到libstdC++
我做的:
1)運行./configure 唯一的非默認的選項,我選擇是使用MKL和下載MKL
2)巴澤勒構建--config = MKL --copt =「 - DEIGEN_USE_VML」 -s -c選擇// tensorflow /工具/ pip_package:build_pip_package
.....
例如/ example_parser_configuration.proto tensorflow /核心/ protobuf的/ control_flow.proto tensorflow /核心/ protobuf的/ meta_graph .proto tensorflow/core/protobuf/scratch/midway2/ivy2錯誤:/ scratch/midway2/ivy2/core/util/test_log.proto錯誤:/ scratch/midway2/ivy2/TF_intel/tensorflow/tensorflow/tools/tfprof/BUILD:42:1:null失敗:protoc失敗:錯誤執行命令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:Process退出狀態1. bazel-out/host/bin/external/protobuf/protoc:/lib64/libstdc++.so.6:版本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: version
未找到CXXABI_1.3.8(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)
.....
謝謝 伊戈爾