stdio.h: No such file or directory

Kai Ruottu karuottu@mbnet.fi
Thu Oct 20 08:48:00 GMT 2005


Pramod P K wrote:

> Im crosscompiling gcc-3.4.3 for arm9, with Linux-2.6.10 (fedora core-4)
> i've configured n compiled binutils-2.15 , then make menuconfig  for
> 2.6.10 kernel at the TOPmost kernel's directory.
> 
> i get errors as shown:
> (even after going thru
> http://www.aleph1.co.uk/armlinux/docs/toolchain/toolchHOWTO/x183.html
>  i.e., editing gcc/config/arm/t-linux  with TARGET_LIBGCC2_CFLAGS =
> -fomit-frame-pointer -fPIC -Dinhibit_libc -D__gthr_posix_h )
> 
> /home/pramod/gcc-3.4.3/arm-linux/gcc/xgcc
> -B/home/pramod/gcc-3.4.3/arm-linux/gcc/ -B/home/pramod/arm-linux/bin/
> -B/home/pramod/arm-linux/lib/ -isystem /home/pramod/arm-linux/include
> -isystem /home/pramod/arm-linux/sys-include -O2 -DIN_GCC
> -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes
> -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -I.
> -I. -I../../gcc -I../../gcc/. -I../../gcc/../include   -g0
> -finhibit-size-directive -fno-inline-functions -fno-exceptions
> -fno-zero-initialized-in-bss -fno-unit-at-a-time  \
>    -c ../../gcc/crtstuff.c -DCRT_BEGIN \
>   -o crtbegin.o
> In file included from ../../gcc/crtstuff.c:62:
> .../../gcc/tsystem.h:79:19: stdio.h: No such file or directory
> .../../gcc/tsystem.h:82:23: sys/types.h: No such file or directory
> .../../gcc/tsystem.h:85:19: errno.h: No such file or directory
> .../../gcc/tsystem.h:92:20: string.h: No such file or directory
> .../../gcc/tsystem.h:93:20: stdlib.h: No such file or directory
> .../../gcc/tsystem.h:94:20: unistd.h: No such file or directory
> .../../gcc/tsystem.h:100:18: time.h: No such file or directory

  What is your Linux/ARM target?

1. It is an existing Linux/ARM system and the right target headers are
    available for it !

2. It is an unexisting Linux/ARM system and the target headers can only
    be substituted with suitable headers from some existing Linux/ARM
    system, for instance Debian Linux/ARM !

  The case 1., the target system exists, should be the most common with
cross-GCCs, and so the GCC manual has traditionally documented only
this. If this is the case, just copy the target headers and libraries
into the host platform, build your cross-GCC and be happy ! Producing
a GCC for an "system" target like Linux ALWAYS requires the target
headers and libraries being available during the build. Building a GCC
for an "embedded" target (without any native components existing) only
requires the target headers during the GCC build. An "embedded Linux"
is not an "embedded" target, it is a "system" target because it can
host a "native GCC", which none of the embedded targets can do...

  In the case 2. you have full freedom to download any Linux/ARM headers
and libraries and produce your first Linux/ARM targeted GCC for this
temporary "real" target. Then use this completely standard Linux/ARM
GCC to produce your own very custom glibc and finally your very custom
GCC... Going from a generic toolchain to a custom toolchain is very easy
when one knows all the time what one is doing...

  If you some day would think the NetBSD/ARM being better and much
smaller opsys than the memory hungry Linux/ARM, the cross-GCC build
method would be the first, to download the 'base.tgz', 'comp.tgz' and
'xcomp.tgz' packages for its base C libraries and headers like I did
with the NetBSD/MIPSel port :

  Directory of G:\Install\NetBSD-2.0.2\mipsel

04.07.2005  10:47       <DIR>          .
04.07.2005  10:47       <DIR>          ..
04.07.2005  10:34           21 367 851 base.tgz
04.07.2005  10:47           22 073 996 comp.tgz
04.07.2005  10:53            9 644 915 xcomp.tgz
                3 File(s)     53 086 762 bytes

  For Linux/ARM one suitable bootstrap glibc could be the Debian
glibc-2.3.5 at http://ftp.fi.debian.org/debian/pool/main/g/glibc :

libc6-dev_2.3.5-6_arm.deb
libc6_2.3.5-6_arm.deb

or somewhere else, there are many Debian mirrors all around the
globe...

  Something like 'http://www.maemo.org' for the "Nokia 770 Internet
table" could serve as an example about a ARM9/Debian based Linux
distro. Those targeting to this device of course should use only
its original libraries and headers in the crosstoolchain.



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list