title: Error while cross compiling Tensorflow for Raspberry Pi 3 On ubuntu 16.04lts
body: <p>I'm trying to cross compile Tensorflow for Raspberry PI3 with help of Tensorflow <code>build_raspberry_pi.sh</code> but I'm getting error and I have followed the below steps:-</p>
  
  <p>1: Installing Bazel 0.10.0,</p>
  
  <p>2: Cloning Tensorflow from git and doing a checkout of r1.5,</p>
  
  <p>3: Running the script present inside <code>/tensorflow/tools/ci_build/pi/</code>, The script is <code>build_raspberry_pi.sh</code>.</p>
  
  <p>I'm cross compiling it for raspberry Pi 3 and getting the below error during the compilation:</p>
  
  <pre><code>ERROR: /home/baladev/.cache/bazel/_bazel_baladev/da0e175f87e998fe3d550279550cec2c/external/grpc/BUILD:431:1: C++ compilation of rule '@grpc//:gpr_base' failed (Exit 1): arm-linux-gnueabihf-gcc failed: error executing command 
  
  (cd /home/baladev/.cache/bazel/_bazel_baladev/da0e175f87e998fe3d550279550cec2c/execroot/org_tensorflow &amp;&amp; \   exec env - \
      PATH=/home/baladev/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin \
      PWD=/proc/self/cwd \
      PYTHON_BIN_PATH=/usr/bin/python \
      PYTHON_LIB_PATH=/usr/local/lib/python2.7/dist-packages \
      TF_NEED_CUDA=0 \
      TF_NEED_OPENCL_SYCL=0 \   /home/baladev/.cache/bazel/_bazel_baladev/da0e175f87e998fe3d550279550cec2c/external/arm_compiler/bin/arm-linux-gnueabihf-gcc
  -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -DRASPBERRY_PI -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections -DGEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK '-march=armv7-a' '-mfpu=neon-vfpv4' '-std=gnu11' '-DS_IREAD=S_IRUSR' '-DS_IWRITE=S_IWUSR' -O3 -U__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1
  -U__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 -U__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 -funsafe-math-optimizations -ftree-vectorize -fomit-frame-pointer '-std=c++11' -isystem /usr/include/arm-linux-gnueabihf -isystem /usr/include/python2.7
  -isystem /usr/include/ -MD -MF bazel-out/armeabi-opt/bin/external/grpc/_objs/gpr_base/external/grpc/src/core/lib/support/subprocess_posix.pic.d '-frandom-seed=bazel-out/armeabi-opt/bin/external/grpc/_objs/gpr_base/external/grpc/src/core/lib/support/subprocess_posix.pic.o'
  -fPIC '-DGRPC_ARES=0' -D__CLANG_SUPPORT_DYN_ANNOTATION__ -iquote external/grpc -iquote bazel-out/armeabi-opt/genfiles/external/grpc
  -iquote external/bazel_tools -iquote bazel-out/armeabi-opt/genfiles/external/bazel_tools -iquote external/com_google_absl -iquote bazel-out/armeabi-opt/genfiles/external/com_google_absl -isystem external/grpc/include -isystem bazel-out/armeabi-opt/genfiles/external/grpc/include -isystem external/bazel_tools/tools/cpp/gcc3 -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -no-canonical-prefixes
  -fno-canonical-system-headers -c external/grpc/src/core/lib/support/subprocess_posix.cc -o bazel-out/armeabi-opt/bin/external/grpc/_objs/gpr_base/external/grpc/src/core/lib/support/subprocess_posix.pic.o) cc1plus: warning: command line option '-std=gnu11' is valid for C/ObjC but not for C++ In file included from external/grpc/src/core/lib/support/subprocess_posix.cc:33:0: /home/baladev/.cache/bazel/_bazel_baladev/da0e175f87e998fe3d550279550cec2c/external/arm_compiler/bin/../arm-linux-gnueabihf/sysroot/usr/include/sys/wait.h:101:3: error: redeclaration of 'P_ALL'    P_ALL,  /* Wait for any child.  */  ^ In file included from /usr/include/stdlib.h:41:0,
                   from external/grpc/src/core/lib/support/subprocess_posix.cc:30: /usr/include/bits/waitflags.h:52:3: note: previous declaration 'idtype_t P_ALL'    P_ALL,  /* Wait for any child.  */    ^ In file included from external/grpc/src/core/lib/support/subprocess_posix.cc:33:0: /home/baladev/.cache/bazel/_bazel_baladev/da0e175f87e998fe3d550279550cec2c/external/arm_compiler/bin/../arm-linux-gnueabihf/sysroot/usr/include/sys/wait.h:102:3: error: redeclaration of 'P_PID'    P_PID,  /* Wait for specified process.  */    ^ In file included from /usr/include/stdlib.h:41:0,
                   from external/grpc/src/core/lib/support/subprocess_posix.cc:30: /usr/include/bits/waitflags.h:53:3: note: previous declaration 'idtype_t P_PID'    P_PID,  /* Wait for specified process.  */    ^ In file included from external/grpc/src/core/lib/support/subprocess_posix.cc:33:0: /home/baladev/.cache/bazel/_bazel_baladev/da0e175f87e998fe3d550279550cec2c/external/arm_compiler/bin/../arm-linux-gnueabihf/sysroot/usr/include/sys/wait.h:103:3: error: redeclaration of 'P_PGID'    P_PGID  /* Wait for members of process group.  */    ^ In file included from /usr/include/stdlib.h:41:0,
                   from external/grpc/src/core/lib/support/subprocess_posix.cc:30: /usr/include/bits/waitflags.h:54:3: note: previous declaration 'idtype_t P_PGID'    P_PGID  /* Wait for members of process group.  */ ^ In file included from external/grpc/src/core/lib/support/subprocess_posix.cc:33:0: /home/baladev/.cache/bazel/_bazel_baladev/da0e175f87e998fe3d550279550cec2c/external/arm_compiler/bin/../arm-linux-gnueabihf/sysroot/usr/include/sys/wait.h:104:3: error: conflicting declaration 'typedef enum idtype_t idtype_t'  } idtype_t;    ^ In file included from /usr/include/stdlib.h:41:0,
                   from external/grpc/src/core/lib/support/subprocess_posix.cc:30: /usr/include/bits/waitflags.h:55:3: note: previous declaration as 'typedef enum idtype_t idtype_t'  } idtype_t;    ^ INFO: Elapsed time:
  984.156s, Critical Path: 40.58s FAILED: Build did NOT complete successfully
  </code></pre>
  
  <p>Am I missing something which is needed for cross compilation?</p>