<p dir="auto">I want to install TensorFlow through compiling from source. After I finished the configure, I run the command <code class="notranslate">bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package</code>. But some errors occurs. Here are the info:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="WARNING: The following configs were expanded more than once: [cuda]. For repeatable flags, repeats are counted twice and may lead to unexpected behavior.
ERROR: Skipping '//tensorflow/tools/pip_package:build_pip_package': error loading package 'tensorflow/tools/pip_package': Encountered error while reading extension file 'cuda/build_defs.bzl': no such package '@local_config_cuda//cuda': Traceback (most recent call last):
	File &quot;/home/cxt/tensorflow/third_party/gpus/cuda_configure.bzl&quot;, line 1166
		_create_local_cuda_repository(repository_ctx)
	File &quot;/home/cxt/tensorflow/third_party/gpus/cuda_configure.bzl&quot;, line 1001, in _create_local_cuda_repository
		_find_nvvm_libdevice_dir(repository_ctx, cuda_config)
	File &quot;/home/cxt/tensorflow/third_party/gpus/cuda_configure.bzl&quot;, line 724, in _find_nvvm_libdevice_dir
		auto_configure_fail((&quot;Cannot find libdevice.10.bc un...))
	File &quot;/home/cxt/tensorflow/third_party/gpus/cuda_configure.bzl&quot;, line 210, in auto_configure_fail
		fail((&quot;\n%sCuda Configuration Error:%...)))

Cuda Configuration Error: Cannot find libdevice.10.bc under /usr/local/cuda-8.0
WARNING: Target pattern parsing failed.
ERROR: error loading package 'tensorflow/tools/pip_package': Encountered error while reading extension file 'cuda/build_defs.bzl': no such package '@local_config_cuda//cuda': Traceback (most recent call last):
	File &quot;/home/cxt/tensorflow/third_party/gpus/cuda_configure.bzl&quot;, line 1166
		_create_local_cuda_repository(repository_ctx)
	File &quot;/home/cxt/tensorflow/third_party/gpus/cuda_configure.bzl&quot;, line 1001, in _create_local_cuda_repository
		_find_nvvm_libdevice_dir(repository_ctx, cuda_config)
	File &quot;/home/cxt/tensorflow/third_party/gpus/cuda_configure.bzl&quot;, line 724, in _find_nvvm_libdevice_dir
		auto_configure_fail((&quot;Cannot find libdevice.10.bc un...))
	File &quot;/home/cxt/tensorflow/third_party/gpus/cuda_configure.bzl&quot;, line 210, in auto_configure_fail
		fail((&quot;\n%sCuda Configuration Error:%...)))

