All of lore.kernel.org
 help / color / mirror / Atom feed
* mips linux glibc-2.3.3 build - linker errors
@ 2004-10-08  9:29 T. P. Saravanan
  2004-10-08  9:53 ` T. P. Saravanan
  0 siblings, 1 reply; 3+ messages in thread
From: T. P. Saravanan @ 2004-10-08  9:29 UTC (permalink / raw)
  To: linux-mips

Hi,

glibc-2.3.3 build on linux-mips breaks down with following linker error:

sara@eyeore: [over] ~/build/glibc/objdir6$ make
make -r PARALLELMFLAGS="" CVSOPTS="" -C ../glibc-2.3.3 objdir=`pwd` all
make[1]: Entering directory `/home/sara/build/glibc/glibc-2.3.3'
make  -C csu subdir_lib
.
.
.
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory `/home/sara/build/glibc/glibc-2.3.3/time'
make[3]: Leaving directory `/home/sara/build/glibc/glibc-2.3.3/elf'
make[2]: Leaving directory `/home/sara/build/glibc/glibc-2.3.3/elf'
gcc -mabi=32   -nostdlib -nostartfiles -r -o 
/home/sara/build/glibc/objdir6/libc_pic.os \
 -Wl,-d -Wl,--whole-archive /home/sara/build/glibc/objdir6/libc_pic.a
/home/sara/build/glibc/objdir6/libc_pic.a(strtold_l.os)(.text+0x0): In 
function `*__GI___strtold_internal':
../sysdeps/generic/strtold.c:25: multiple definition of 
`__GI___strtold_internal'
/home/sara/build/glibc/objdir6/libc_pic.a(strtold.os)(.text+0x0):../sysdeps/generic/strtold.c:25: 
first defined here
/home/sara/build/glibc/objdir6/libc_pic.a(strtold_l.os)(.text+0x0): In 
function `*__GI___strtold_internal':
../sysdeps/generic/strtold.c:25: multiple definition of `__strtold_internal'
/home/sara/build/glibc/objdir6/libc_pic.a(strtold.os)(.text+0x0):../sysdeps/generic/strtold.c:25: 
first defined here
/home/sara/build/glibc/objdir6/libc_pic.a(strtold_l.os)(.text+0x38): In 
function `strtold':
../sysdeps/generic/strtold.c:32: multiple definition of `strtold'
/home/sara/build/glibc/objdir6/libc_pic.a(strtold.os)(.text+0x38):../sysdeps/generic/strtold.c:32: 
first defined here
collect2: ld returned 1 exit status
make[1]: *** [/home/sara/build/glibc/objdir6/libc_pic.os] Error 1
make[1]: Leaving directory `/home/sara/build/glibc/glibc-2.3.3'
make: *** [all] Error 2

I tried to compare against the latest CVS - the files have involved have 
seemed to be
renamed/deleted etc.  So it is difficult to follow the changes. 

Does somebody know to a fix to get ahead?

More information follows.

Changes made to glibc-2.2.3:

diff -r -u orig/glibc-2.3.3/sysdeps/mips/dl-machine.h 
glibc-2.3.3/sysdeps/mips/dl-machine.h
--- orig/glibc-2.3.3/sysdeps/mips/dl-machine.h    Thu Jul 31 12:03:52 2003
+++ glibc-2.3.3/sysdeps/mips/dl-machine.h    Tue Oct  5 16:19:22 2004
@@ -474,7 +474,7 @@
     " STRINGXP(PTR_LA) " $25, _dl_start_user\n\
     .globl _dl_start_user\n\
     .type _dl_start_user,@function\n\
-    .ent _dl_start_user\n\
+    .aent _dl_start_user\n\
 _dl_start_user:\n\
     " STRINGXP(SETUP_GP) "\n\
     " STRINGXV(SETUP_GP64($18,_dl_start_user)) "\n\
@@ -512,8 +512,7 @@
     " STRINGXP(PTR_LA) " $2, _dl_fini\n\
     # Jump to the user entry point.\n\
     move $25, $17\n\
-    jr $25\n\
-    .end _dl_start_user\n\t"\
+    jr $25\n\t"\
     _RTLD_EPILOGUE(ENTRY_POINT)\
     ".previous"\
 );
diff -r -u orig/glibc-2.3.3/sysdeps/mips/machine-gmon.h 
glibc-2.3.3/sysdeps/mips/machine-gmon.h
--- orig/glibc-2.3.3/sysdeps/mips/machine-gmon.h    Mon Mar 17 21:23:37 2003
+++ glibc-2.3.3/sysdeps/mips/machine-gmon.h    Wed Oct  6 09:47:36 2004
@@ -1,5 +1,5 @@
 /* Machine-specific calling sequence for `mcount' profiling function.  MIPS
-   Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003
+   Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004
     Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -18,6 +18,8 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <sgidefs.h>
+
 #define _MCOUNT_DECL(frompc,selfpc) \
 static void __attribute_used__ __mcount (u_long frompc, u_long selfpc)
 
@@ -81,10 +83,10 @@
 # define CPRETURN
 #endif
 
-#if defined _ABIN32 && _MIPS_SIM == _ABIN32
+#if _MIPS_SIM == _MIPS_SIM_NABI32
 # define PTR_ADDU_STRING "add" /* no u */
 # define PTR_SUBU_STRING "sub" /* no u */
