Tensorflow构建错误:执行genrule // tensorflow:tf_python_api_gen_v1失败... _pywrap_tensorflow_internal.so:未定义符号:_ZN15stream

时间:2018-11-24 02:40:21

标签: python-3.x tensorflow cudnn gcc6

构建张量流(具有以下特殊特征:)给我错误:(

  • CUDA 10,
  • cuDNN 7.3.1,
  • 计算3.0,
  • 没有avx,
  • python 3.6,
  • gcc 6.5.1

    $ bazel build --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" //tensorflow/tools/pip_package:build_pip_package

[bazel版本0.19.2]

ERROR: /home/myusername/.repos/tensorflow/tensorflow/BUILD:567:1: Executing genrule //tensorflow:tf_python_api_gen_v1 failed (Exit 1)
Traceback (most recent call last):
  File "/home/myusername/.cache/bazel/_bazel_myusername/bd36ac9d914162fad243f156335de966/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/home/myusername/.cache/bazel/_bazel_myusername/bd36ac9d914162fad243f156335de966/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/home/myusername/.cache/bazel/_bazel_myusername/bd36ac9d914162fad243f156335de966/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/usr/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/usr/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: /home/myusername/.cache/bazel/_bazel_myusername/bd36ac9d914162fad243f156335de966/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: _ZN15stream_executor4cuda13Diagnostician23FindKernelDriverVersionEv

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/myusername/.cache/bazel/_bazel_myusername/bd36ac9d914162fad243f156335de966/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/tools/api/generator/create_python_api.py", line 27, in <module>
    from tensorflow.python.tools.api.generator import doc_srcs
  File "/home/myusername/.cache/bazel/_bazel_myusername/bd36ac9d914162fad243f156335de966/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/home/myusername/.cache/bazel/_bazel_myusername/bd36ac9d914162fad243f156335de966/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "/home/myusername/.cache/bazel/_bazel_myusername/bd36ac9d914162fad243f156335de966/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/home/myusername/.cache/bazel/_bazel_myusername/bd36ac9d914162fad243f156335de966/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/home/myusername/.cache/bazel/_bazel_myusername/bd36ac9d914162fad243f156335de966/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/usr/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/usr/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: /home/myusername/.cache/bazel/_bazel_myusername/bd36ac9d914162fad243f156335de966/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: _ZN15stream_executor4cuda13Diagnostician23FindKernelDriverVersionEv


Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 21056.211s, Critical Path: 625.42s, Remote (0.00% of the time): [queue: 0.00%, setup: 0.00%, process: 0.00%]
INFO: 14794 processes: 14794 local.
FAILED: Build did NOT complete successfully

作为旁注,我也使用CUDA 9和cuDNN 7.0进行了尝试!我已经尝试过Google,但是它确实不提供任何解决方案。

0 个答案:

没有答案