building the cross compiler does not find unistd.h and stdlib.h

Thu Aug 3 11:09:00 GMT 2000


   I am trying to build a cross compiler on an ultra-sparc running redhat
6.2, for the i686 platform running linux as well.   I am using gcc-2.95.2,
binutils-2.10.0 and glibc-2.1.3.  I am not having luck building
gcc-2.95.2.  The build of gcc-2.95.2 can not find unistd.h and stdlib.h

Notes on the configuration:

The cross build process works well for binutils-2.10.0.  I used the
configuration parameters 

./binutils-2.10/configure --target=i686-linux --prefix=/cross/i686 -v

In a seperate directory, During the build of gcc-295.2 

./gcc-2.95.2/configure --target=i686-linux --prefix=/cross/i686
--with-headers=../glibc-2.13/include -v

Here is the output of the make all process for gcc-2.95.2...

/home/douglas/cross/buildgcc/gcc/xgcc -B/home/douglas/cross/buildgcc/gcc/
-B/cross/i686/i686-linux/bin/ -I/cross/i686/i686-linux/include -O2 
-DCROSS_COMPILE -DIN_GCC     -g -O2 -I./include  -fPIC -g1  -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED   -I. -I../../gcc-2.95.2/gcc
-I../../gcc-2.95.2/gcc/config -I../../gcc-2.95.2/gcc/../include -c
-DL${name} \ 
       ../../gcc-2.95.2/gcc/libgcc2.c -o ${name}.o; \
  if [ $? -eq 0 ] ; then true; else exit 1; fi; \
  i686-linux-ar rc tmplibgcc2.a ${name}.o; \ 
 rm -f ${name}.o; \
In file included from ../../gcc-2.95.2/gcc/libgcc2.c:41:
/cross/i686/lib/gcc-lib/i686-linux/2.95.2/../../../../i686-linux/sys-include/stdlib.h:7: stdlib/stdlib.h: No such file or directory 
In file included from ../../gcc-2.95.2/gcc/libgcc2.c:42:
/cross/i686/lib/gcc-lib/i686-linux/2.95.2/../../../../i686-linux/sys-include/unistd.h:2: posix/unistd.h: No such file or directory
 make[1]: *** [libgcc2.a] Error 1
 make[1]: Leaving directory `/home/douglas/cross/buildgcc/gcc'
 make: *** [all-gcc] Error 2                     

In the above process I have also used newlib-1.8.2/newlib/include as well.

 - Douglas

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list