Hello,
I try to compile the simple application Hello World :
For this I use OpenEmbedded Core with LinuxImageV2.6
With the variable
export ARCH=arm
export CROSS_COMPILE=arm-angstrom-linux-gnueabi-
export PATH=~/Programmes/oe-core/build/out-glibc/sysroots/x86_64-linux/usr/bin:~/Programmes/oe-core/build/out-glibc/sysroots/x86_64-linux/usr/bin/arm-angstrom-linux-gnueabi/:$PATH
I have this problem with the following cmd :
fiveco$ ${CROSS_COMPILE}gcc -mfloat-abi=hard -o hello_world hello_world.c
hello_world.c:1:64: fatal error: stdio.h: No such file or directory
compilation terminated.
If I add the linker to apalis-imx6/usr/include, I have the following problem :
${CROSS_COMPILE}gcc -I/home/fiveco/Programmes/oe-core/build/out-glibc/sysroots/apalis-imx6/usr/include -mfloat-abi=hard -o hello_world hello_world.c
/home/fiveco/Programmes/oe-core/build/out-glibc/sysroots/x86_64-linux/usr/libexec/arm-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/5.2.1/ld: error: cannot open crt1.o: No such file or directory
/home/fiveco/Programmes/oe-core/build/out-glibc/sysroots/x86_64-linux/usr/libexec/arm-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/5.2.1/ld: error: cannot open crti.o: No such file or directory
/home/fiveco/Programmes/oe-core/build/out-glibc/sysroots/x86_64-linux/usr/libexec/arm-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/5.2.1/ld: error: cannot open crtbegin.o: No such file or directory
/home/fiveco/Programmes/oe-core/build/out-glibc/sysroots/x86_64-linux/usr/libexec/arm-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/5.2.1/ld: error: cannot open crtend.o: No such file or directory
/home/fiveco/Programmes/oe-core/build/out-glibc/sysroots/x86_64-linux/usr/libexec/arm-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/5.2.1/ld: error: cannot open crtn.o: No such file or directory
/home/fiveco/Programmes/oe-core/build/out-glibc/sysroots/x86_64-linux/usr/libexec/arm-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/5.2.1/ld: error: cannot find -lgcc
/home/fiveco/Programmes/oe-core/build/out-glibc/sysroots/x86_64-linux/usr/libexec/arm-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/5.2.1/ld: error: cannot find -lgcc_s
/home/fiveco/Programmes/oe-core/build/out-glibc/sysroots/x86_64-linux/usr/libexec/arm-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/5.2.1/ld: error: cannot find -lc
/home/fiveco/Programmes/oe-core/build/out-glibc/sysroots/x86_64-linux/usr/libexec/arm-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/5.2.1/ld: error: cannot find -lgcc
/home/fiveco/Programmes/oe-core/build/out-glibc/sysroots/x86_64-linux/usr/libexec/arm-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/5.2.1/ld: error: cannot find -lgcc_s
/tmp/cchHvOGa.o:hello_world.c:function main: error: undefined reference to 'puts'
collect2: error: ld returned 1 exit status
Why ld didn’t find crt1.o and other files located in oe-core/build/out-glibc/sysroots/apalis-imx6/usr/lib/ ?