This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Can't build GCC


I wrote in recently when I couldn't build binutils.  Thanks to the help I
got from people on this list, I got that problem solved and everything there
seems fine now.  So I moved on to trying to build gcc according to the
scripts in the FAQ.

To ensure a clean source tree, I reformatted my hard drive and did a fresh
install of Red Hat 6.1.  I then went to /usr/src and copied the source files
there (binutils-2.9.2.tar.gz, gcc-2.95.2.tar.gz, newlib-1.8.2.tar.gz, and
gdb-4.18.tar.gz).  I untared them (tar -xzvf filename.gz) and then followed
the script:
    host=i686-pc-linux-gnu
    target=i486-pc-linux-gnu
    prefix=/cross
    i=$prefix/bin
I then echoed each of them to insure the environmental variable strings were
alright. (They were.)  Then:
    mkdir build-binutils build-gcc build-newlib build-gdb
    cd build-binutils
    ../binutils-2.9.2/configure --target=$target --prefix=$prefix -v &>
config.rec
    make all install &> make.rec
    cd ../build-gcc
    ../gcc-2.95.2/configure --target=$target --prefix=$prefix -v &>
config.rec
Everything was fine.  Then:
    make all install &> make.rec
CRUMP!  The essential error message was as follows:

make[2]: Entering directory `/usr/src/build-gcc/gcc/java'
.
.
...[snip]...
.
.
for name in _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 _lshrdi3
_ashldi3 _ashrdi3 _ffsdi2 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2
_floatdidf _floatdisf _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi
_fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi _fixtfdi
_fixunstfdi _floatditf __gcc_bcmp _varargs __dummy _eprintf _bb _shtab
_clear_cache _trampoline __main _exit _ctors _pure; \
do \
  echo ${name}; \


/usr/src/build-gcc/gcc/xgcc -B/usr/src/build-gcc/gcc/ -B/cross/i486-pc-linux
-gnu/bin/ -I/cross/i486-pc-linux-gnu/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/gc
c/../include -c -DL${name} \
       ../../gcc-2.95.2/gcc/libgcc2.c -o ${name}.o; \
  if [ $? -eq 0 ] ; then true; else exit 1; fi; \
  i486-pc-linux-gnu-ar rc tmplibgcc2.a ${name}.o; \
  rm -f ${name}.o; \
done
_muldi3
../../gcc-2.95.2/gcc/libgcc2.c:41: stdlib.h: No such file or directory
../../gcc-2.95.2/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

I examined /usr/src/gcc-2.95.2/gcc/libgcc2.c:  Lines 41 & 42 were standard
directives "#include <stdlib.h>"
and "include <unistd.h>".  No surprises there.

This error is repeatable even with again stripping out my Red Hat
6.1installation and re-installing.  The second time I ran "find / -name
filename.h" before I tried the build and once again after I tried it.
Neither include file was missing, either before  the make or after it.

Does anyone have any clues?

I know it's not anyone's problem here, but I'm running out of time.  For
almost a whole week I've not been able to get a cross compiler built, and I
may have to dump this project and use a Micro$lop C compiler instead.  (I've
been struggling to get permission  to use the GNU tools in development for
new products.)  That would hurt!

Any help would be sincerely appreciated.  Thanks in advance.

Richard Bowser
Engineer
Thunder Scientific Corporation

email:     richardb@thunderscientific.com



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]