This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
gcc-3.4.3 build fails for i386 target
- From: pnayak at nmsu dot edu
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 23 Aug 2005 16:11:31 -0600
- Subject: gcc-3.4.3 build fails for i386 target
Hi All,
I'm trying to setup a cross compile environment on a GNU/Linux machine. I'm
having trouble with glibc and gcc. The gcc build fails. I've described the
process below. Please let me know if you know of a solution (other than
crosstool).
Also, there seem to be lot more make targets and/or options than described in
the gcc/glibc manual. Are there any resources that document these as an
alternative to going through the build scripts ?.
The source tree does not have Makefile.am Is there any place I could get this to
make life easier than deciphering the Makefile.in ?.
Host and Build System
---------------------
"uname -a" output:
Linux fedorabox 2.6.9-1.667 #1 Tue Nov 2 14:41:25 EST 2004 i686 i686 i386 GNU/Linux
"gcc -v" output:
reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
"make -v" output:
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Target System
-------------
Target = i386-pc-linux-gnu
Source packages used:
binutils-2.15.94.0.2.2
gcc-3.4.3
glibc-2.3.4 with linuxthreads same version
linux-2.6.12.4
binutils built successfully.
I configured gcc with this command
configure --target=i386-pc-linux-gnu --prefix /home/usr/tools \
--enable-add-ons --without-headers
make all-gcc
The build fails with the following error.
../../gcc-3.4.4/gcc/config/i386/linux.h:217:20:
signal.h: No such file or directory
../../gcc-3.4.4/gcc/config/i386/linux.h:218:26:
sys/ucontext.h: No such file or
directory
make[2]: *** [libgcc/./_muldi3.o] Error 1
make[2]: Leaving directory
usr/home/annu/projects/ctrack/build-tools/build-boot-gcc/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory
usr/home/annu/projects/ctrack/build-tools/build-boot-gcc/gcc'
make: *** [all-gcc] Error 2
I unzipped the kernel (2.6.12) sources and ran
make menuconfig
make linux/version.h
make inlcude/asm
make include/config/MARKER
And built glibc with this command.
./configure --host=i386-pc-linux-gnu --prefix="/usr" \
--enable-add-ons --with-headers=/kernel/linux-2.6.12.4/include
make cross-compiling=yes install_root=${TARGET_PREFIX} \
prefix="" install-headers
Then I tried the gcc build with the following commands.
./configure --target=i386-pc-linux-gnu --prefix=/tools \
--disable-shared --with-headers=${TARGET_PREFIX}/include \
--with-newlib --enable-languages=c
make all-gcc
The build fails with the following error.
In file included from /home/annu/projects/ctrack/src/gcc-3.4.3/gcc/tsystem.h:79,
from /home/annu/projects/ctrack/src/gcc-3.4.3/gcc/crtstuff.c:62:
/home/annu/projects/ctrack/tools/i386-pc-linux-gnu/sys-include/stdio.h:138:28:
bits/stdio_lim.h: No such file or directorymake[1]: *** [crtbegin.o] Error 1
make[1]: Leaving directory `/home/annu/projects/ctrack/build/boot-gcc/gcc'
make: *** [all-gcc] Error 2
If anyone can tell me more on this it would be greatly helpful.
thanks
nayak