Issue 1:
Hi!

I was trying to install a fresh install of the tensorflow master from source, but always run into an error:

$ bazel build -c opt --config=cuda --verbose_failures --spawn_strategy=standalone //tensorflow/tools/pip_package:build_pip_package

Eventually fails with:

ERROR: /system/user/bioinf01/tom/sources/tensorflow/tensorflow/python/BUILD:71:1: C++ compilation of rule '//tensorflow/python:py_func_lib' failed: crosstool_wrapper_driver_is_not_
gcc failed: error executing command
(cd /system/user/unterthi/.cache/bazel/_bazel_unterthi/b4214462455bc5801962f5dfb9d41d3b/tensorflow && \
exec env - \
INTERCEPT_LOCALLY_EXECUTABLE=1 \
PATH=/system/apps/biosoft/bazel-0.1.1/bazel-bin/src:/system/apps/biosoft/jdk1.8.0_40/bin:/usr/local/cuda/bin:/system/apps/biosoft/R-3.2.0/bin:/system/apps/biosoft/caffe_py351/d
istribute/bin:/system/apps/biosoft/lmdb-0.9.17/bin:/system/apps/biosoft/protobuf-3.0.0-alpha-3.1_py351/bin:/system/apps/biosoft/boost_1_59_0_py351/bin:/system/apps/biosoft/python-3
51/bin:/usr/local/cuda/bin:/system/apps/biosoft/R-3.2.0/bin:/system/apps/biosoft/caffe_py351/distribute/bin:/system/apps/biosoft/lmdb-0.9.17/bin:/system/apps/biosoft/protobuf-3.0.0
-alpha-3.1_py351/bin:/system/apps/biosoft/boost_1_59_0_py351/bin:/system/apps/biosoft/python-351/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/system
/user/unterthi/bin:/system/user/unterthi/bin \
third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-fre
e-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++11' -iquote . -iquote bazel-out/local_linux-py3-opt/genfiles -isystem google/
protobuf/src -isystem bazel-out/local_linux-py3-opt/genfiles/google/protobuf/src -isystem tools/cpp/gcc3 -isystem external/jpeg_archive/jpeg-9a -isystem bazel-out/local_linux-py3-o
pt/genfiles/external/jpeg_archive/jpeg-9a -isystem external/png_archive/libpng-1.2.53 -isystem bazel-out/local_linux-py3-opt/genfiles/external/png_archive/libpng-1.2.53 -isystem ex
ternal/re2 -isystem bazel-out/local_linux-py3-opt/genfiles/external/re2 -isystem third_party/eigen3 -isystem bazel-out/local_linux-py3-opt/genfiles/third_party/eigen3 -isystem exte
rnal/eigen_archive/eigen-eigen-5651786d5e59 -isystem bazel-out/local_linux-py3-opt/genfiles/external/eigen_archive/eigen-eigen-5651786d5e59 -isystem third_party/py/numpy/numpy_incl
ude -isystem bazel-out/local_linux-py3-opt/genfiles/third_party/py/numpy/numpy_include -isystem util/python/python_include -isystem bazel-out/local_linux-py3-opt/genfiles/util/pyth
on/python_include -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/local_li
nux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorflow/python/lib/core/py_func.pic.o' -MD -MF bazel-out/local_linux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorfl
ow/python/lib/core/py_func.pic.d -fPIC -c tensorflow/python/lib/core/py_func.cc -o bazel-out/local_linux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorflow/python/lib/core/
py_func.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1: crosstool_wrapper_driver_is_not_gcc failed: error executing command
(cd /system/user/unterthi/.cache/bazel/_bazel_unterthi/b4214462455bc5801962f5dfb9d41d3b/tensorflow && \
exec env - \
INTERCEPT_LOCALLY_EXECUTABLE=1 \
PATH=/system/apps/biosoft/bazel-0.1.1/bazel-bin/src:/system/apps/biosoft/jdk1.8.0_40/bin:/usr/local/cuda/bin:/system/apps/biosoft/R-3.2.0/bin:/system/apps/biosoft/caffe_py351/d
istribute/bin:/system/apps/biosoft/lmdb-0.9.17/bin:/system/apps/biosoft/protobuf-3.0.0-alpha-3.1_py351/bin:/system/apps/biosoft/boost_1_59_0_py351/bin:/system/apps/biosoft/python-3
51/bin:/usr/local/cuda/bin:/system/apps/biosoft/R-3.2.0/bin:/system/apps/biosoft/caffe_py351/distribute/bin:/system/apps/biosoft/lmdb-0.9.17/bin:/system/apps/biosoft/protobuf-3.0.0
-alpha-3.1_py351/bin:/system/apps/biosoft/boost_1_59_0_py351/bin:/system/apps/biosoft/python-351/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/system
/user/unterthi/bin:/system/user/unterthi/bin \
third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-fre
e-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++11' -iquote . -iquote bazel-out/local_linux-py3-opt/genfiles -isystem google/
protobuf/src -isystem bazel-out/local_linux-py3-opt/genfiles/google/protobuf/src -isystem tools/cpp/gcc3 -isystem external/jpeg_archive/jpeg-9a -isystem bazel-out/local_linux-py3-o
pt/genfiles/external/jpeg_archive/jpeg-9a -isystem external/png_archive/libpng-1.2.53 -isystem bazel-out/local_linux-py3-opt/genfiles/external/png_archive/libpng-1.2.53 -isystem ex
ternal/re2 -isystem bazel-out/local_linux-py3-opt/genfiles/external/re2 -isystem third_party/eigen3 -isystem bazel-out/local_linux-py3-opt/genfiles/third_party/eigen3 -isystem exte
rnal/eigen_archive/eigen-eigen-5651786d5e59 -isystem bazel-out/local_linux-py3-opt/genfiles/external/eigen_archive/eigen-eigen-5651786d5e59 -isystem third_party/py/numpy/numpy_incl
ude -isystem bazel-out/local_linux-py3-opt/genfiles/third_party/py/numpy/numpy_include -isystem util/python/python_include -isystem bazel-out/local_linux-py3-opt/genfiles/util/pyth
on/python_include -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/local_li
nux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorflow/python/lib/core/py_func.pic.o' -MD -MF bazel-out/local_linux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorfl
ow/python/lib/core/py_func.pic.d -fPIC -c tensorflow/python/lib/core/py_func.cc -o bazel-out/local_linux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorflow/python/lib/core/
py_func.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 118.584s, Critical Path: 32.92s

Running that last command myself to see the GCC error message gives:

$ third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstac
k-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++11' -iquote . -iqu
ote bazel-out/local_linux-py3-opt/genfiles -isystem google/protobuf/src -isystem bazel-out/local_linux-py3-opt/genfiles/google/protobuf/src -isystem tools/cpp/gcc3 -isystem externa
l/jpeg_archive/jpeg-9a -isystem bazel-out/local_linux-py3-opt/genfiles/external/jpeg_archive/jpeg-9a -isystem external/png_archive/libpng-1.2.53 -isystem bazel-out/local_linux-py3-
opt/genfiles/external/png_archive/libpng-1.2.53 -isystem external/re2 -isystem bazel-out/local_linux-py3-opt/genfiles/external/re2 -isystem third_party/eigen3 -isystem bazel-out/lo
cal_linux-py3-opt/genfiles/third_party/eigen3 -isystem external/eigen_archive/eigen-eigen-5651786d5e59 -isystem bazel-out/local_linux-py3-opt/genfiles/external/eigen_archive/eigen-
eigen-5651786d5e59 -isystem third_party/py/numpy/numpy_include -isystem bazel-out/local_linux-py3-opt/genfiles/third_party/py/numpy/numpy_include -isystem util/python/python_includ
e -isystem bazel-out/local_linux-py3-opt/genfiles/util/python/python_include -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"
' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/local_linux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorflow/python/lib/core/py_func.pic.o' -MD -MF bazel-out/local_lin
ux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorflow/python/lib/core/py_func.pic.d -fPIC -c tensorflow/python/lib/core/py_func.cc -o bazel-out/local_linux-py3-opt/bin/tens
orflow/python/_objs/py_func_lib/tensorflow/python/lib/core/py_func.pic.o
In file included from ./tensorflow/core/public/tensor.h:19:0,
from ./tensorflow/python/lib/core/py_func.h:20,
from tensorflow/python/lib/core/py_func.cc:16:
./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1:90: fatal error: external/eigen_archive/eigen-eigen-5651786d5e59/unsupported/Eigen/CXX11/Tensor: No such file or directory
#include "external/eigen_archive/eigen-eigen-5651786d5e59/unsupported/Eigen/CXX11/Tensor"
^
compilation terminated.

Issue 2:
Hi

Sounds like the python3 building script have some issues:

PC% bazel build -c opt //tensorflow/tools/pip_package:build_pip_package
...........
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.io/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
INFO: Found 1 target...
ERROR: /home/zenol/tensorflow/tensorflow/tensorflow/python/BUILD:247:1: Converting to Python 3: tensorflow/python/ops/functional_ops.py failed: 2to3 failed: error executing command bazel-out/host/bin/external/bazel_tools/tools/python/2to3 --no-diffs --nobackups --write --output-dir bazel-out/local_linux-py3-opt/genfiles/python3/tensorflow/python/ops --write-unchanged-files ... (remaining 1 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
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: 18.140s, Critical Path: 2.02s

With verbose_faillures :

ERROR: /home/zenol/tensorflow/tensorflow/tensorflow/python/BUILD:247:1: Converting to Python 3: tensorflow/python/ops/functional_ops.py failed: 2to3 failed: error executing command
(cd /home/zenol/.cache/bazel/_bazel_zenol/67d52188e906c7f900d4635d7d1ff821/tensorflow && \
exec env - \
bazel-out/host/bin/external/bazel_tools/tools/python/2to3 --no-diffs --nobackups --write --output-dir bazel-out/local_linux-py3-opt/genfiles/python3/tensorflow/python/ops --write-unchanged-files tensorflow/python/ops/functional_ops.py): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1: 2to3 failed: error executing command
(cd /home/zenol/.cache/bazel/_bazel_zenol/67d52188e906c7f900d4635d7d1ff821/tensorflow && \
exec env - \
bazel-out/host/bin/external/bazel_tools/tools/python/2to3 --no-diffs --nobackups --write --output-dir bazel-out/local_linux-py3-opt/genfiles/python3/tensorflow/python/ops --write-unchanged-files tensorflow/python/ops/functional_ops.py): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 30.007s, Critical Path: 29.28s

Nb : The python2 build seems to work.