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.