<p dir="auto">I am installing tensorflow 1.0.0-rc0 with GPU, the environment is:<br>
Operating System: Ubuntu 14.04.4 LTS<br>
gcc version: 4.7<br>
bazel:0.4.5<br>
python 3.6<br>
CUDA 8.0<br>
cuDNN:5.1.5<br>
cuDNN is installed at /home/scs4450/CaffeInstall/cuda ranther than /usr/local/cuda-8.0<br>
when i ./configure my tensorflow, i get the error like this:<br>
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</p>
<p dir="auto">INFO: Found 1 target...<br>
ERROR: /home/scs4450/.cache/bazel/<em>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<br>
(cd /home/scs4450/.cache/bazel/<em>bazel_scs4450/a3c5204dbd511f84e92c40ad5244a5e1/execroot/tensorflow-1.0.0-rc0 &amp;&amp; <br>
exec env - <br>
LD_LIBRARY_PATH=:/usr/local/cuda/lib64 <br>
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 <br>
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/<em>objs/protoc/external/protobuf/src/google/protobuf/compiler/main.d '-frandom-seed=bazel-out/host/bin/external/protobuf/<em>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</em></em>="redacted"' '-D__TIMESTAMP</em></em>="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.<br>
gcc: error: unrecognized command line option '-fno-canonical-system-headers'<br>
Target //tensorflow/tools/pip_package:build_pip_package failed to build<br>
INFO: Elapsed time: 0.692s, Critical Path: 0.16s</p>
<p dir="auto">when I run :<br>
<code class="notranslate">bazel build --config=opt --config=cuda --verbose_failures //tensorflow/tools/pip_package:build_pip_package</code></p>
<p dir="auto">INFO: Found 1 target...<br>
ERROR: /home/qs/.cache/bazel/<em>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<br>
(cd /home/qs/.cache/bazel/<em>bazel_qs/081cd1dbca77dcff65c775e7e860e873/execroot/tensorflow &amp;&amp; <br>
exec env - <br>
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 <br>
PATH=/bin:/usr/bin:/home/qs/mysoft/jdk1.8/bin <br>
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/<em>objs/farmhash/external/farmhash_archive/src/farmhash.d '-frandom-seed=bazel-out/host/bin/external/farmhash_archive/<em>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</em></em>="redacted"' '-D__TIMESTAMP</em></em>="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.<br>
gcc: error: unrecognized command line option '-fno-canonical-system-headers'<br>
Target //tensorflow/tools/pip_package:build_pip_package failed to build<br>
INFO: Elapsed time: 1.003s, Critical Path: 0.49s</p>
<p dir="auto">How to solve this problem?</p>