Issue 1:
Environment info

Operating System:

Linux 3.10.0-327.13.1.el7.x86_64

CentOS Linux release 7.2.1511 (Core)

Installed version of CUDA and cuDNN:

CUDA is 7.5 and cuDNN is 4.0.7

ls -l /usr/local/cuda/lib64/libcud*

-rw-r--r-- 1 root root 322936 Aug 15 2015 /usr/local/cuda/lib64/libcudadevrt.a

lrwxrwxrwx 1 root root 16 May 11 22:38 /usr/local/cuda/lib64/libcudart.so -> libcudart.so.7.5

lrwxrwxrwx 1 root root 19 May 11 22:38 /usr/local/cuda/lib64/libcudart.so.7.5 -> libcudart.so.7.5.18

-rwxr-xr-x 1 root root 383336 Aug 15 2015 /usr/local/cuda/lib64/libcudart.so.7.5.18

-rw-r--r-- 1 root root 720192 Aug 15 2015 /usr/local/cuda/lib64/libcudart_static.a

lrwxrwxrwx 1 root root 13 May 12 14:47 /usr/local/cuda/lib64/libcudnn.so -> libcudnn.so.4

lrwxrwxrwx 1 root root 17 May 12 14:47 /usr/local/cuda/lib64/libcudnn.so.4 -> libcudnn.so.4.0.7

-rwxr-xr-x 1 root root 61453024 Feb 8 17:12 /usr/local/cuda/lib64/libcudnn.so.4.0.7

-rw-r--r-- 1 root root 62025862 Feb 8 17:12 /usr/local/cuda/lib64/libcudnn_static.a

If installed from binary pip package, provide:

Which pip package you installed.

https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl

The output from python -c "import tensorflow; print(tensorflow.version)".

python -c "import tensorflow; print(tensorflow.version)"

I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcublas.so locally

I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcudnn.so locally

I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcufft.so locally

I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcuda.so.1 locally

I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcurand.so locally

0.8.0

If installed from sources, provide the commit hash:

Trying to build from sources the distributed version of tensorflow

Steps to reproduce

git clone --recurse-submodules https://github.com/tensorflow/tensorflow

The latest commit hash is 66edcda

installed bazel from binaries

sh bazel-0.2.2b-installer-linux-x86_64.sh

building with bazel fails

bazel build -c opt --config=cuda --verbose_failures --spawn_strategy=standalone --genrule_strategy=standalone //tensorflow/core/distributed_runtime/rpc:grpc_tensorflow_server

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: /root/tmp/tensorflow/google/protobuf/BUILD:29:1: undeclared inclusion(s) in rule '//google/protobuf:protobuf_lite':

this rule is missing dependency declarations for the following files included by 'google/protobuf/src/google/protobuf/stubs/once.cc':

'/include/c++/4.8.5/string'

'/include/c++/4.8.5/x86_64-redhat-linux/bits/c++config.h'

'/include/c++/4.8.5/x86_64-redhat-linux/bits/os_defines.h'

'/include/c++/4.8.5/x86_64-redhat-linux/bits/cpu_defines.h'

'/include/c++/4.8.5/bits/stringfwd.h'

'/include/c++/4.8.5/bits/memoryfwd.h'

'/include/c++/4.8.5/bits/char_traits.h'

'/include/c++/4.8.5/bits/stl_algobase.h'

'/include/c++/4.8.5/bits/functexcept.h'

'/include/c++/4.8.5/bits/exception_defines.h'

'/include/c++/4.8.5/bits/cpp_type_traits.h'

'/include/c++/4.8.5/ext/type_traits.h'

'/include/c++/4.8.5/ext/numeric_traits.h'

'/include/c++/4.8.5/bits/stl_pair.h'

'/include/c++/4.8.5/bits/move.h'

'/include/c++/4.8.5/bits/concept_check.h'

'/include/c++/4.8.5/type_traits'

'/include/c++/4.8.5/bits/stl_iterator_base_types.h'

'/include/c++/4.8.5/bits/stl_iterator_base_funcs.h'

'/include/c++/4.8.5/debug/debug.h'

'/include/c++/4.8.5/bits/stl_iterator.h'

'/include/c++/4.8.5/bits/postypes.h'

'/include/c++/4.8.5/cwchar'

'/lib/gcc/x86_64-redhat-linux/4.8.5/include/stdarg.h'

'/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h'

'/include/c++/4.8.5/cstdint'

'/lib/gcc/x86_64-redhat-linux/4.8.5/include/stdint.h'

'/include/c++/4.8.5/bits/allocator.h'

'/include/c++/4.8.5/x86_64-redhat-linux/bits/c++allocator.h'

'/include/c++/4.8.5/ext/new_allocator.h'

'/include/c++/4.8.5/new'

'/include/c++/4.8.5/exception'

'/include/c++/4.8.5/bits/atomic_lockfree_defines.h'

'/include/c++/4.8.5/bits/exception_ptr.h'

'/include/c++/4.8.5/bits/nested_exception.h'

'/include/c++/4.8.5/bits/localefwd.h'

'/include/c++/4.8.5/x86_64-redhat-linux/bits/c++locale.h'

'/include/c++/4.8.5/clocale'

'/include/c++/4.8.5/iosfwd'

'/include/c++/4.8.5/cctype'

'/include/c++/4.8.5/bits/ostream_insert.h'

'/include/c++/4.8.5/bits/cxxabi_forced.h'

'/include/c++/4.8.5/bits/stl_function.h'

'/include/c++/4.8.5/backward/binders.h'

