[Solved] Help! Compiler can't find standard library?

Hey guys, I'm having trouble compiling getting a compiler for an embedded linux-platform to work.

I'm running:
Ubuntu Gnome 14.10, installed it about two days ago.

It works whenever I use the regular compiler by invoking it directly:

$ gcc -o hello helloworld.c

… and I get an executable file which works. But when I try with the one for my linux-platform, I get this:

$ arm-angstrom-linux-gnueabi-gcc -o hello helloworld.c 
helloworld.c:1:19: fatal error: stdio.h: No such file or directory
compilation terminated.

The code I'm trying to compile obviously isn't the problem, but anyway I'll include it here:

#include <stdio.h>

int main() {
	printf("Hello World!\n");
}

For the sake of detail, I also ran it with the verbose flag so that maybe someone can tell me how to fix it:

$ arm-angstrom-linux-gnueabi-gcc -v -o hello helloworld.c 
Using built-in specs.
COLLECT_GCC=arm-angstrom-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/home/norgaard/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr/bin/armv7a-angstrom-linux-gnueabi/../../libexec/armv7a-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/4.5.4/lto-wrapper
Target: arm-angstrom-linux-gnueabi
Configured with: /home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/work-shared/gcc-4.5-r45+svnr181733/gcc-4_5-branch/configure --build=i686-linux --host=i686-linux --target=arm-angstrom-linux-gnueabi --prefix=/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr --exec_prefix=/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr --bindir=/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr/bin/armv7a-angstrom-linux-gnueabi --sbindir=/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr/bin/armv7a-angstrom-linux-gnueabi --libexecdir=/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr/libexec/armv7a-angstrom-linux-gnueabi --datadir=/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr/share --sysconfdir=/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/etc --sharedstatedir=/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/com --localstatedir=/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/var --libdir=/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr/lib/armv7a-angstrom-linux-gnueabi --includedir=/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr/include --oldincludedir=/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr/include --infodir=/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr/share/info --mandir=/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux --with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --disable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=arm-angstrom-linux-gnueabi- --enable-target-optspace --enable-lto --enable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap --with-linker-hash-style=gnu --with-ppl=no --with-cloog=no --enable-cheaders=c_global --with-local-prefix=/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/beagleboard/usr --with-gxx-include-dir=/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/beagleboard/usr/include/c++ --with-sysroot=/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/beagleboard --with-build-sysroot=/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/beagleboard --enable-poison-system-directories --with-headers=/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/beagleboard/usr/include --disable-libunwind-exceptions --with-mpfr=/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr --with-system-zlib --disable-nls --enable-__cxa_atexit
Thread model: posix
gcc version 4.5.4 20111126 (prerelease) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-o' 'hello'
 /home/norgaard/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr/bin/armv7a-angstrom-linux-gnueabi/../../libexec/armv7a-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/4.5.4/cc1 -quiet -v -iprefix /home/norgaard/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr/bin/armv7a-angstrom-linux-gnueabi/../../lib/armv7a-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/4.5.4/ helloworld.c -quiet -dumpbase helloworld.c -auxbase helloworld -version -o /tmp/cc9GwUng.s
GNU C (GCC) version 4.5.4 20111126 (prerelease) (arm-angstrom-linux-gnueabi)
	compiled by GNU C version 4.6.1, GMP version 5.0.3, MPFR version 3.1.0, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/home/norgaard/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr/bin/armv7a-angstrom-linux-gnueabi/../../lib/armv7a-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/4.5.4/../../../../../arm-angstrom-linux-gnueabi/include"
