tensorflow: build failed at master branch
Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template
System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): 18.04
- Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: N/A
- TensorFlow installed from (source or binary): source
- TensorFlow version: master 2.1.0
- Python version: 3.7.6
- Installed using virtualenv? pip? conda?: N/A
- Bazel version (if compiling from source): 1.2.1
- GCC/Compiler version (if compiling from source):7.4.0
- CUDA/cuDNN version: 10.2 / 7.6.5
- GPU model and memory: GTX1080Ti GDDR5X 11GB
Describe the problem
Build error
Provide the exact sequence of commands / steps that you executed before running into the problem bazel build //tensorflow/tools/pip_package:build_pip_package
Any other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-self-assign’
ERROR: /home/wmind/repo/tensorflow/tensorflow/python/keras/api/BUILD:116:1: Executing genrule //tensorflow/python/keras/api:keras_python_api_gen_compat_v1 failed (Exit 1)
2020-01-15 18:41:58.956645: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.2
Traceback (most recent call last):
File "/home/wmind/.cache/bazel/_bazel_wmind/a0a15f0a32d3688786619e94912711cf/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/keras/api/create_tensorflow.python_api_keras_python_api_gen_compat_v1.runfiles/org_tensorflow/tensorflow/python/tools/api/generator/create_python_api.py", line 776, in <module>
main()
File "/home/wmind/.cache/bazel/_bazel_wmind/a0a15f0a32d3688786619e94912711cf/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/keras/api/create_tensorflow.python_api_keras_python_api_gen_compat_v1.runfiles/org_tensorflow/tensorflow/python/tools/api/generator/create_python_api.py", line 772, in main
lazy_loading, args.use_relative_imports)
File "/home/wmind/.cache/bazel/_bazel_wmind/a0a15f0a32d3688786619e94912711cf/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/keras/api/create_tensorflow.python_api_keras_python_api_gen_compat_v1.runfiles/org_tensorflow/tensorflow/python/tools/api/generator/create_python_api.py", line 629, in create_api_files
compat_api_versions, lazy_loading, use_relative_imports)
File "/home/wmind/.cache/bazel/_bazel_wmind/a0a15f0a32d3688786619e94912711cf/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/keras/api/create_tensorflow.python_api_keras_python_api_gen_compat_v1.runfiles/org_tensorflow/tensorflow/python/tools/api/generator/create_python_api.py", line 503, in get_api_init_text
_, attr = tf_decorator.unwrap(attr)
File "/home/wmind/.cache/bazel/_bazel_wmind/a0a15f0a32d3688786619e94912711cf/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/keras/api/create_tensorflow.python_api_keras_python_api_gen_compat_v1.runfiles/org_tensorflow/tensorflow/python/util/tf_decorator.py", line 219, in unwrap
elif _has_tf_decorator_attr(cur):
File "/home/wmind/.cache/bazel/_bazel_wmind/a0a15f0a32d3688786619e94912711cf/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/keras/api/create_tensorflow.python_api_keras_python_api_gen_compat_v1.runfiles/org_tensorflow/tensorflow/python/util/tf_decorator.py", line 124, in _has_tf_decorator_attr
hasattr(obj, '_tf_decorator') and
File "/home/wmind/.cache/bazel/_bazel_wmind/a0a15f0a32d3688786619e94912711cf/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/keras/api/create_tensorflow.python_api_keras_python_api_gen_compat_v1.runfiles/org_tensorflow/tensorflow/python/util/lazy_loader.py", line 62, in __getattr__
module = self._load()
File "/home/wmind/.cache/bazel/_bazel_wmind/a0a15f0a32d3688786619e94912711cf/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/keras/api/create_tensorflow.python_api_keras_python_api_gen_compat_v1.runfiles/org_tensorflow/tensorflow/python/util/lazy_loader.py", line 45, in _load
module = importlib.import_module(self.__name__)
File "/home/wmind/anaconda3/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/wmind/.cache/bazel/_bazel_wmind/a0a15f0a32d3688786619e94912711cf/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/keras/api/create_tensorflow.python_api_keras_python_api_gen_compat_v1.runfiles/org_tensorflow/tensorflow/compiler/tf2tensorrt/wrap_py_utils.py", line 28, in <module>
_wrap_py_utils = swig_import_helper()
File "/home/wmind/.cache/bazel/_bazel_wmind/a0a15f0a32d3688786619e94912711cf/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/keras/api/create_tensorflow.python_api_keras_python_api_gen_compat_v1.runfiles/org_tensorflow/tensorflow/compiler/tf2tensorrt/wrap_py_utils.py", line 24, in swig_import_helper
_mod = imp.load_module('_wrap_py_utils', fp, pathname, description)
File "/home/wmind/anaconda3/lib/python3.7/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/home/wmind/anaconda3/lib/python3.7/imp.py", line 342, in load_dynamic
return _load(spec)
File "<frozen importlib._bootstrap>", line 696, in _load
File "<frozen importlib._bootstrap>", line 670, in _load_unlocked
File "<frozen importlib._bootstrap>", line 583, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1043, in create_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: /home/wmind/.cache/bazel/_bazel_wmind/a0a15f0a32d3688786619e94912711cf/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/keras/api/create_tensorflow.python_api_keras_python_api_gen_compat_v1.runfiles/org_tensorflow/tensorflow/compiler/tf2tensorrt/_wrap_py_utils.so: undefined symbol: _ZN15stream_executor14StreamExecutor18EnablePeerAccessToEPS0_
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: /home/wmind/repo/tensorflow/tensorflow/tools/pip_package/BUILD:41:1 Executing genrule //tensorflow/python/keras/api:keras_python_api_gen_compat_v1 failed (Exit 1)
INFO: Elapsed time: 3197.242s, Critical Path: 395.57s
INFO: 18184 processes: 18184 local.
FAILED: Build did NOT complete successfully
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20 (13 by maintainers)
no problem without tensorrt suppot ( ver 7.0 )
Please use
```
around computer generated blocks (errors, code, output)ImportError: /home/phillweston/.cache/bazel/_bazel_phillweston/116338b0ad1de73f45727b0ef63c0bc9/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/keras/api/create_tensorflow.python_api_keras_python_api_gen.runfiles/org_tensorflow/tensorflow/compiler/tf2tensorrt/_wrap_py_utils.so: undefined symbol: ZN15stream_executor14StreamExecutor18EnablePeerAccessToEPS0 Target //tensorflow/tools/pip_package:build_pip_package failed to build ERROR: /home/phillweston/git-repository/tensorflow/tensorflow/python/tools/BUILD:141:1 Executing genrule //tensorflow/python/keras/api:keras_python_api_gen_compat_v2 failed (Exit 1)
@gadagashwini
I’ll try again and let you know asap
The above problem has been found to compile the tensorflow version for Python 3.6. The following three files are logs containing the compilation process. You can derive the target version and environment from the name of the file:
tf2.1_py36_cuda10.0.zip (cuda 10.0.130, nccl 2.5.6, cudnn 7.6.5.32 tensorrt 7.0.0.11) tf2.1_py36_cuda10.1.zip (cuda 10.1.243, nccl 2.5.6, cudnn 7.6.5.32 tensorrt 6.0.1.5) tf2.1_py36_cuda10.2.zip (cuda 10.2.89, nccl 2.5.6, cudnn 7.6.5.32 tensorrt 7.0.0.11)
The compilation configuration is as follows:
https://github.com/vistart/Dockerfiles/blob/build_tensorflow/build_tensorflow/.tf_configure.bazelrc.py27 https://github.com/vistart/Dockerfiles/blob/build_tensorflow/build_tensorflow/.tf_configure.bazelrc.py36 https://github.com/vistart/Dockerfiles/blob/build_tensorflow/build_tensorflow/.tf_configure.bazelrc.py37
Currently, tensorflow for python 2.7 compiles fine.
Everyone can try the compilation process themselves by following the instructions in the link below:
https://hub.docker.com/r/vistart/build_tensorflow