Cuda Configuration Error: Cannot find libdevice.10.bc under /usr/local/cuda-8.0"><pre class="notranslate"><code class="notranslate">WARNING: The following configs were expanded more than once: [cuda]. For repeatable flags, repeats are counted twice and may lead to unexpected behavior.
ERROR: Skipping '//tensorflow/tools/pip_package:build_pip_package': error loading package 'tensorflow/tools/pip_package': Encountered error while reading extension file 'cuda/build_defs.bzl': no such package '@local_config_cuda//cuda': Traceback (most recent call last):
	File "/home/cxt/tensorflow/third_party/gpus/cuda_configure.bzl", line 1166
		_create_local_cuda_repository(repository_ctx)
	File "/home/cxt/tensorflow/third_party/gpus/cuda_configure.bzl", line 1001, in _create_local_cuda_repository
		_find_nvvm_libdevice_dir(repository_ctx, cuda_config)
	File "/home/cxt/tensorflow/third_party/gpus/cuda_configure.bzl", line 724, in _find_nvvm_libdevice_dir
		auto_configure_fail(("Cannot find libdevice.10.bc un...))
	File "/home/cxt/tensorflow/third_party/gpus/cuda_configure.bzl", line 210, in auto_configure_fail
		fail(("\n%sCuda Configuration Error:%...)))

Cuda Configuration Error: Cannot find libdevice.10.bc under /usr/local/cuda-8.0
WARNING: Target pattern parsing failed.
ERROR: error loading package 'tensorflow/tools/pip_package': Encountered error while reading extension file 'cuda/build_defs.bzl': no such package '@local_config_cuda//cuda': Traceback (most recent call last):
	File "/home/cxt/tensorflow/third_party/gpus/cuda_configure.bzl", line 1166
		_create_local_cuda_repository(repository_ctx)
	File "/home/cxt/tensorflow/third_party/gpus/cuda_configure.bzl", line 1001, in _create_local_cuda_repository
		_find_nvvm_libdevice_dir(repository_ctx, cuda_config)
	File "/home/cxt/tensorflow/third_party/gpus/cuda_configure.bzl", line 724, in _find_nvvm_libdevice_dir
		auto_configure_fail(("Cannot find libdevice.10.bc un...))
	File "/home/cxt/tensorflow/third_party/gpus/cuda_configure.bzl", line 210, in auto_configure_fail
		fail(("\n%sCuda Configuration Error:%...)))

Cuda Configuration Error: Cannot find libdevice.10.bc under /usr/local/cuda-8.0
</code></pre></div>
<p dir="auto">I tried the solution on this <a href="https://github.com/tensorflow/tensorflow/issues/17801" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/17801/hovercard">link</a>. But it didn't work.<br>
The following are the info about my PC.</p>
<h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code</strong>: No</li>
<li><strong>OS Platform and Distribution</strong>:Linux Ubuntu 16.04</li>
<li><strong>TensorFlow installed from (source or binary)</strong>:source</li>
<li><strong>TensorFlow version (use command below)</strong>:bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package</li>
<li><strong>Python version</strong>:3.6</li>
<li><strong>Bazel version</strong>:0.15.0</li>
<li><strong>GCC/Compiler version</strong>:5.5.0</li>
<li><strong>CUDA/cuDNN version</strong>:8.0/5.1.10</li>
<li><strong>GPU model and memory</strong>:N/A</li>
<li><strong>Exact command to reproduce</strong>:N/A</li>
</ul>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">I want to install TensorFlow on my system. But I tried plenty of ways, none of them works. It took me a lot of time. Can anybody help me out or provide me a useful way?<br>
Thanks a lot!</p>
<h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: No</li>
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: Ubuntu 16.04 LTS (GNU/Linux 4.4.38-rt49-tegra aarch64)</li>
<li><strong>TensorFlow installed from (source or binary)</strong>: source</li>
<li><strong>TensorFlow version (use command below)</strong>: 1.7.0-rc0, r1.7, master</li>
<li><strong>Python version</strong>: 2.7.12</li>
<li><strong>Bazel version (if compiling from source)</strong>: 0.11.1</li>
<li><strong>GCC/Compiler version (if compiling from source)</strong>: 5.4.0-6ubuntu1~16.04.9</li>
<li><strong>CUDA/cuDNN version</strong>: 8.0/6</li>
<li><strong>GPU model and memory</strong>: name: GP106 major: 6 minor: 1 totalMemory: 3.75GiB (as reported by some previous version of Tensorflow on the other part of the same Drive PX2)</li>
<li><strong>Exact command to reproduce</strong>:<br>
<code class="notranslate">git checkout v1.7.0-rc0</code><br>
<code class="notranslate">./configure</code><br>
<code class="notranslate">bazel build //tensorflow:libtensorflow_cc.so</code></li>
</ul>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">Same problem for all branches listed under <strong>TensorFlow version</strong>.<br>
Build fails immediately with<br>
<code class="notranslate">Cuda Configuration Error: Cannot find libdevice.10.bc under /usr/local/cuda-8.0</code><br>
It's strange because I explicitly answered 8.0 versions and libdevice.10.bc exists only in 9.0 AFAIK.</p>
<h3 dir="auto">Source code / logs</h3>
<p dir="auto"><a href="https://github.com/tensorflow/tensorflow/files/1822159/error.log">error.log</a></p>
<p dir="auto"><a href="https://github.com/tensorflow/tensorflow/files/1822155/configure.log">configure.log</a></p>
<p dir="auto"><a href="https://github.com/tensorflow/tensorflow/files/1822157/tf_configure.txt">tf_configure.txt</a></p>