Yesterday, after philb suggested that I try to repeat my (egcs112) problem with
the latest version of egcs, I decided it was time to install the toolchain onto
my linux box.  I had been using the toolchain on someone else's linux box, and I
didn't want to mess around and upgrade his *mostly* working setup.  So I set off
to follow the careful directions that have been posted on how to install this
tool chain.

I have so far been unable to build glibc2.1.  Maybe someone on this list knows
what I'm doing wrong.  (Any help is of course appreciated!)  All of this is on
an i86 redhat 5.2 system.  Here's the "play by play" of what I did.

I built and installed binutils-2.9.1.0.19a after applying the 981230 arm-diff
patch.
That appeared to be successful.

I built and installed the egcs-19990623 compiler with the gcc-2.95 patch that
philb pointed me to yesterday.  This appeared to be *mostly* successful,
although I have a few doubts since it gave me errors if I didn't use the -i flag
on the make line.  (Without giving make the -i flag, it reports that
../libiberty/libiberty.a: No such file or directory; when I redid the build
*with* the flag, i.e. make -i LANGUAGES=c, it cruises ahead and seems to
successfully build everything.)  I then did the install.

I then tried to build glibc2.1.  I had already installed the source to
linux-2.2.2 (which was the version that had been used in one of the example
instructions that I read- maybe this is my problem- should I get a later set of
header files?) and created links to the appropriate include directories from my
/usr/local/arm112 tree.  Now I installed the patch (patch-2.2.2-rmk5) to the
linux source and modified the Makefile (ARCH := arm and CROSS_COMPILE =
/usr/local/arm112/bin/arm-linux-) and did a make config and a make zImage.

When the "make zImage" reported an error it said that it couldn't read symbols
from libgcc.a, that my libgcc.a had no index and that I should run ranlib on the
library to add an index.  At first I took no action on this, since the
directions that I was reading said it was okay if zImage didn't get built, that
we just wanted it to create the header files.  I verified that an version.h file
got created, although I'm not sure which other files I should have checked for.

Anyway, finally I was ready to build glibc.  I did the
CC=arm-linux-gcc ./configure arm-linux --build=i686-pc-linux-gnu
--prefix=/usr/local/arm112/glibc/arm-linux-glibc --enable-add-ons
--with-headers=/usr/src/linux-2.2.2/linux/include

This got me an error message saying that my gcc version (gcc-2.95) wasn't good
enough.  Figuring that my gcc version is probably too recent for this configure
script, I added gcc-2.95 as an option, and retried the configure, it cruised
along.  Then I tried make, and it goes for quite a while, until it gets up to
the db2 directory, when it complains about:

../libc.so.6: undefined reference to `__ashldi3'
../libc.so.6: undefined reference to `__divdi3'
../libc.so.6: undefined reference to `__umoddi3'
../libc.so.6: undefined reference to `__udivdi3'
../libc.so.6: undefined reference to `__lshrdi3'
../libc.so.6: undefined reference to `__moddi3'
../libc.so.6: undefined reference to `__nykdu3'

It appears as if it is maybe missing a -lm on the compile line (please forgive
the weird line breaks, this email editor has a mind of it's own about how to
deal with things).  Here's what the compile line looked like:

gmake[1]: Entering directory `/home/hughm/arm-cross-compiler/glibc-2.1/db2'
arm-linux-gcc -nostdlib -nostartfiles -o makedb
-Wl,-dynamic-linker=/usr/local/arm112/glibc/arm-linux-glibc/lib/ld-linux.so.2
../csu/crt1.o ../csu/crti.o `arm-linux-gcc --print-file-name=crtbegin.o`
makedb.o libdb.so.3
-Wl,-rpath-link=..:../math:../elf:../nss:../nis:.:../rt:../resolv:../linuxthreads

../libc.so.6 ../libc_nonshared.a -lgcc `arm-linux-gcc
--print-file-name=crtend.o` ../csu/crtn.o

Anyway, I'm stuck until I can build glibc.  Should I be trying to use later
versions of the linux headers?  Am I missing some patches?  Any help would be
enormously appreciated.  Thanks in advance,

Hugh Morgenbesser




unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]

Reply via email to