Include file failures in building a cross-compiler
Thunder Scientific Corporation
mike@ThunderScientific.com
Fri Mar 10 10:35:00 GMT 2000
Scenario:
I started with a fresh (virgin) installation of Red Hat 6.1 linux on my
system. Following the examples in the FAQ from objsw.com/CrossGCC, I
obtained the sources from ftp.gnu.org and installed them into /usr/src,
where I was running as root. I unpacked the source trees as per standard
procedures:
tar -xzvf binutils-2.9.1.tar.gz
tar -xzvf gcc-2.95.tar.gz
tar -xzvf newlib-1.8.2.tat.gz
tar -xzvf gdb-4.18.tar.gz
I set environmental variables:
host=i686-pc-linux-gnu
target=i486-pc-linux-gnu
prefix=/cross
i=$prefix/bin
I created build directories:
mkdir build-binutils build-gcc build-newlib build-gdb
I built binutils:
cd build-binutils
../binutils-2.9.1/configure --target=$target --prefix=$prefix -v &>
config.log
make all install &> make.log
Then I tried to make gcc:
cd ../build-gcc
../gcc-2.95/configure --target=$target --prefix=$prefix -v &>
config.log
make all install &> make.log
The make blew up. Examination of make.log yielded:
.
.
[snip]
.
.
_muldi3
../../gcc-2.95/gcc/libgcc2.c:41: stdlib.h: No such file or directory
../../gcc-2.95/gcc/libgcc2.c:42: unistd.h: No such file or directory
make[1]: *** [libgcc2.a] Error 1
make[1]: Leaving directory `/usr/src/build-gcc/gcc'
make: *** [all-gcc] Error 2
This error is repeatable, and I've found I can get around it by adding the
following to my ../gcc-2.95/configure statement:
--with-headers=../newlib-1.8.2/newlib/libc\include --enable-languages="c,c+
+"
Hope this helps.
Please feel free to contact me if I can supply more information.
Please disregard the automatically inseted name "Mike". This is from:
Richard Bowser
Engineer
Thunder Scientific Corporation
email: richardb@thunderscientific.com
More information about the Gcc-bugs
mailing list