Subject: Problems Building ARM LINUX

From: "Marcello Giustiniani" <[email-masked]>
Date: Wed, 9 Aug 2000 15:44:34 +0100

Hi Folks ,
I need to build ARM C cross-compiler and Linux Kernel on my Host ( Pentium PC ).
I have Linux 2.2.14 with Red Hat 6.2
I follow the instructions at www.bluewaternz.com/startoff/armlinux.htm (with some changes )
I have gcc 2.95.2 and ld 2.95.2
Step 1
Installation of binutils 2.9.5.0.22 
OK
Step 2
Building of EGCS C compiler 
I use:
linux-2.2.2.tar.gz
egcs-1.1.2.tar.gz
egcs-1.1.2-arm-diff-990325
It work.
OK.
Step 3
Building the GLIBC Library
Apply the patch-2.2.2-rmk5 to the kernel source 2.2.2
Build the kernel Image OK
Unzip GLIBC libraries

glibc-2.1.2.tar.gz

glibc-linuxthreads-2.1.1.tar.gz

glibc-crypt-2.0.111.tar.gz

I configure with 

CC=arm-linux-gcc ./configure arm-linux --build =i586-pc-linux-gnu 

--prefix=/home/arm/glibc/arm-linux-glibc --enable-add-ons 

--with-headers=/home/arm/linux-2.2.2/linux/include

I run make. It work for al lot of time but FAIL !!

arm-linux-gcc -shared -Wl,-O1 -o libdb1.so -Wl,-dynamic-linker=/home/arm/glibc/arm-linux-glibc/lib/ld-linux.so.2 -B../csu/ -Wl,-soname=libdb1.so.2 -Wl,-soname=libdb.so.2 -L.. -L../math -L../elf -L../nss -L../nis -L../db2 -L../rt -L../resolv -L../linuxthreads -Wl,-rpath-link=..:../math:../elf:../nss:../nis:../db2:../rt:../resolv:../linuxthreads -Wl,--whole-archive libdb1_pic.a ../elf/interp.os ../libc.so 

/home/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/libgcc.a(__dummy.o): In function `__dummy':

__dummy.o(.text+0x0): multiple definition of `__dummy'

/home/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/libgcc.a(__dummy.o)(.text+0x0): first defined here

/home/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/libgcc.a(__gcc_bcmp.o): In function `__gcc_bcmp':

__gcc_bcmp.o(.text+0x0): multiple definition of `__gcc_bcmp'

/home/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/libgcc.a(__gcc_bcmp.o)(.text+0x0): first defined here

/home/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/libgcc.a(_ashldi3.o): In function `__ashldi3':

_ashldi3.o(.text+0x0): multiple definition of `__ashldi3'

/home/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/libgcc.a(_ashldi3.o)(.text+0x0): first defined here

/home/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/libgcc.a(_ashrdi3.o): In function `__ashrdi3':

_ashrdi3.o(.text+0x0): multiple definition of `__ashrdi3'

/home/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/libgcc.a(_ashrdi3.o)(.text+0x0): first defined here

/home/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/libgcc.a(_clear_cache.o): In function `__clear_cache':

_clear_cache.o(.text+0x0): multiple definition of `__clear_cache'

/home/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/libgcc.a(_clear_cache.o)(.text+0x0): first defined here

/home/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/libgcc.a(_cmpdi2.o): In function `__cmpdi2':

_cmpdi2.o(.text+0x0): multiple definition of `__cmpdi2'

/home/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/libgcc.a(_cmpdi2.o)(.text+0x0): first defined here

/home/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/libgcc.a(_divdi3.o): In function `__divdi3':

_divdi3.o(.text+0x0): multiple definition of `__divdi3'

/home/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/libgcc.a(_divdi3.o)(.text+0x0): first defined here

/home/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/libgcc.a(_divsi3.o): In function `__divsi3':

_divsi3.o(.text+0x0): multiple definition of `__divsi3'

AND OTHERS .....

_varargs.o(.text+0x0): multiple definition of `__builtin_saveregs'

/home/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/libgcc.a(_varargs.o)(.text+0x0): first defined here

collect2: ld returned 1 exit status

make[1]: *** [libdb1.so] Error 1

make[1]: Leaving directory `/home/arm/armbuild/glibc-2.1.2/db'

any suggestions ?

anyone has a combination of kernel source/ gcc / patches that works ???

Thanks in advance.

Ing. Marcello Giustiniani
Pointercom s.r.l.
Via Francesco De Santis 9 
00195 Roma
Italy
www.pointercom.it
Tel. +39.06.37591208
Fax +39.06.37591202 
[email-masked]

---

From: "Seger, Justin M" <[email-masked]>
Date: Wed, 9 Aug 2000 07:01:05 -0700

Unless you have some reason to be building the tools yourself, I'd recommend
that you just
install pre-built binaries.
 
You can get a set of working cross-tools for RedHat from
ftp://ftp.netwinder.org/users/c/chagas/arm-linux-cross
<ftp://ftp.netwinder.org/users/c/chagas/arm-linux-cross> 
 
If you really want to build them yourself (and building from SRPMS isn't
adequate), let me know, and I will repost
my tools building procedure.
 
Thanks,
Justin Seger

-----Original Message-----

Hi Folks ,
I need to build ARM C cross-compiler and Linux Kernel on my Host ( Pentium
PC ).
I have Linux 2.2.14 with Red Hat 6.2
I follow the instructions at www.bluewaternz.com/startoff/armlinux.htm (with
some changes )
 <text cut>

---

From: "Seger, Justin M" <[email-masked]>
Date: Wed, 9 Aug 2000 07:01:05 -0700

Thanks,
Justin Seger

-----Original Message-----

Hi Folks ,