'/include/c++/4.8.5/bits/range_access.h'

'/include/c++/4.8.5/bits/basic_string.h'

'/include/c++/4.8.5/ext/atomicity.h'

'/include/c++/4.8.5/x86_64-redhat-linux/bits/gthr.h'

'/include/c++/4.8.5/x86_64-redhat-linux/bits/gthr-default.h'

'/include/c++/4.8.5/x86_64-redhat-linux/bits/atomic_word.h'

'/include/c++/4.8.5/initializer_list'

'/include/c++/4.8.5/ext/string_conversions.h'

'/include/c++/4.8.5/cstdlib'

'/include/c++/4.8.5/cstdio'

'/include/c++/4.8.5/cerrno'

'/include/c++/4.8.5/bits/functional_hash.h'

'/include/c++/4.8.5/bits/hash_bytes.h'

'/include/c++/4.8.5/bits/basic_string.tcc'

'/include/c++/4.8.5/cstddef'

'/lib/gcc/x86_64-redhat-linux/4.8.5/include/limits.h'

'/lib/gcc/x86_64-redhat-linux/4.8.5/include/syslimits.h'

'/include/c++/4.8.5/utility'

'/include/c++/4.8.5/bits/stl_relops.h'.

Target //tensorflow/core/distributed_runtime/rpc:grpc_tensorflow_server failed to build

INFO: Elapsed time: 8.212s, Critical Path: 1.98s

rpm -qa | grep gcc

gcc-c++-4.8.5-4.el7.x86_64

libgcc-4.8.5-4.el7.x86_64

gcc-4.8.5-4.el7.x86_64

rpm -qa | grep glibc

glibc-common-2.17-106.el7_2.4.x86_64

glibc-devel-2.17-106.el7_2.4.x86_64

glibc-2.17-106.el7_2.4.x86_64

glibc-headers-2.17-106.el7_2.4.x86_64

I am not sure what are the dependencies. I saw that glibc 2.17 should at least meet the minimum.

What have you tried?

Nothing else yet. Trying to build bazel from source.

Any thoughts?

Issue 2:
The following commands were run on a Fedora 23 64 bits on Tensorflow master, but I get similar results on the 0.8 branch.

Using Bazel 0.2.1 on a laptop without graphics card:

$ bazel build -c opt --verbose_failures //tensorflow/tools/pip_package:build_pip_package
INFO: Found 1 target...
ERROR: /home/david/.cache/bazel/_bazel_david/47d00ffdd2fc0515138a34f138cebd63/external/re2/BUILD:9:1: undeclared inclusion(s) in rule '@re2//:re2':
this rule is missing dependency declarations for the following files included by 'external/re2/util/rune.cc':
'/lib/gcc/x86_64-redhat-linux/5.3.1/include/stdarg.h'
'/lib/gcc/x86_64-redhat-linux/5.3.1/include/stddef.h'
'/lib/gcc/x86_64-redhat-linux/5.3.1/include/stdint.h'.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 1.394s, Critical Path: 0.34s

