Issue 1:
NOTE: Only file GitHub issues for bugs and feature requests. All other topics will be closed.

For general support from the community, see StackOverflow.

To make bugs and feature requests more easy to find and organize, we close issues that are deemed

out of scope for GitHub Issues and point people to StackOverflow.

For bugs or installation issues, please provide the following information.

The more information you provide, the more easily we will be able to offer

help and advice.

What related GitHub issues or StackOverflow threads have you found by searching the web for your problem?

Environment info

Operating System:

Installed version of CUDA and cuDNN:

(please attach the output of ls -l /path/to/cuda/lib/libcud*):

If installed from binary pip package, provide:

A link to the pip package you installed:

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

If installed from source, provide

The commit hash (git rev-parse HEAD)

The output of bazel version

If possible, provide a minimal reproducible example (We usually don't have time to read hundreds of lines of your code)

What other attempted solutions have you tried?

Logs or other output that would be helpful

(If logs are large, please upload as attachment or provide link).

bazel build -c opt --config=cuda //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.

WARNING: /home/ammalik/TensorFlow/tensorflow/util/python/BUILD:11:16: in includes attribute of cc_library rule //util/python:python_headers: 'python_include' resolves to 'util/python/python_include' not in 'third_party'. This will be an error in the future.

INFO: Found 1 target...

ERROR: /home/ammalik/.cache/bazel/_bazel_ammalik/27908a9a0ff0347c2aebe63a8fa99002/external/zlib_archive/BUILD:7:1: undeclared inclusion(s) in rule '@zlib_archive//:zlib':

this rule is missing dependency declarations for the following files included by 'external/zlib_archive/zlib-1.2.8/compress.c':

'/opt/local/gcc/6.2.0/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include-fixed/limits.h'

'/opt/local/gcc/6.2.0/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include-fixed/syslimits.h'

'/opt/local/gcc/6.2.0/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/stddef.h'

'/opt/local/gcc/6.2.0/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/stdarg.h'.

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: 962.954s, Critical Path: 0.69s

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.