Issue 1:
If I try to configure the lastest master branch (db45268) using Bazel 0.3.0, I get:

ERROR: [...]/tensorflow/tensorflow/tensorflow.bzl:568:26: Traceback (most recent call last):
File "[...]/tensorflow/tensorflow/tensorflow.bzl", line 562
rule(attrs = {"srcs": attr.label_list..."), <3 more arguments>)}, <2 more arguments>)
File "[...]/tensorflow/tensorflow/tensorflow.bzl", line 568, in rule
attr.label_list(cfg = "data", allow_files = True)
expected ConfigurationTransition or NoneType for 'cfg' while calling label_list but got string instead: data.
ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package '': Extension file 'tensorflow/tensorflow.bzl' has errors.

Using 0.3.1 avoids this and reverting the offending commit 7bcdcbb also fixes it.

Environment info

Setup: CentOS, Bazel 0.3.0, CUDA 7.5, CuDNN 5.1, Tensorflow master (db45268)

I run configure and set it up for GPU support. I see the error above if I use bazel 0.3.0.

Fix

Upgrade to 0.3.1, obviously. However, since 0.3.0 is still officially supported, I thought this deserves to be an issue.

Another fix is to revert the commit 7bcdcbb. Note, I didn't have to revert to its parent; undoing that commit alone is enough:

git show -R 7bcdcbbf | git apply

Issue 2:
I am trying to build and install tensorflow from source. However when building with bazel it returns an error stating Extension file 'tensorflow/tensorflow.bzl' has errors.

Here are the commands that I ran and the logs are included.

mkvirtualenv tensorflow_dev
brew install bazel swig
workon tensorflow_dev
pip install six numpy wheel ipython
export TF_DIR=/Users/shashank/Documents/repositories/tensorflow
cd /Users/shashank/Documents/repositories/
git clone git@github.com:tensorflow/tensorflow.git
cd $TF_DIR && ./configure

~/Documents/repositories/tensorflow ~/Documents/repositories/tensorflow
Please specify the location of python. [Default is /Users/shashank/.virtualenvs/tensorflow_dev/bin/python]:
Do you wish to build TensorFlow with Google Cloud Platform support? [y/N]
No Google Cloud Platform support will be enabled for TensorFlow
Found possible Python library paths:
/Users/shashank/Documents/py_config/
/Users/shashank/.virtualenvs/tensorflow_dev/lib/python2.7/site-packages
Please input the desired Python library path to use. Default is [/Users/shashank/Documents/py_config/]

/Users/shashank/Documents/py_config/
Do you wish to build TensorFlow with GPU support? [y/N]
No GPU support will be enabled for TensorFlow
Configuration finished

cd $TF_DIR && bazel build -c opt //tensorflow/tools/pip_package:build_pip_package
ERROR: /Users/shashank/Documents/repositories/tensorflow/tensorflow/tensorflow.bzl:568:26: Traceback (most recent call last):
File "/Users/shashank/Documents/repositories/tensorflow/tensorflow/tensorflow.bzl", line 562
rule(attrs = {"srcs": attr.label_list..."), <3 more arguments>)}, <2 more arguments>)
File "/Users/shashank/Documents/repositories/tensorflow/tensorflow/tensorflow.bzl", line 568, in rule
attr.label_list(cfg = "data", allow_files = True)
expected ConfigurationTransition or NoneType for 'cfg' while calling label_list but got string instead: data.
ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package '': Extension file 'tensorflow/tensorflow.bzl' has errors.
INFO: Elapsed time: 0.063s

Thanks for your help