On a machine with Cuda 7.5 and cudnn 5 installed, GCC 4.9 built locally (but I get the same results with system's GCC 5.3.1):

With bazel 0.1.1:

$ bazel build -c opt --config=cuda --spawn_strategy=standalone //tensorflow/tools/pip_package:build_pip_package
Warning: ignoring LD_PRELOAD in environment.
ERROR: /home/david/gits/tensorflow/WORKSPACE:16:6: First argument of load() is a path, not a label. It should start with a single slash if it is an absolute path..
ERROR: /home/david/gits/tensorflow/WORKSPACE:20:6: First argument of load() is a path, not a label. It should start with a single slash if it is an absolute path..
ERROR: WORKSPACE file could not be parsed.
ERROR: no such package 'external': Package 'external' contains errors.
INFO: Elapsed time: 0.065s

With Bazel 0.2.1:

bazel build -c opt --config=cuda --spawn_strategy=standalone //tensorflow/tools/pip_package:build_pip_package
Warning: ignoring LD_PRELOAD in environment.
Sending SIGTERM to previous Bazel server (pid=19634)... done.
.....
INFO: Found 1 target...
ERROR: /home/david/.cache/bazel/_bazel_david/47d00ffdd2fc0515138a34f138cebd63/external/re2/BUILD:9:1: undeclared inclusion(s) in rule '@re2//:re2':
this rule is missing dependency declarations for the following files included by 'external/re2/re2/perl_groups.cc':
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/stddef.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/stdarg.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/stdint.h'
'/home/david/.local/include/c++/4.9.3/ctime'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/c++config.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/os_defines.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/cpu_defines.h'
'/home/david/.local/include/c++/4.9.3/vector'
'/home/david/.local/include/c++/4.9.3/bits/stl_algobase.h'
'/home/david/.local/include/c++/4.9.3/bits/functexcept.h'
'/home/david/.local/include/c++/4.9.3/bits/exception_defines.h'
'/home/david/.local/include/c++/4.9.3/bits/cpp_type_traits.h'
'/home/david/.local/include/c++/4.9.3/ext/type_traits.h'
'/home/david/.local/include/c++/4.9.3/ext/numeric_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_pair.h'
'/home/david/.local/include/c++/4.9.3/bits/move.h'
'/home/david/.local/include/c++/4.9.3/bits/concept_check.h'
'/home/david/.local/include/c++/4.9.3/type_traits'
'/home/david/.local/include/c++/4.9.3/bits/stl_iterator_base_types.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_iterator_base_funcs.h'
'/home/david/.local/include/c++/4.9.3/debug/debug.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_iterator.h'
'/home/david/.local/include/c++/4.9.3/bits/ptr_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/predefined_ops.h'
'/home/david/.local/include/c++/4.9.3/bits/allocator.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/c++allocator.h'
'/home/david/.local/include/c++/4.9.3/ext/new_allocator.h'
'/home/david/.local/include/c++/4.9.3/new'
'/home/david/.local/include/c++/4.9.3/exception'
'/home/david/.local/include/c++/4.9.3/bits/atomic_lockfree_defines.h'
'/home/david/.local/include/c++/4.9.3/bits/exception_ptr.h'
'/home/david/.local/include/c++/4.9.3/bits/nested_exception.h'
'/home/david/.local/include/c++/4.9.3/bits/memoryfwd.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_construct.h'
'/home/david/.local/include/c++/4.9.3/ext/alloc_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/alloc_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_uninitialized.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_vector.h'
'/home/david/.local/include/c++/4.9.3/initializer_list'
'/home/david/.local/include/c++/4.9.3/bits/stl_bvector.h'
'/home/david/.local/include/c++/4.9.3/bits/functional_hash.h'
'/home/david/.local/include/c++/4.9.3/bits/hash_bytes.h'
'/home/david/.local/include/c++/4.9.3/bits/range_access.h'
'/home/david/.local/include/c++/4.9.3/bits/vector.tcc'
'/home/david/.local/include/c++/4.9.3/string'
'/home/david/.local/include/c++/4.9.3/bits/stringfwd.h'
'/home/david/.local/include/c++/4.9.3/bits/char_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/postypes.h'
'/home/david/.local/include/c++/4.9.3/cwchar'
'/home/david/.local/include/c++/4.9.3/cstdint'
'/home/david/.local/include/c++/4.9.3/bits/localefwd.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/c++locale.h'
'/home/david/.local/include/c++/4.9.3/clocale'
'/home/david/.local/include/c++/4.9.3/iosfwd'
'/home/david/.local/include/c++/4.9.3/cctype'
'/home/david/.local/include/c++/4.9.3/bits/ostream_insert.h'
'/home/david/.local/include/c++/4.9.3/bits/cxxabi_forced.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_function.h'
'/home/david/.local/include/c++/4.9.3/backward/binders.h'
'/home/david/.local/include/c++/4.9.3/bits/basic_string.h'
'/home/david/.local/include/c++/4.9.3/ext/atomicity.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/gthr.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/gthr-default.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/atomic_word.h'
'/home/david/.local/include/c++/4.9.3/ext/string_conversions.h'
'/home/david/.local/include/c++/4.9.3/cstdlib'
'/home/david/.local/include/c++/4.9.3/cstdio'
'/home/david/.local/include/c++/4.9.3/cerrno'
'/home/david/.local/include/c++/4.9.3/bits/basic_string.tcc'
'/home/david/.local/include/c++/4.9.3/algorithm'
'/home/david/.local/include/c++/4.9.3/utility'
'/home/david/.local/include/c++/4.9.3/bits/stl_relops.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_algo.h'
'/home/david/.local/include/c++/4.9.3/bits/algorithmfwd.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_heap.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_tempbuf.h'
'/home/david/.local/include/c++/4.9.3/random'
'/home/david/.local/include/c++/4.9.3/cmath'
'/home/david/.local/include/c++/4.9.3/limits'
'/home/david/.local/include/c++/4.9.3/bits/random.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/opt_random.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/x86intrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/ia32intrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/mmintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/xmmintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/mm_malloc.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/emmintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/pmmintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/tmmintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/ammintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/smmintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/popcntintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/wmmintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/immintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/avxintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/avx2intrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/avx512fintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/avx512erintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/avx512pfintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/avx512cdintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/shaintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/lzcntintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/bmiintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/bmi2intrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/fmaintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/f16cintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/rtmintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/xtestintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/mm3dnow.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/prfchwintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/fma4intrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/xopintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/lwpintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/tbmintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/rdseedintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/fxsrintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/xsaveintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/xsaveoptintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/adxintrin.h'
'/home/david/.local/include/c++/4.9.3/bits/random.tcc'
'/home/david/.local/include/c++/4.9.3/numeric'
'/home/david/.local/include/c++/4.9.3/bits/stl_numeric.h'
'/home/david/.local/include/c++/4.9.3/map'
'/home/david/.local/include/c++/4.9.3/bits/stl_tree.h'
'/home/david/.local/include/c++/4.9.3/ext/aligned_buffer.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_map.h'
'/home/david/.local/include/c++/4.9.3/tuple'
'/home/david/.local/include/c++/4.9.3/array'
'/home/david/.local/include/c++/4.9.3/stdexcept'
'/home/david/.local/include/c++/4.9.3/bits/uses_allocator.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_multimap.h'
'/home/david/.local/include/c++/4.9.3/stack'
'/home/david/.local/include/c++/4.9.3/deque'
'/home/david/.local/include/c++/4.9.3/bits/stl_deque.h'
'/home/david/.local/include/c++/4.9.3/bits/deque.tcc'
'/home/david/.local/include/c++/4.9.3/bits/stl_stack.h'
'/home/david/.local/include/c++/4.9.3/ostream'
'/home/david/.local/include/c++/4.9.3/ios'
'/home/david/.local/include/c++/4.9.3/bits/ios_base.h'
'/home/david/.local/include/c++/4.9.3/bits/locale_classes.h'
'/home/david/.local/include/c++/4.9.3/bits/locale_classes.tcc'
'/home/david/.local/include/c++/4.9.3/streambuf'
'/home/david/.local/include/c++/4.9.3/bits/streambuf.tcc'
'/home/david/.local/include/c++/4.9.3/bits/basic_ios.h'
'/home/david/.local/include/c++/4.9.3/bits/locale_facets.h'
'/home/david/.local/include/c++/4.9.3/cwctype'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/ctype_base.h'
'/home/david/.local/include/c++/4.9.3/bits/streambuf_iterator.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/ctype_inline.h'
'/home/david/.local/include/c++/4.9.3/bits/locale_facets.tcc'
'/home/david/.local/include/c++/4.9.3/bits/basic_ios.tcc'
'/home/david/.local/include/c++/4.9.3/bits/ostream.tcc'
'/home/david/.local/include/c++/4.9.3/set'
'/home/david/.local/include/c++/4.9.3/bits/stl_set.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_multiset.h'
'/home/david/.local/include/c++/4.9.3/tr1/unordered_set'
'/home/david/.local/include/c++/4.9.3/tr1/type_traits'
'/home/david/.local/include/c++/4.9.3/tr1/functional_hash.h'
'/home/david/.local/include/c++/4.9.3/tr1/hashtable.h'
'/home/david/.local/include/c++/4.9.3/tr1/hashtable_policy.h'
'/home/david/.local/include/c++/4.9.3/tr1/unordered_set.h'
'/home/david/.local/include/c++/4.9.3/sstream'
'/home/david/.local/include/c++/4.9.3/istream'
'/home/david/.local/include/c++/4.9.3/bits/istream.tcc'
'/home/david/.local/include/c++/4.9.3/bits/sstream.tcc'.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.

bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer
Warning: ignoring LD_PRELOAD in environment.
INFO: Found 1 target...
ERROR: /home/david/.cache/bazel/_bazel_david/47d00ffdd2fc0515138a34f138cebd63/external/re2/BUILD:9:1: undeclared inclusion(s) in rule '@re2//:re2':
this rule is missing dependency declarations for the following files included by 'external/re2/util/valgrind.cc':
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/stddef.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/stdarg.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/stdint.h'
'/home/david/.local/include/c++/4.9.3/ctime'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/c++config.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/os_defines.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/cpu_defines.h'
'/home/david/.local/include/c++/4.9.3/vector'
'/home/david/.local/include/c++/4.9.3/bits/stl_algobase.h'
'/home/david/.local/include/c++/4.9.3/bits/functexcept.h'
'/home/david/.local/include/c++/4.9.3/bits/exception_defines.h'
'/home/david/.local/include/c++/4.9.3/bits/cpp_type_traits.h'
'/home/david/.local/include/c++/4.9.3/ext/type_traits.h'
'/home/david/.local/include/c++/4.9.3/ext/numeric_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_pair.h'
'/home/david/.local/include/c++/4.9.3/bits/move.h'
'/home/david/.local/include/c++/4.9.3/bits/concept_check.h'
'/home/david/.local/include/c++/4.9.3/type_traits'
'/home/david/.local/include/c++/4.9.3/bits/stl_iterator_base_types.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_iterator_base_funcs.h'
'/home/david/.local/include/c++/4.9.3/debug/debug.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_iterator.h'
'/home/david/.local/include/c++/4.9.3/bits/ptr_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/predefined_ops.h'
'/home/david/.local/include/c++/4.9.3/bits/allocator.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/c++allocator.h'
'/home/david/.local/include/c++/4.9.3/ext/new_allocator.h'
'/home/david/.local/include/c++/4.9.3/new'
'/home/david/.local/include/c++/4.9.3/exception'
'/home/david/.local/include/c++/4.9.3/bits/atomic_lockfree_defines.h'
'/home/david/.local/include/c++/4.9.3/bits/exception_ptr.h'
'/home/david/.local/include/c++/4.9.3/bits/nested_exception.h'
'/home/david/.local/include/c++/4.9.3/bits/memoryfwd.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_construct.h'
'/home/david/.local/include/c++/4.9.3/ext/alloc_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/alloc_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_uninitialized.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_vector.h'
'/home/david/.local/include/c++/4.9.3/initializer_list'
'/home/david/.local/include/c++/4.9.3/bits/stl_bvector.h'
'/home/david/.local/include/c++/4.9.3/bits/functional_hash.h'
'/home/david/.local/include/c++/4.9.3/bits/hash_bytes.h'
'/home/david/.local/include/c++/4.9.3/bits/range_access.h'
'/home/david/.local/include/c++/4.9.3/bits/vector.tcc'
'/home/david/.local/include/c++/4.9.3/string'
'/home/david/.local/include/c++/4.9.3/bits/stringfwd.h'
'/home/david/.local/include/c++/4.9.3/bits/char_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/postypes.h'
'/home/david/.local/include/c++/4.9.3/cwchar'
'/home/david/.local/include/c++/4.9.3/cstdint'
'/home/david/.local/include/c++/4.9.3/bits/localefwd.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/c++locale.h'
'/home/david/.local/include/c++/4.9.3/clocale'
'/home/david/.local/include/c++/4.9.3/iosfwd'
'/home/david/.local/include/c++/4.9.3/cctype'
'/home/david/.local/include/c++/4.9.3/bits/ostream_insert.h'
'/home/david/.local/include/c++/4.9.3/bits/cxxabi_forced.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_function.h'
'/home/david/.local/include/c++/4.9.3/backward/binders.h'
'/home/david/.local/include/c++/4.9.3/bits/basic_string.h'
'/home/david/.local/include/c++/4.9.3/ext/atomicity.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/gthr.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/gthr-default.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/atomic_word.h'
'/home/david/.local/include/c++/4.9.3/ext/string_conversions.h'
'/home/david/.local/include/c++/4.9.3/cstdlib'
'/home/david/.local/include/c++/4.9.3/cstdio'
'/home/david/.local/include/c++/4.9.3/cerrno'
'/home/david/.local/include/c++/4.9.3/bits/basic_string.tcc'
'/home/david/.local/include/c++/4.9.3/algorithm'
'/home/david/.local/include/c++/4.9.3/utility'
'/home/david/.local/include/c++/4.9.3/bits/stl_relops.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_algo.h'
'/home/david/.local/include/c++/4.9.3/bits/algorithmfwd.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_heap.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_tempbuf.h'
'/home/david/.local/include/c++/4.9.3/random'
'/home/david/.local/include/c++/4.9.3/cmath'
'/home/david/.local/include/c++/4.9.3/limits'
'/home/david/.local/include/c++/4.9.3/bits/random.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/opt_random.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/x86intrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/ia32intrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/mmintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/xmmintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/mm_malloc.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/emmintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/pmmintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/tmmintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/ammintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/smmintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/popcntintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/wmmintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/immintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/avxintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/avx2intrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/avx512fintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/avx512erintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/avx512pfintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/avx512cdintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/shaintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/lzcntintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/bmiintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/bmi2intrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/fmaintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/f16cintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/rtmintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/xtestintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/mm3dnow.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/prfchwintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/fma4intrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/xopintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/lwpintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/tbmintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/rdseedintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/fxsrintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/xsaveintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/xsaveoptintrin.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/adxintrin.h'
'/home/david/.local/include/c++/4.9.3/bits/random.tcc'
'/home/david/.local/include/c++/4.9.3/numeric'
'/home/david/.local/include/c++/4.9.3/bits/stl_numeric.h'
'/home/david/.local/include/c++/4.9.3/map'
'/home/david/.local/include/c++/4.9.3/bits/stl_tree.h'
'/home/david/.local/include/c++/4.9.3/ext/aligned_buffer.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_map.h'
'/home/david/.local/include/c++/4.9.3/tuple'
'/home/david/.local/include/c++/4.9.3/array'
'/home/david/.local/include/c++/4.9.3/stdexcept'
'/home/david/.local/include/c++/4.9.3/bits/uses_allocator.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_multimap.h'
'/home/david/.local/include/c++/4.9.3/stack'
'/home/david/.local/include/c++/4.9.3/deque'
'/home/david/.local/include/c++/4.9.3/bits/stl_deque.h'
'/home/david/.local/include/c++/4.9.3/bits/deque.tcc'
'/home/david/.local/include/c++/4.9.3/bits/stl_stack.h'
'/home/david/.local/include/c++/4.9.3/ostream'
'/home/david/.local/include/c++/4.9.3/ios'
'/home/david/.local/include/c++/4.9.3/bits/ios_base.h'
'/home/david/.local/include/c++/4.9.3/bits/locale_classes.h'
'/home/david/.local/include/c++/4.9.3/bits/locale_classes.tcc'
'/home/david/.local/include/c++/4.9.3/streambuf'
'/home/david/.local/include/c++/4.9.3/bits/streambuf.tcc'
'/home/david/.local/include/c++/4.9.3/bits/basic_ios.h'
'/home/david/.local/include/c++/4.9.3/bits/locale_facets.h'
'/home/david/.local/include/c++/4.9.3/cwctype'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/ctype_base.h'
'/home/david/.local/include/c++/4.9.3/bits/streambuf_iterator.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/ctype_inline.h'
'/home/david/.local/include/c++/4.9.3/bits/locale_facets.tcc'
'/home/david/.local/include/c++/4.9.3/bits/basic_ios.tcc'
'/home/david/.local/include/c++/4.9.3/bits/ostream.tcc'
'/home/david/.local/include/c++/4.9.3/set'
'/home/david/.local/include/c++/4.9.3/bits/stl_set.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_multiset.h'
'/home/david/.local/include/c++/4.9.3/tr1/unordered_set'
'/home/david/.local/include/c++/4.9.3/tr1/type_traits'
'/home/david/.local/include/c++/4.9.3/tr1/functional_hash.h'
'/home/david/.local/include/c++/4.9.3/tr1/hashtable.h'
'/home/david/.local/include/c++/4.9.3/tr1/hashtable_policy.h'
'/home/david/.local/include/c++/4.9.3/tr1/unordered_set.h'
'/home/david/.local/include/c++/4.9.3/sstream'
'/home/david/.local/include/c++/4.9.3/istream'
'/home/david/.local/include/c++/4.9.3/bits/istream.tcc'
'/home/david/.local/include/c++/4.9.3/bits/sstream.tcc'.
Target //tensorflow/cc:tutorials_example_trainer failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 2.889s, Critical Path: 2.49s

With Bazel 0.1.5:

bazel build -c opt --config=cuda --verbose_failures //tensorflow/cc:tutorials_example_trainer
Warning: ignoring LD_PRELOAD in environment.
INFO: Found 1 target...
ERROR: /home/david/gits/tensorflow/google/protobuf/BUILD:64:1: undeclared inclusion(s) in rule '//google/protobuf:protobuf':
this rule is missing dependency declarations for the following files included by 'google/protobuf/src/google/protobuf/io/strtod.cc':
'/home/david/.local/include/c++/4.9.3/cstdio'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/c++config.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/os_defines.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/cpu_defines.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/stddef.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/stdarg.h'
'/home/david/.local/include/c++/4.9.3/cstring'
'/home/david/.local/include/c++/4.9.3/limits'
'/home/david/.local/include/c++/4.9.3/string'
'/home/david/.local/include/c++/4.9.3/bits/stringfwd.h'
'/home/david/.local/include/c++/4.9.3/bits/memoryfwd.h'
'/home/david/.local/include/c++/4.9.3/bits/char_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_algobase.h'
'/home/david/.local/include/c++/4.9.3/bits/functexcept.h'
'/home/david/.local/include/c++/4.9.3/bits/exception_defines.h'
'/home/david/.local/include/c++/4.9.3/bits/cpp_type_traits.h'
'/home/david/.local/include/c++/4.9.3/ext/type_traits.h'
'/home/david/.local/include/c++/4.9.3/ext/numeric_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_pair.h'
'/home/david/.local/include/c++/4.9.3/bits/move.h'
'/home/david/.local/include/c++/4.9.3/bits/concept_check.h'
'/home/david/.local/include/c++/4.9.3/type_traits'
'/home/david/.local/include/c++/4.9.3/bits/stl_iterator_base_types.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_iterator_base_funcs.h'
'/home/david/.local/include/c++/4.9.3/debug/debug.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_iterator.h'
'/home/david/.local/include/c++/4.9.3/bits/ptr_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/predefined_ops.h'
'/home/david/.local/include/c++/4.9.3/bits/postypes.h'
'/home/david/.local/include/c++/4.9.3/cwchar'
'/home/david/.local/include/c++/4.9.3/cstdint'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/stdint.h'
'/home/david/.local/include/c++/4.9.3/bits/allocator.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/c++allocator.h'
'/home/david/.local/include/c++/4.9.3/ext/new_allocator.h'
'/home/david/.local/include/c++/4.9.3/new'
'/home/david/.local/include/c++/4.9.3/exception'
'/home/david/.local/include/c++/4.9.3/bits/atomic_lockfree_defines.h'
'/home/david/.local/include/c++/4.9.3/bits/exception_ptr.h'
'/home/david/.local/include/c++/4.9.3/bits/nested_exception.h'
'/home/david/.local/include/c++/4.9.3/bits/localefwd.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/c++locale.h'
'/home/david/.local/include/c++/4.9.3/clocale'
'/home/david/.local/include/c++/4.9.3/iosfwd'
'/home/david/.local/include/c++/4.9.3/cctype'
'/home/david/.local/include/c++/4.9.3/bits/ostream_insert.h'
'/home/david/.local/include/c++/4.9.3/bits/cxxabi_forced.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_function.h'
'/home/david/.local/include/c++/4.9.3/backward/binders.h'
'/home/david/.local/include/c++/4.9.3/bits/range_access.h'
'/home/david/.local/include/c++/4.9.3/bits/basic_string.h'
'/home/david/.local/include/c++/4.9.3/ext/atomicity.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/gthr.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/gthr-default.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/atomic_word.h'
'/home/david/.local/include/c++/4.9.3/initializer_list'
'/home/david/.local/include/c++/4.9.3/ext/string_conversions.h'
'/home/david/.local/include/c++/4.9.3/cstdlib'
'/home/david/.local/include/c++/4.9.3/cerrno'
'/home/david/.local/include/c++/4.9.3/bits/functional_hash.h'
'/home/david/.local/include/c++/4.9.3/bits/hash_bytes.h'
'/home/david/.local/include/c++/4.9.3/bits/basic_string.tcc'
'/home/david/.local/include/c++/4.9.3/cstddef'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include-fixed/limits.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include-fixed/syslimits.h'
'/home/david/.local/include/c++/4.9.3/utility'
'/home/david/.local/include/c++/4.9.3/bits/stl_relops.h'.
Target //tensorflow/cc:tutorials_example_trainer failed to build
INFO: Elapsed time: 2.634s, Critical Path: 2.21s

$ bazel build -c opt --config=cuda --verbose_failures --spawn_strategy=standalone //tensorflow/cc:tutorials_example_trainer
Warning: ignoring LD_PRELOAD in environment.
INFO: Found 1 target...
ERROR: /home/david/gits/tensorflow/google/protobuf/BUILD:64:1: undeclared inclusion(s) in rule '//google/protobuf:protobuf':
this rule is missing dependency declarations for the following files included by 'google/protobuf/src/google/protobuf/stubs/substitute.cc':
'/home/david/.local/include/c++/4.9.3/string'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/c++config.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/os_defines.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/cpu_defines.h'
'/home/david/.local/include/c++/4.9.3/bits/stringfwd.h'
'/home/david/.local/include/c++/4.9.3/bits/memoryfwd.h'
'/home/david/.local/include/c++/4.9.3/bits/char_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_algobase.h'
'/home/david/.local/include/c++/4.9.3/bits/functexcept.h'
'/home/david/.local/include/c++/4.9.3/bits/exception_defines.h'
'/home/david/.local/include/c++/4.9.3/bits/cpp_type_traits.h'
'/home/david/.local/include/c++/4.9.3/ext/type_traits.h'
'/home/david/.local/include/c++/4.9.3/ext/numeric_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_pair.h'
'/home/david/.local/include/c++/4.9.3/bits/move.h'
'/home/david/.local/include/c++/4.9.3/bits/concept_check.h'
'/home/david/.local/include/c++/4.9.3/type_traits'
'/home/david/.local/include/c++/4.9.3/bits/stl_iterator_base_types.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_iterator_base_funcs.h'
'/home/david/.local/include/c++/4.9.3/debug/debug.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_iterator.h'
'/home/david/.local/include/c++/4.9.3/bits/ptr_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/predefined_ops.h'
'/home/david/.local/include/c++/4.9.3/bits/postypes.h'
'/home/david/.local/include/c++/4.9.3/cwchar'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/stdarg.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/stddef.h'
'/home/david/.local/include/c++/4.9.3/cstdint'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/stdint.h'
'/home/david/.local/include/c++/4.9.3/bits/allocator.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/c++allocator.h'
'/home/david/.local/include/c++/4.9.3/ext/new_allocator.h'
'/home/david/.local/include/c++/4.9.3/new'
'/home/david/.local/include/c++/4.9.3/exception'
'/home/david/.local/include/c++/4.9.3/bits/atomic_lockfree_defines.h'
'/home/david/.local/include/c++/4.9.3/bits/exception_ptr.h'
'/home/david/.local/include/c++/4.9.3/bits/nested_exception.h'
'/home/david/.local/include/c++/4.9.3/bits/localefwd.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/c++locale.h'
'/home/david/.local/include/c++/4.9.3/clocale'
'/home/david/.local/include/c++/4.9.3/iosfwd'
'/home/david/.local/include/c++/4.9.3/cctype'
'/home/david/.local/include/c++/4.9.3/bits/ostream_insert.h'
'/home/david/.local/include/c++/4.9.3/bits/cxxabi_forced.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_function.h'
'/home/david/.local/include/c++/4.9.3/backward/binders.h'
'/home/david/.local/include/c++/4.9.3/bits/range_access.h'
'/home/david/.local/include/c++/4.9.3/bits/basic_string.h'
'/home/david/.local/include/c++/4.9.3/ext/atomicity.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/gthr.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/gthr-default.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/atomic_word.h'
'/home/david/.local/include/c++/4.9.3/initializer_list'
'/home/david/.local/include/c++/4.9.3/ext/string_conversions.h'
'/home/david/.local/include/c++/4.9.3/cstdlib'
'/home/david/.local/include/c++/4.9.3/cstdio'
'/home/david/.local/include/c++/4.9.3/cerrno'
'/home/david/.local/include/c++/4.9.3/bits/functional_hash.h'
'/home/david/.local/include/c++/4.9.3/bits/hash_bytes.h'
'/home/david/.local/include/c++/4.9.3/bits/basic_string.tcc'
'/home/david/.local/include/c++/4.9.3/cstddef'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include-fixed/limits.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include-fixed/syslimits.h'
'/home/david/.local/include/c++/4.9.3/utility'
'/home/david/.local/include/c++/4.9.3/bits/stl_relops.h'
'/home/david/.local/include/c++/4.9.3/vector'
'/home/david/.local/include/c++/4.9.3/bits/stl_construct.h'
'/home/david/.local/include/c++/4.9.3/ext/alloc_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/alloc_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_uninitialized.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_vector.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_bvector.h'
'/home/david/.local/include/c++/4.9.3/bits/vector.tcc'
'/home/david/.local/include/c++/4.9.3/limits'
'/home/david/.local/include/c++/4.9.3/unordered_map'
'/home/david/.local/include/c++/4.9.3/tuple'
'/home/david/.local/include/c++/4.9.3/array'
'/home/david/.local/include/c++/4.9.3/stdexcept'
'/home/david/.local/include/c++/4.9.3/bits/uses_allocator.h'
'/home/david/.local/include/c++/4.9.3/ext/aligned_buffer.h'
'/home/david/.local/include/c++/4.9.3/bits/hashtable.h'
'/home/david/.local/include/c++/4.9.3/bits/hashtable_policy.h'
'/home/david/.local/include/c++/4.9.3/bits/unordered_map.h'
'/home/david/.local/include/c++/4.9.3/unordered_set'
'/home/david/.local/include/c++/4.9.3/bits/unordered_set.h'.
Target //tensorflow/cc:tutorials_example_trainer failed to build
ERROR: /home/david/gits/tensorflow/tensorflow/cc/BUILD:28:1 undeclared inclusion(s) in rule '//google/protobuf:protobuf':
this rule is missing dependency declarations for the following files included by 'google/protobuf/src/google/protobuf/stubs/substitute.cc':
'/home/david/.local/include/c++/4.9.3/string'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/c++config.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/os_defines.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/cpu_defines.h'
'/home/david/.local/include/c++/4.9.3/bits/stringfwd.h'
'/home/david/.local/include/c++/4.9.3/bits/memoryfwd.h'
'/home/david/.local/include/c++/4.9.3/bits/char_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_algobase.h'
'/home/david/.local/include/c++/4.9.3/bits/functexcept.h'
'/home/david/.local/include/c++/4.9.3/bits/exception_defines.h'
'/home/david/.local/include/c++/4.9.3/bits/cpp_type_traits.h'
'/home/david/.local/include/c++/4.9.3/ext/type_traits.h'
'/home/david/.local/include/c++/4.9.3/ext/numeric_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_pair.h'
'/home/david/.local/include/c++/4.9.3/bits/move.h'
'/home/david/.local/include/c++/4.9.3/bits/concept_check.h'
'/home/david/.local/include/c++/4.9.3/type_traits'
'/home/david/.local/include/c++/4.9.3/bits/stl_iterator_base_types.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_iterator_base_funcs.h'
'/home/david/.local/include/c++/4.9.3/debug/debug.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_iterator.h'
'/home/david/.local/include/c++/4.9.3/bits/ptr_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/predefined_ops.h'
'/home/david/.local/include/c++/4.9.3/bits/postypes.h'
'/home/david/.local/include/c++/4.9.3/cwchar'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/stdarg.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/stddef.h'
'/home/david/.local/include/c++/4.9.3/cstdint'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/stdint.h'
'/home/david/.local/include/c++/4.9.3/bits/allocator.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/c++allocator.h'
'/home/david/.local/include/c++/4.9.3/ext/new_allocator.h'
'/home/david/.local/include/c++/4.9.3/new'
'/home/david/.local/include/c++/4.9.3/exception'
'/home/david/.local/include/c++/4.9.3/bits/atomic_lockfree_defines.h'
'/home/david/.local/include/c++/4.9.3/bits/exception_ptr.h'
'/home/david/.local/include/c++/4.9.3/bits/nested_exception.h'
'/home/david/.local/include/c++/4.9.3/bits/localefwd.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/c++locale.h'
'/home/david/.local/include/c++/4.9.3/clocale'
'/home/david/.local/include/c++/4.9.3/iosfwd'
'/home/david/.local/include/c++/4.9.3/cctype'
'/home/david/.local/include/c++/4.9.3/bits/ostream_insert.h'
'/home/david/.local/include/c++/4.9.3/bits/cxxabi_forced.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_function.h'
'/home/david/.local/include/c++/4.9.3/backward/binders.h'
'/home/david/.local/include/c++/4.9.3/bits/range_access.h'
'/home/david/.local/include/c++/4.9.3/bits/basic_string.h'
'/home/david/.local/include/c++/4.9.3/ext/atomicity.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/gthr.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/gthr-default.h'
'/home/david/.local/include/c++/4.9.3/x86_64-unknown-linux-gnu/bits/atomic_word.h'
'/home/david/.local/include/c++/4.9.3/initializer_list'
'/home/david/.local/include/c++/4.9.3/ext/string_conversions.h'
'/home/david/.local/include/c++/4.9.3/cstdlib'
'/home/david/.local/include/c++/4.9.3/cstdio'
'/home/david/.local/include/c++/4.9.3/cerrno'
'/home/david/.local/include/c++/4.9.3/bits/functional_hash.h'
'/home/david/.local/include/c++/4.9.3/bits/hash_bytes.h'
'/home/david/.local/include/c++/4.9.3/bits/basic_string.tcc'
'/home/david/.local/include/c++/4.9.3/cstddef'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include-fixed/limits.h'
'/home/david/.local/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include-fixed/syslimits.h'
'/home/david/.local/include/c++/4.9.3/utility'
'/home/david/.local/include/c++/4.9.3/bits/stl_relops.h'
'/home/david/.local/include/c++/4.9.3/vector'
'/home/david/.local/include/c++/4.9.3/bits/stl_construct.h'
'/home/david/.local/include/c++/4.9.3/ext/alloc_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/alloc_traits.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_uninitialized.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_vector.h'
'/home/david/.local/include/c++/4.9.3/bits/stl_bvector.h'
'/home/david/.local/include/c++/4.9.3/bits/vector.tcc'
'/home/david/.local/include/c++/4.9.3/limits'
'/home/david/.local/include/c++/4.9.3/unordered_map'
'/home/david/.local/include/c++/4.9.3/tuple'
'/home/david/.local/include/c++/4.9.3/array'
'/home/david/.local/include/c++/4.9.3/stdexcept'
'/home/david/.local/include/c++/4.9.3/bits/uses_allocator.h'
'/home/david/.local/include/c++/4.9.3/ext/aligned_buffer.h'
'/home/david/.local/include/c++/4.9.3/bits/hashtable.h'
'/home/david/.local/include/c++/4.9.3/bits/hashtable_policy.h'
'/home/david/.local/include/c++/4.9.3/bits/unordered_map.h'
'/home/david/.local/include/c++/4.9.3/unordered_set'
'/home/david/.local/include/c++/4.9.3/bits/unordered_set.h'.
INFO: Elapsed time: 0.999s, Critical Path: 0.80s

Bazel 2.2b fails when tensorflow tries to parse the version:

bazel build -c opt --config=cuda --verbose_failures --spawn_strategy=standalone //tensorflow/cc:tutorials_example_trainer
Warning: ignoring LD_PRELOAD in environment.
Sending SIGTERM to previous Bazel server (pid=24216)... done.
......
ERROR: /home/david/gits/tensorflow/WORKSPACE:21:1: Traceback (most recent call last):
File "/home/david/gits/tensorflow/WORKSPACE", line 21
check_version("0.1.4")
File "/home/david/gits/tensorflow/tensorflow/tensorflow.bzl", line 22, in check_version
_parse_bazel_version(native.bazel_version)
File "/home/david/gits/tensorflow/tensorflow/tensorflow.bzl", line 15, in _parse_bazel_version
int(number)
invalid literal for int(): "2b".
ERROR: Error evaluating WORKSPACE file.
ERROR: no such package 'external': Package 'external' contains errors.
INFO: Elapsed time: 0.610s

Correcting that mistake I get a bulld error again:

bazel build -c opt --config=cuda --spawn_strategy=standalone --verbose_failures //tensorflow/tools/pip_package:build_pip_package
Warning: ignoring LD_PRELOAD in environment.
ERROR: no such package 'external': Package 'external' contains errors.
INFO: Elapsed time: 0.084s

How can I get it to work? I am interested in building Tensorflow with vector instructions for my laptop and linking against the latest cudnn for my workstation.