Issue 1:
» ./configure
~/tmp/tensorflow ~/tmp/tensorflow
Please specify the location of python. [Default is /usr/bin/python]: /usr/bin/python3
Do you wish to build TensorFlow with Google Cloud Platform support? [y/N]
No Google Cloud Platform support will be enabled for TensorFlow
Do you wish to build TensorFlow with Hadoop File System support? [y/N]
No Hadoop File System support will be enabled for TensorFlow
Found possible Python library paths:
/usr/lib/python3/dist-packages
/usr/local/lib/python3.5/dist-packages
.
Please input the desired Python library path to use. Default is [/usr/lib/python3/dist-packages]
/home/wojciech/.local/lib/python3.5/site-packages
Do you wish to build TensorFlow with OpenCL support? [y/N]
No OpenCL support will be enabled for TensorFlow
Do you wish to build TensorFlow with GPU support? [y/N] y
GPU support will be enabled for TensorFlow
Please specify which gcc should be used by nvcc as the host compiler. [Default is /usr/bin/gcc]:
Please specify the Cuda SDK version you want to use, e.g. 7.0. [Leave empty to use system default]:
Please specify the location where CUDA toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]:
Please specify the Cudnn version you want to use. [Leave empty to use system default]:
Please specify the location where cuDNN library is installed. Refer to README.md for more details. [Default is /usr/local/cuda]:
Please specify a list of comma-separated Cuda compute capabilities you want to build with.
You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus.
Please note that each additional compute capability significantly increases your build time and binary size.
[Default is: "3.5,5.2"]: 6.1
.
INFO: Starting clean (this may take a while). Consider using --expunge_async if the clean takes more than several minutes.
.
ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading 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/wojciech/tmp/tensorflow/third_party/gpus/cuda_configure.bzl", line 517
_create_cuda_repository(repository_ctx)
File "/home/wojciech/tmp/tensorflow/third_party/gpus/cuda_configure.bzl", line 432, in _create_cuda_repository
_cuda_toolkit_path(repository_ctx, cuda_version)
File "/home/wojciech/tmp/tensorflow/third_party/gpus/cuda_configure.bzl", line 148, in _cuda_toolkit_path
str(repository_ctx.path(cuda_toolkit...)
File "/home/wojciech/tmp/tensorflow/third_party/gpus/cuda_configure.bzl", line 148, in str
repository_ctx.path(cuda_toolkit_path).realpath
Object of type 'path' has no field "realpath".

git hash: 7f3d8e1

» bazel version
Build label: 0.3.1
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Fri Jul 29 09:09:52 2016 (1469783392)
Build timestamp: 1469783392
Build timestamp as int: 1469783392

python 3.5.2

Works fine on the r0.11 branch

Issue 2:
I upgraded to 0.11rc1 as you have advised, @tatatodd in issue #4841 . I did a sudo ./configure, and this was the result:

$ sudo ./configure
~/tensorflow ~/tensorflow
Please specify the location of python. [Default is /usr/bin/python]: /usr/bin/python3
Do you wish to build TensorFlow with Google Cloud Platform support? [y/N] N
No Google Cloud Platform support will be enabled for TensorFlow
Do you wish to build TensorFlow with Hadoop File System support? [y/N] N
No Hadoop File System support will be enabled for TensorFlow
Found possible Python library paths:
/usr/local/lib/python3.5/dist-packages
/usr/lib/python3/dist-packages
Please input the desired Python library path to use. Default is [/usr/local/lib/python3.5/dist-packages]

/usr/local/lib/python3.5/dist-packages
Do you wish to build TensorFlow with GPU support? [y/N] Y
GPU support will be enabled for TensorFlow
Please specify which gcc should be used by nvcc as the host compiler. [Default is /usr/bin/gcc]:
Please specify the Cuda SDK version you want to use, e.g. 7.0. [Leave empty to use system default]: 8.0
Please specify the location where CUDA 8.0 toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]: /usr/local/cuda-8.0
Please specify the Cudnn version you want to use. [Leave empty to use system default]:
Please specify the location where cuDNN library is installed. Refer to README.md for more details. [Default is /usr/local/cuda-8.0]:
libcudnn.so resolves to libcudnn.5
Please specify a list of comma-separated Cuda compute capabilities you want to build with.
You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus.
Please note that each additional compute capability significantly increases your build time and binary size.
[Default is: "3.5,5.2"]:
INFO: Starting clean (this may take a while). Consider using --expunge_async if the clean takes more than several minutes.
.
ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading 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/darth/tensorflow/third_party/gpus/cuda_configure.bzl", line 517
_create_cuda_repository(repository_ctx)
File "/home/darth/tensorflow/third_party/gpus/cuda_configure.bzl", line 432, in _create_cuda_repository
_cuda_toolkit_path(repository_ctx, cuda_version)
File "/home/darth/tensorflow/third_party/gpus/cuda_configure.bzl", line 148, in _cuda_toolkit_path
str(repository_ctx.path(cuda_toolkit...)
File "/home/darth/tensorflow/third_party/gpus/cuda_configure.bzl", line 148, in str
repository_ctx.path(cuda_toolkit_path).realpath
Object of type 'path' has no field "realpath".

Thanks in advance for your response.