Subject: Compiling glibc

From: Chris Sawer <[email-masked]>
Date: Wed, 18 Nov 1998 21:38:46 +0000

I have been attempting to get "elf" up and running on my system (Acorn RiscPC
SA, 48+1Mb, 2.0.35 Kernel) using Philip Blundell's guide. I think I have
managed to successfully build and install both Binutils 2.9.1.0.15 (with Arm
patch) and egcs 1.1b (also with Arm patch) as cross-compilers from
arm-linuxaout to arm-linux. The problems come when I try and compile egcs,
however. The first time I tried, I needed to run "ranlib" on one of egcs'
libraries to add an index, and also compile ld statically as it ran out of
memory. Having done this, however, the compiler crashes (after about 4
hours!) with this error:

a - txn_auto.os
a - txn_rec.os
a - dbm.os
a - db185.os
: /glibc/glibc-build/db2/libdb_pic.a
arm-linux-gcc   -shared -O -o /glibc/glibc-build/db2/libdb.so  -Wl,-dynamic-linker=/usr/arm-linux/lib/ld-linux.so.2 -B/glibc/glibc-build/csu/ -Wl,--version-script=/glibc/glibc-build/libdb.map -Wl,-soname=libdb.so.3   -L/glibc/glibc-build -L/glibc/glibc-build/math -L/glibc/glibc-build/elf -L/glibc/glibc-build/nss -L/glibc/glibc-build/nis -L/glibc/glibc-build/db2 -L/glibc/glibc-build/rt -L/glibc/glibc-build/resolv -L/glibc/glibc-build/linuxthreads -Wl,-rpath-link=/glibc/glibc-build:/glibc/glibc-build/math:/glibc/glibc-build/elf:/glibc/glibc-build/nss:/glibc/glibc-build/nis:/glibc/glibc-build/db2:/glibc/glibc-build/rt:/glibc/glibc-build/resolv:/glibc/glibc-build/linuxthreads -Wl,--whole-archive /glibc/glibc-build/db2/libdb_pic.a /glibc/glibc-build/elf/interp.os /glibc/glibc-build/libc.so -Wl,--no-whole-archive
rm -f /glibc/glibc-build/db2/libdb.so.3.new
/bin/sh ../scripts/rellns-sh /glibc/glibc-build/db2/libdb.so /glibc/glibc-build/db2/libdb.so.3.new
mv -f /glibc/glibc-build/db2/libdb.so.3.new /glibc/glibc-build/db2/libdb.so.3
arm-linux-gcc -nostdlib -nostartfiles -o /glibc/glibc-build/db2/makedb  -Wl,-dynamic-linker=/usr/arm-linux/lib/ld-linux.so.2  /glibc/glibc-build/csu/crt1.o /glibc/glibc-build/csu/crti.o `arm-linux-gcc --print-file-name=crtbegin.o` /glibc/glibc-build/db2/makedb.o /glibc/glibc-build/db2/libdb.so.3  -Wl,-rpath-link=/glibc/glibc-build:/glibc/glibc-build/math:/glibc/glibc-build/elf:/glibc/glibc-build/nss:/glibc/glibc-build/nis:/glibc/glibc-build/db2:/glibc/glibc-build/rt:/glibc/glibc-build/resolv:/glibc/glibc-build/linuxthreads /glibc/glibc-build/libc.so.6 /glibc/glibc-build/libc_nonshared.a -lgcc
`arm-linux-gcc --print-file-name=crtend.o` /glibc/glibc-build/csu/crtn.o
/glibc/glibc-build/libc.so.6: undefined reference to `__syscall__sysctl'
collect2: ld returned 1 exit status
make[2]: *** [/glibc/glibc-build/db2/makedb] Error 1
make[2]: Leaving directory `/elf/glibc-2.0.100/db2'
make[1]: *** [db2/others] Error 2
make[1]: Leaving directory `/elf/glibc-2.0.100'
make: *** [all] Error 2

(Apologies for not formatting it, but I thought it would only confuse
matters)

Can anyone shed any light on my problem?

Thanks in advance,

Chris

-- 
         Chris Sawer - Worthing, Sussex, England    ICQ: 15010147
    E-Mail: [email-masked]    PGP public key available on request
http://members.xoom.com/chrissawer/  <-- ArmLinux Binaries, Hints and Tips
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Chris Sawer <[email-masked]>
Date: Wed, 18 Nov 1998 21:59:11 +0000

In message <[email-masked]> you wrote:

> The problems come when I try and compile egcs, however.

Aarrrggghhh! I meant to say glibc, of course.

Sorry,

Chris

---

From: Philip Blundell <[email-masked]>
Date: Thu, 19 Nov 1998 11:04:48 +0100

>libraries to add an index,

This sort of thing usually means you're using the wrong `ar' for some reason.

>/glibc/glibc-build/libc.so.6: undefined reference to `__syscall__sysctl'

Your kernel is missing one of the needed syscalls.  Add a definition of 
__NR__sysctl to <asm/unistd.h>.  You can get the right number from a 2.1 
kernel.

p.