-#elif defined _ABI64 && _MIPS_SIM == _ABI64
+#elif _MIPS_SIM == _MIPS_SIM_ABI64
 # define PTR_ADDU_STRING "daddu"
 # define PTR_SUBU_STRING "dsubu"
 #else


System details:

Host type: mipsel-unknown-linux-gnu
System: Linux eyeore 2.4.25 #20 Wed Sep 29 09:01:29 IST 2004 mips unknown
Architecture: mips

Addons: linuxthreads
Build CFLAGS: -mips32 -O2 -g
Build CC: gcc
Compiler version: 3.4.2
Kernel headers: 2.4.25
Symbol versioning: yes
Build static: yes
Build shared: yes
Build pic-default: yes
Build profile: yes
Build omitfp: no
Build bounded: no
Build static-nss: no

sara@eyeore: [over] ~/tmp$ cat /proc/cpuinfo
system type             : ITE QED-4N-S01B
processor               : 0
cpu model               : Nevada V3.1  FPU V3.0
BogoMIPS                : 299.00
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 48
extra interrupt vector  : yes
hardware watchpoint     : no
VCED exceptions         : not available
VCEI exceptions         : not available

-Sa.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mips linux glibc-2.3.3 build - linker errors
  2004-10-08  9:29 mips linux glibc-2.3.3 build - linker errors T. P. Saravanan
@ 2004-10-08  9:53 ` T. P. Saravanan
  2004-10-08 10:13   ` T. P. Saravanan
  0 siblings, 1 reply; 3+ messages in thread
From: T. P. Saravanan @ 2004-10-08  9:53 UTC (permalink / raw)
  To: linux-mips

T. P. Saravanan wrote:

> glibc-2.3.3 build on linux-mips breaks down with following linker error:
>
> sara@eyeore: [over] ~/build/glibc/objdir6$ make
> make -r PARALLELMFLAGS="" CVSOPTS="" -C ../glibc-2.3.3 objdir=`pwd` all
> make[1]: Entering directory `/home/sara/build/glibc/glibc-2.3.3'
> make  -C csu subdir_lib
> .
> .
> .
> make[4]: Nothing to be done for `rtld-all'.
> make[4]: Leaving directory `/home/sara/build/glibc/glibc-2.3.3/time'
> make[3]: Leaving directory `/home/sara/build/glibc/glibc-2.3.3/elf'
> make[2]: Leaving directory `/home/sara/build/glibc/glibc-2.3.3/elf'
> gcc -mabi=32   -nostdlib -nostartfiles -r -o 
> /home/sara/build/glibc/objdir6/libc_pic.os \
> -Wl,-d -Wl,--whole-archive /home/sara/build/glibc/objdir6/libc_pic.a
> /home/sara/build/glibc/objdir6/libc_pic.a(strtold_l.os)(.text+0x0): In 
> function `*__GI___strtold_internal':
> ../sysdeps/generic/strtold.c:25: multiple definition of 
> `__GI___strtold_internal'
> /home/sara/build/glibc/objdir6/libc_pic.a(strtold.os)(.text+0x0):../sysdeps/generic/strtold.c:25: 
> first defined here
> /home/sara/build/glibc/objdir6/libc_pic.a(strtold_l.os)(.text+0x0): In 
> function `*__GI___strtold_internal':
> ../sysdeps/generic/strtold.c:25: multiple definition of 
> `__strtold_internal'
> /home/sara/build/glibc/objdir6/libc_pic.a(strtold.os)(.text+0x0):../sysdeps/generic/strtold.c:25: 
> first defined here
> /home/sara/build/glibc/objdir6/libc_pic.a(strtold_l.os)(.text+0x38): 
> In function `strtold':
> ../sysdeps/generic/strtold.c:32: multiple definition of `strtold'
> /home/sara/build/glibc/objdir6/libc_pic.a(strtold.os)(.text+0x38):../sysdeps/generic/strtold.c:32: 
> first defined here
> collect2: ld returned 1 exit status
> make[1]: *** [/home/sara/build/glibc/objdir6/libc_pic.os] Error 1
> make[1]: Leaving directory `/home/sara/build/glibc/glibc-2.3.3'
> make: *** [all] Error 2
>
ar -d lib_pic.a strtold.os

got me be beyond this point. 
(If somebody knows that this is not the way to do it - let me know.)

-Sa.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mips linux glibc-2.3.3 build - linker errors
  2004-10-08  9:53 ` T. P. Saravanan
@ 2004-10-08 10:13   ` T. P. Saravanan
  0 siblings, 0 replies; 3+ messages in thread
From: T. P. Saravanan @ 2004-10-08 10:13 UTC (permalink / raw)
  To: linux-mips

