title: Raspberry Pi -fatal error: sys/cdefs.h: No such file or directory
body: <p>I'm trying to compile gcc5.3.0 on my Raspberry Pi with latest Raspbian system image. </p>
  
  <pre><code>$ ./configure --enbale-checking=release --enable-languages=c,c++,fortran --host=arm-cortexa7_neon-linux-gnueabihf --build=arm-cortexa7_neon-linux-gnueabihf --target=arm-cortexa7_neon-linux-gnueabihf
  $ make
  </code></pre>
  
  <p>However, the original compiler (gcc4.9) complains about not founding sys/cdefs.h when compiling libgcc. </p>
  
  <p>I checked I have <code>libc6-dev</code> and <code>build-essential</code> installed. </p>
  
  <p>So I used <code>grep -R 'cdefs' /usr/include/</code> to search it and I found it at /usr/include/bsd/. I created the sys directory and made hard links to these headers under /usr/include/bsd/sys.</p>
  
  <p>This time it gave me a more weird error, 
  /usr/include/stdio.h:312:8: error: unknown type name 'FILE'.</p>
  
  <p>I searched this on stackoverflow, and there's a similar question, <a href="https://stackoverflow.com/a/21047237/5691005">https://stackoverflow.com/a/21047237/5691005</a>. But when I removed /usr/include/sys and /usr/include/bsd, then reinstalled libc6-dev, I  cannot find sys/cdefs.h under /usr/include, and the compiler gave errors still. </p>
  
  <p>I'm now totally lost. Any suggestion will be appreciated. </p>