ignoring nonexistent directory "/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/beagleboard/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/beagleboard/usr/include"
ignoring duplicate directory "/home/norgaard/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr/bin/armv7a-angstrom-linux-gnueabi/../../lib/armv7a-angstrom-linux-gnueabi/gcc/../../../lib/armv7a-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/4.5.4/include"
ignoring duplicate directory "/home/norgaard/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr/bin/armv7a-angstrom-linux-gnueabi/../../lib/armv7a-angstrom-linux-gnueabi/gcc/../../../lib/armv7a-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/4.5.4/include-fixed"
ignoring nonexistent directory "/home/norgaard/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr/bin/armv7a-angstrom-linux-gnueabi/../../lib/armv7a-angstrom-linux-gnueabi/gcc/../../../lib/armv7a-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/4.5.4/../../../../../arm-angstrom-linux-gnueabi/include"
ignoring nonexistent directory "/home/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/beagleboard/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/norgaard/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr/bin/armv7a-angstrom-linux-gnueabi/../../lib/armv7a-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/4.5.4/include
 /home/norgaard/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr/bin/armv7a-angstrom-linux-gnueabi/../../lib/armv7a-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/4.5.4/include-fixed
End of search list.
GNU C (GCC) version 4.5.4 20111126 (prerelease) (arm-angstrom-linux-gnueabi)
	compiled by GNU C version 4.6.1, GMP version 5.0.3, MPFR version 3.1.0, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 081f2a8b469380b3ba88a0492ddf70ec
helloworld.c:1:19: fatal error: stdio.h: No such file or directory
compilation terminated.

It looks like you're trying to cross-compile for a different platform, correct? (x86 -> ARM)

Your cross-compiler is setup with special parameters / arguments. (see the "Configured with" part)

Check if there actually is a stdio.h in the "includedir" (see the log --includedir and --oldincludedir)
Probably not (see the error messages)

   ignoring nonexistent directory "/home/norgaard/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr/bin/armv7a-angstrom-linux-gnueabi/../../lib/armv7a-angstrom-linux-gnueabi/gcc/../../../lib/armv7a-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/4.5.4/../../../../../arm-angstrom-linux-gnueabi/include" <--- here should be stdio.h

You're right, I can't find the stdio.h in that directory.
I have almost everything else:

~/stud/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/i686-linux/usr/include$ ls
acl          cursesapp.h  dis-asm.h         FlexLexer.h                                       jconfig.h    libxml2     mtd            pcre.h              QtDBus         sqlite3.h     vala-0.12
ansidecl.h   cursesf.h    dwarf.h           form.h                                            jerror.h     libxslt     mysql          pcreposix.h         QtGui          ss            X11
attr         curses.h     e2p               gcc-build-internal-armv7a-angstrom-linux-gnueabi  jmorecfg.h   ltdl.h      nc_tparm.h     pcre_scanner.h      QtNetwork      symcat.h      zconf.h
bfd.h        cursesm.h    eggdbus-1         gconf                                             jpeglib.h    lzma        ncurses_dll.h  pcre_stringpiece.h  QtSql          sys           zlibdefs.h
bfdlink.h    cursesp.h    elfutils          gdk-pixbuf-2.0                                    libelf.h     lzma.h      ncurses.h      pngconf.h           QtTest         termcap.h     zlib.h
blkid        cursesw.h    et                gelf.h                                            libexslt     lzo         nlist.h        png.h               QtXml          term_entry.h
bzlib.h      cursslk.h    eti.h             gettext-po.h                                      libiberty.h  magic.h     OpenSP         popt.h              QtXmlPatterns  term.h
com_err.h    db51         etip.h            gio-unix-2.0                                      libltdl      menu.h      openssl        python2.7           quota          tic.h
crypto       db_cxx.h     expat_external.h  glib-2.0                                          libmount     mpc.h       panel.h        Qt                  readline       turbojpeg.h
curl         db.h         expat.h           gmp.h                                             libopkg      mpf2mpfr.h  pcrecpparg.h   Qt3Support          rpm            unctrl.h
curses-32.h  dbus-1.0     ext2fs            gmpxx.h                                           libpng12     mpfr.h      pcrecpp.h      QtCore              sqlite3ext.h   uuid

How would I go about adding the missing files?

Well, where did you get that compiler in the first place? Usually it should ship with a standard library

Just solved it. The compiler was looking for the files in my /home folder instead for home/norgaard, so i just moved the folder with the compiler and everything into /home.

Thanks for the help, wouldn't have discovered this without it!