规则'// tensorflow / core / grappler / costs:analytical_cost_estimator_test的链接失败

时间:2018-08-09 02:26:05

标签: tensorflow build bazel

我试图在CLion IDE上使用Bazel在调试模式下运行此tensorflow test。而且,我收到此错误消息:

ERROR: /home/name/tensorflow/tensorflow/core/grappler/costs/BUILD:317:1: Linking of rule '//tensorflow/core/grappler/costs:analytical_cost_estimator_test' failed (Exit 1).
collect2: error: ld returned 1 exit status
Target //tensorflow/core/grappler/costs:analytical_cost_estimator_test failed to build

使用的命令是:

bazel build --tool_tag=ijwb:CLion --compilation_mode=dbg --copt=-O0 --copt=-g --strip=never --dynamic_mode=off --curses=no --color=yes --experimental_ui=no --progress_in_terminal_title=no --test_filter=AnalyticalCostEstimatorTest.SimpleTest:AnalyticalCostEstimatorTest/*.SimpleTest:*/AnalyticalCostEstimatorTest.SimpleTest/*:*/AnalyticalCostEstimatorTest/*.SimpleTest --config=monolithic --build_event_binary_file=/tmp/intellij-bep-991f7840-b7e9-4fc1-8f46-b72fcee6be72 --nobuild_event_binary_file_path_conversion -- //tensorflow/core/grappler/costs:analytical_cost_estimator_test

添加了--verbose_failures的相同命令:

(cd /home/name/.cache/bazel/_bazel_name/0dcafb4e3b790050f9e05bb5277a4ba3/execroot/org_tensorflow &&
exec env -
PATH=/home/name/bin:/home/name/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/cuda-8.0/bin:/snap/bin
PWD=/proc/self/cwd
PYTHON_BIN_PATH=/usr/bin/python
PYTHON_LIB_PATH=/usr/local/lib/python2.7/dist-packages
TF_DOWNLOAD_CLANG=0
TF_NEED_CUDA=0
TF_NEED_OPENCL_SYCL=0
/usr/bin/gcc -o bazel-out/k8-dbg/bin/tensorflow/core/grappler/costs/analytical_cost_estimator_test '-Wl,-rpath,$ORIGIN/,-rpath,$ORIGIN/..,-rpath,$ORIGIN/../..,-rpath,$ORIGIN/../../..' -pthread -pthread '-fuse-ld=gold' -Wl,-no-as-needed -Wl,-z,relro,-z,now -B/usr/bin -B/usr/bin -pass-exit-codes -Wl,@bazel-out/k8-dbg/bin/tensorflow/core/grappler/costs/analytical_cost_estimator_test-2.params).

如何解决此错误?

0 个答案:

没有答案