Issue 1:
I am installing tensorflow 1.0.0-rc0 with GPU, the environment is:

Operating System: Ubuntu 14.04.4 LTS

gcc version: 4.7

bazel:0.4.5

python 3.6

CUDA 8.0

cuDNN:5.1.5

cuDNN is installed at /home/scs4450/CaffeInstall/cuda ranther than /usr/local/cuda-8.0

when i ./configure my tensorflow, i get the error like this:

scs4450@scs4450:~/tensorflow-1.0.0-rc0$ bazel build --copt=-march=native -c opt --config=cuda --verbose_failures //tensorflow/tools/pip_package:build_pip_package

INFO: Found 1 target...

ERROR: /home/scs4450/.cache/bazel/bazel_scs4450/a3c5204dbd511f84e92c40ad5244a5e1/external/protobuf/BUILD:334:1: C++ compilation of rule '@protobuf//:protoc' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command

(cd /home/scs4450/.cache/bazel/bazel_scs4450/a3c5204dbd511f84e92c40ad5244a5e1/execroot/tensorflow-1.0.0-rc0 &&

exec env -

LD_LIBRARY_PATH=:/usr/local/cuda/lib64

PATH=/home/scs4450/anaconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/cuda/bin

external/local_config_cuda/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-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections -g0 '-std=c++11' -MD -MF bazel-out/host/bin/external/protobuf/objs/protoc/external/protobuf/src/google/protobuf/compiler/main.d '-frandom-seed=bazel-out/host/bin/external/protobuf/objs/protoc/external/protobuf/src/google/protobuf/compiler/main.o' -iquote external/protobuf -iquote bazel-out/host/genfiles/external/protobuf -iquote external/bazel_tools -iquote bazel-out/host/genfiles/external/bazel_tools -isystem external/protobuf/src -isystem bazel-out/host/genfiles/external/protobuf/src -isystem external/bazel_tools/tools/cpp/gcc3 -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE="redacted"' '-D__TIMESTAMP="redacted"' '-D__TIME__="redacted"' -fno-canonical-system-headers -c external/protobuf/src/google/protobuf/compiler/main.cc -o bazel-out/host/bin/external/protobuf/_objs/protoc/external/protobuf/src/google/protobuf/compiler/main.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.

gcc: error: unrecognized command line option '-fno-canonical-system-headers'

Target //tensorflow/tools/pip_package:build_pip_package failed to build

INFO: Elapsed time: 0.692s, Critical Path: 0.16s

Issue 2:
when I run :

bazel build --config=opt --config=cuda --verbose_failures //tensorflow/tools/pip_package:build_pip_package

INFO: Found 1 target...

ERROR: /home/qs/.cache/bazel/bazel_qs/081cd1dbca77dcff65c775e7e860e873/external/farmhash_archive/BUILD.bazel:12:1: C++ compilation of rule '@farmhash_archive//:farmhash' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command

(cd /home/qs/.cache/bazel/bazel_qs/081cd1dbca77dcff65c775e7e860e873/execroot/tensorflow &&

exec env -

LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64/:/usr/lib32/:/usr/lib/x86_64-linux-gnu/::/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64

PATH=/bin:/usr/bin:/home/qs/mysoft/jdk1.8/bin

external/local_config_cuda/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-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections -g0 '-std=c++11' -MD -MF bazel-out/host/bin/external/farmhash_archive/objs/farmhash/external/farmhash_archive/src/farmhash.d '-frandom-seed=bazel-out/host/bin/external/farmhash_archive/objs/farmhash/external/farmhash_archive/src/farmhash.o' -iquote external/farmhash_archive -iquote bazel-out/host/genfiles/external/farmhash_archive -iquote external/bazel_tools -iquote bazel-out/host/genfiles/external/bazel_tools -isystem external/farmhash_archive/src -isystem bazel-out/host/genfiles/external/farmhash_archive/src -isystem external/bazel_tools/tools/cpp/gcc3 -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE="redacted"' '-D__TIMESTAMP="redacted"' '-D__TIME__="redacted"' -fno-canonical-system-headers -c external/farmhash_archive/src/farmhash.cc -o bazel-out/host/bin/external/farmhash_archive/_objs/farmhash/external/farmhash_archive/src/farmhash.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.

gcc: error: unrecognized command line option '-fno-canonical-system-headers'

Target //tensorflow/tools/pip_package:build_pip_package failed to build

INFO: Elapsed time: 1.003s, Critical Path: 0.49s

How to solve this problem?