title: arm-linux-gnu-gcc fatal error: stdio.h: No such file or directory
body: <p>These are the files in /usr/bin </p>
  
  <pre><code>[root@xilinx bin]# ls -ld arm*
  -rwxr-xr-x. 1 root root  691752 Feb  5  2013 arm-linux-gnu-addr2line
  -rwxr-xr-x. 1 root root  721416 Feb  5  2013 arm-linux-gnu-ar
  -rwxr-xr-x. 1 root root 1297632 Feb  5  2013 arm-linux-gnu-as
  -rwxr-xr-x. 1 root root  689168 Feb  5  2013 arm-linux-gnu-c++filt
  -rwxr-xr-x. 1 root root  545664 Feb  6  2013 arm-linux-gnu-cpp
  -rwxr-xr-x. 1 root root   34176 Feb  5  2013 arm-linux-gnu-elfedit
  -rwxr-xr-x. 1 root root  544624 Feb  6  2013 arm-linux-gnu-gcc
  -rwxr-xr-x. 1 root root  214400 Feb  6  2013 arm-linux-gnu-gcov
  -rwxr-xr-x. 1 root root  760640 Feb  5  2013 arm-linux-gnu-gprof
  -rwxr-xr-x. 2 root root 1177528 Feb  5  2013 arm-linux-gnu-ld
  -rwxr-xr-x. 2 root root 1177528 Feb  5  2013 arm-linux-gnu-ld.bfd
  -rwxr-xr-x. 1 root root  704672 Feb  5  2013 arm-linux-gnu-nm
  -rwxr-xr-x. 1 root root  875456 Feb  5  2013 arm-linux-gnu-objcopy
  -rwxr-xr-x. 1 root root 1096992 Feb  5  2013 arm-linux-gnu-objdump
  -rwxr-xr-x. 1 root root  721456 Feb  5  2013 arm-linux-gnu-ranlib
  -rwxr-xr-x. 1 root root  389040 Feb  5  2013 arm-linux-gnu-readelf
  -rwxr-xr-x. 1 root root  693608 Feb  5  2013 arm-linux-gnu-size
  -rwxr-xr-x. 1 root root  691648 Feb  5  2013 arm-linux-gnu-strings
  -rwxr-xr-x. 1 root root  875456 Feb  5  2013 arm-linux-gnu-strip
  </code></pre>
  
  <p>I am following <a href="http://www.aclevername.com/articles/linux-xilinx-tutorial/minimalist-initramfs.html" rel="noreferrer">this tutorial</a> to cross compile a simple C program:</p>
  
  <pre><code>/* myinit.c
   * Build instructions:
   * ${CROSS_COMPILE}gcc -static init.c -o init
   * */
  
  #include &lt;stdio.h&gt;
  
  int
  main ()
  {
      printf ("\n");
      printf ("Hello world from %s!\n", __FILE__);
      while (1) { }
      return 0;
  }
  </code></pre>
  
  <p>Now I save this is a .c file and try to compile it; </p>
  
  <pre><code>[root@xilinx Xilinx-ZC702-14.7]# arm-linux-gnu-gcc myinit.c 
  myinit.c:6:19: fatal error: stdio.h: No such file or directory
  compilation terminated.
  </code></pre>
  
  <p>This is hapening only when I am using arm-linux-gnu-gcc. </p>
  
  <p>But when I am using gcc, it works fine. </p>
  
  <p>Why is arm-linux* giving this error? </p>
  
  <p><strong>Update</strong></p>
  
  <pre><code>[root@xilinx Xilinx-ZC702-14.7]# arm-linux-gnu-cpp -Wp,-v
  ignoring nonexistent directory "/usr/lib/gcc/arm-linux-gnueabi/4.7.2/../../../../arm-linux-gnueabi/sys-include"
  ignoring nonexistent directory "/usr/lib/gcc/arm-linux-gnueabi/4.7.2/../../../../arm-linux-gnueabi/include"
  #include "..." search starts here:
  #include &lt;...&gt; search starts here:
   /usr/lib/gcc/arm-linux-gnueabi/4.7.2/include
   /usr/lib/gcc/arm-linux-gnueabi/4.7.2/include-fixed
  End of search list.
  </code></pre>
  
  <p><strong>Verbose</strong> </p>
  
  <pre><code>[root@xilinx Xilinx-ZC702-14.7]# arm-linux-gnu-gcc -v myinit.c 
  Using built-in specs.
  COLLECT_GCC=arm-linux-gnu-gcc
  COLLECT_LTO_WRAPPER=/usr/libexec/gcc/arm-linux-gnueabi/4.7.2/lto-wrapper
  Target: arm-linux-gnueabi
  Configured with: ../gcc-4.7.2-20121114-aarch64/configure --disable-dependency-tracking --disable-silent-rules --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=arm-linux-gnueabi --enable-targets=all --program-prefix=arm-linux-gnu- --enable-languages=c --with-newlib --without-headers --disable-sjlj-exceptions --with-system-libunwind --disable-nls --disable-threads --disable-shared --disable-libmudflap --disable-libssp --disable-libgomp --disable-libquadmath --disable-gold --disable-decimal-float --enable-checking= --enable-gnu-unique-object --enable-linker-build-id --disable-plugin --enable-nls --with-system-zlib --with-bugurl=http://bugzilla.redhat.com/bugzilla/ --enable-obsolete
  Thread model: single
  gcc version 4.7.2 20121105 (Red Hat 4.7.2-2.aa.20121114svn) (GCC) 
  COLLECT_GCC_OPTIONS='-v' '-mtls-dialect=gnu'
   /usr/libexec/gcc/arm-linux-gnueabi/4.7.2/cc1 -quiet -v myinit.c -quiet -dumpbase myinit.c -mtls-dialect=gnu -auxbase myinit -version -o /tmp/ccZNNlzj.s
  GNU C (GCC) version 4.7.2 20121105 (Red Hat 4.7.2-2.aa.20121114svn) (arm-linux-gnueabi)
      compiled by GNU C version 4.4.6 20120305 (Red Hat 4.4.6-4), GMP version 4.3.1, MPFR version 2.4.1, MPC version 0.8
  GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
  ignoring nonexistent directory "/usr/lib/gcc/arm-linux-gnueabi/4.7.2/../../../../arm-linux-gnueabi/sys-include"
  ignoring nonexistent directory "/usr/lib/gcc/arm-linux-gnueabi/4.7.2/../../../../arm-linux-gnueabi/include"
  #include "..." search starts here:
  #include &lt;...&gt; search starts here:
   /usr/lib/gcc/arm-linux-gnueabi/4.7.2/include
   /usr/lib/gcc/arm-linux-gnueabi/4.7.2/include-fixed
  End of search list.
  GNU C (GCC) version 4.7.2 20121105 (Red Hat 4.7.2-2.aa.20121114svn) (arm-linux-gnueabi)
      compiled by GNU C version 4.4.6 20120305 (Red Hat 4.4.6-4), GMP version 4.3.1, MPFR version 2.4.1, MPC version 0.8
  GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
  Compiler executable checksum: a19a7c6897fa348d9d5b59c718fa0648
  myinit.c:6:19: fatal error: stdio.h: No such file or directory
  compilation terminated.
  </code></pre>
  
  <p><strong>Host configuration</strong> </p>
  
  <p>Redhat 6, 64 bit </p>