T. P. Saravanan wrote:

> ar -d lib_pic.a strtold.os
>
> got me be beyond this point. (If somebody knows that this is not the 
> way to do it - let me know.)
>
> -Sa.
>
Further liker errors:

sara@eyeore: [over] ~/build/glibc/objdir6$ make
make -r PARALLELMFLAGS="" CVSOPTS="" -C ../glibc-2.3.3 objdir=`pwd` all
make[1]: Entering directory `/home/sara/build/glibc/glibc-2.3.3'
make  -C csu subdir_lib
.
.
.
make[4]: Leaving directory `/home/sara/build/glibc/glibc-2.3.3/time'
make[3]: Leaving directory `/home/sara/build/glibc/glibc-2.3.3/elf'
make[2]: Leaving directory `/home/sara/build/glibc/glibc-2.3.3/elf'
gcc -mabi=32   -nostdlib -nostartfiles -r -o 
/home/sara/build/glibc/objdir6/libc_pic.os \
 -Wl,-d -Wl,--whole-archive /home/sara/build/glibc/objdir6/libc_pic.a
gcc -mabi=32   -shared -Wl,-O1 \
  -nostdlib -nostartfiles \
   -Wl,-dynamic-linker=/home/sara/usr/local/lib/ld.so.1  \
  -Wl,--verbose 2>&1 | \
  sed > /home/sara/build/glibc/objdir6/shlib.ldsT \
      -e '/^=========/,/^=========/!d;/^=========/d' \
      -e 's/^.*\.hash[     ]*:.*$/  .note.ABI-tag : { *(.note.ABI-tag) } 
&/' \
      -e 's/^.*\*(\.dynbss).*$/& \
     PROVIDE(__start___libc_freeres_ptrs = .); \
     *(__libc_freeres_ptrs) \
     PROVIDE(__stop___libc_freeres_ptrs = .);/'
mv -f /home/sara/build/glibc/objdir6/shlib.ldsT 
/home/sara/build/glibc/objdir6/shlib.lds
gcc -mabi=32   -shared -static-libgcc -Wl,-O1  -Wl,-z,defs 
-Wl,-dynamic-linker=/home/sara/usr/local/lib/ld.so.1  
-B/home/sara/build/glibc/objdir6/csu/  
-Wl,--version-script=/home/sara/build/glibc/objdir6/libc.map 
-Wl,-soname=libc.so.6  -nostdlib -nostartfiles -e __libc_main 
-L/home/sara/build/glibc/objdir6 -L/home/sara/build/glibc/objdir6/math 
-L/home/sara/build/glibc/objdir6/elf 
-L/home/sara/build/glibc/objdir6/dlfcn 
-L/home/sara/build/glibc/objdir6/nss 
-L/home/sara/build/glibc/objdir6/nis -L/home/sara/build/glibc/objdir6/rt 
-L/home/sara/build/glibc/objdir6/resolv 
-L/home/sara/build/glibc/objdir6/crypt 
-L/home/sara/build/glibc/objdir6/linuxthreads 
-Wl,-rpath-link=/home/sara/build/glibc/objdir6:/home/sara/build/glibc/objdir6/math:/home/sara/build/glibc/objdir6/elf:/home/sara/build/glibc/objdir6/dlfcn:/home/sara/build/glibc/objdir6/nss:/home/sara/build/glibc/objdir6/nis:/home/sara/build/glibc/objdir6/rt:/home/sara/build/glibc/objdir6/resolv:/home/sara/build/glibc/objdir6/crypt:/home/sara/build/glibc/objdir6/linuxthreads 
-o /home/sara/build/glibc/objdir6/libc.so -T 
/home/sara/build/glibc/objdir6/shlib.lds 
/home/sara/build/glibc/objdir6/csu/abi-note.o 
/home/sara/build/glibc/objdir6/elf/soinit.os 
/home/sara/build/glibc/objdir6/libc_pic.os 
/home/sara/build/glibc/objdir6/elf/sofini.os 
/home/sara/build/glibc/objdir6/elf/interp.os 
/home/sara/build/glibc/objdir6/elf/ld.so -lgcc -lgcc_eh
/home/sara/build/glibc/objdir6/libc_pic.os(.text+0x88f3c): In function 
`round_and_return':
../stdlib/strtod.c:296: undefined reference to `__mpn_construct_long_double'
/home/sara/build/glibc/objdir6/libc_pic.os(.text+0x920bc):../stdlib/strtod.c:296: 
undefined reference to `__mpn_construct_long_double'
collect2: ld returned 1 exit status
make[1]: *** [/home/sara/build/glibc/objdir6/libc.so] Error 1
make[1]: Leaving directory `/home/sara/build/glibc/glibc-2.3.3'
make: *** [all] Error 2

Anybody knows how to fix this?

-Sa.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-10-08 10:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-08  9:29 mips linux glibc-2.3.3 build - linker errors T. P. Saravanan
2004-10-08  9:53 ` T. P. Saravanan
2004-10-08 10:13   ` T. P. Saravanan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.