Two errors [Failure]compiling glibc on Mklinux
Kaoru Fukui
k_fukui@highway.ne.jp
Sat May 23 05:20:00 GMT 1998
Hi
I have 2 errors.
I have not be able to compile,yet.
Using my patch i came over the Fist error.
Please recheck, is that OK?
I red glibc-2.0.93/csu/Makefile.
Crti.S,crtn.S are created switching with the labels from initfini.s.
I am afraid of changeing by a optimize.
Why have each 2 files?
I think,this method is no good.
Secound error is dificcult for me.
Please teach me how to.
My system is under that.
Mklinux in PM-6100/66
ecgs-1.0.3a
kernel-headers-2.1.24-980121.ppc.rpm
===========
Fist error
===========
I show fist error.
<<making result>>
make[2]: Nothing to be done for `others'.
make[2]: Leaving directory `/wk-glibc/glibc-2.0.93/ctype'
make -C db2 others
make[2]: Entering directory `/wk-glibc/glibc-2.0.93/db2'
gcc -shared -o /wk-glibc/build-glibc/db2/libdb.so -Wl,-dynamic-linker=/lib
/ld.so.1 -B/wk-glibc/build-glibc/csu/ -Wl,-soname=libdb.so.3 -L/wk-glibc/
build-glibc -L/wk-glibc/build-glibc/math -L/wk-glibc/build-glibc/elf -L/wk-glibc
/build-glibc/nss -L/wk-glibc/build-glibc/nis -L/wk-glibc/build-glibc/db2 -L/
wk-glibc/build-glibc/rt -L/wk-glibc/build-glibc/linuxthreads -Wl,-rpath-link
=/wk-glibc/build-glibc:/wk-glibc/build-glibc/math:/wk-glibc/build-glibc/elf:
/wk-glibc/build-glibc/nss:/wk-glibc/build-glibc/nis:/wk-glibc/build-glibc/db2
:/wk-glibc/build-glibc/rt:/wk-glibc/build-glibc/linuxthreads -Wl,--whole-archive
/wk-glibc/build-glibc/db2/libdb_pic.a /wk-glibc/build-glibc/interp.os /wk-glibc
/build-glibc/libc.so -Wl,--no-whole-archive
/wk-glibc/build-glibc/csu/crtn.o: In function `dummy':
/wk-glibc/build-glibc/csu/crtn.o(.text+0x0): multiple definition of `dummy'
/wk-glibc/build-glibc/csu/crti.o(.text+0x0): first defined here
/wk-glibc/build-glibc/csu/crtn.o: In function `_init':
/wk-glibc/build-glibc/csu/crtn.o(.text+0x2c): multiple definition of `_init'
/wk-glibc/build-glibc/csu/crti.o(.text+0x58): first defined here
/wk-glibc/build-glibc/csu/crtn.o: In function `_fini':
/wk-glibc/build-glibc/csu/crtn.o(.init+0x20): multiple definition of `_fini'
/wk-glibc/build-glibc/csu/crti.o(.init+0x10): first defined here
collect2: ld returned 1 exit status
make[2]: *** [/wk-glibc/build-glibc/db2/libdb.so] Error 1
make[2]: Leaving directory `/wk-glibc/glibc-2.0.93/db2'
make[1]: *** [db2/others] Error 2
make[1]: Leaving directory `/wk-glibc/glibc-2.0.93'
make: *** [all] Error 2
<<crti.S>>
.file "initfini.c"
# rs6000/powerpc options: -msdata=data -G 8
# GNU C version egcs-2.90.29 980515 (egcs-1.0.3 release) (powerpc-unknown-linux-gnulibc1
) compiled by GNU C version egcs-2.90.28 980423 (egcs-1.0.3 prerelease).
# options passed: -g0 -g0 -O3 -Wall -Winline -Wno-parentheses
# -Wstrict-prototypes -Wwrite-strings -fpic -fpic -finhibit-size-directive
# -fno-exceptions
# options enabled: -fdefer-pop -fomit-frame-pointer -fcse-follow-jumps
# -fcse-skip-blocks -fexpensive-optimizations -fthread-jumps
# -fstrength-reduce -fpeephole -fforce-mem -ffunction-cse
# -finline-functions -finline -fkeep-static-consts -fcaller-saves
# -fpcc-struct-return -frerun-cse-after-loop -frerun-loop-opt
# -fschedule-insns -fschedule-insns2 -fsched-interblock -fsched-spec -fpic
# -fsjlj-exceptions -fcommon -finhibit-size-directive -fverbose-asm
# -fgnu-linker -fregmove -falias-check -fargument-alias -mpowerpc
# -mnew-mnemonics -mcall-sysv -msdata=data
gcc2_compiled.:
#include "defs.h"
/*@HEADER_ENDS*/
/*@_init_PROLOG_BEGINS*/
.section .init
END_INIT
/*@_init_EPILOG_ENDS*/
/*@_fini_PROLOG_BEGINS*/
.section .fini
END_FINI
/*@_fini_EPILOG_ENDS*/
/*@TRAILER_BEGINS*/
/*@TRAILER_BEGINS*/
.section ".text"
.section ".text"
.align 2
.align 2
.globl dummy
.globl dummy
.type dummy,@function
.type dummy,@function
dummy:
dummy:
stwu 1,-16(1)
stwu 1,-16(1)
mflr 0
mflr 0
stw 0,20(1)
stw 0,20(1)
mr. 9,3
mr. 9,3
bc 12,2,.L19
bc 12,2,.L19
mtlr 9
mtlr 9
blrl
blrl
.L19:
.L19:
lwz 0,20(1)
lwz 0,20(1)
mtlr 0
mtlr 0
addi 1,1,16
addi 1,1,16
blr
blr
.align 2
.align 2
.globl _init
.globl _init
.type _init,@function
.type _init,@function
_init:
_init:
stwu 1,-16(1)
stwu 1,-16(1)
mflr 0
mflr 0
stw 0,20(1)
stw 0,20(1)
bl _GLOBAL_OFFSET_TABLE_@local-4
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr 9
mflr 9
lwz 0,__gmon_start__@got(9)
lwz 0,__gmon_start__@got(9)
cmpwi 1,0,0
cmpwi 1,0,0
bc 12,6,.L21
bc 12,6,.L21
bl __gmon_start__@plt
bl __gmon_start__@plt
.L21:
.L21:
ALIGN
ALIGN
END_INIT
END_INIT
/*@_init_PROLOG_ENDS*/
/*@_init_PROLOG_ENDS*/
/*@_init_EPILOG_BEGINS*/
.section .init
lwz 0,20(1)
mtlr 0
addi 1,1,16
blr
.align 2
.globl _fini
.type _fini,@function
_fini:
stwu 1,-16(1)
mflr 0
stw 0,20(1)
ALIGN
END_FINI
/*@_fini_PROLOG_ENDS*/
bl i_am_not_a_leaf@plt
/*@_fini_EPILOG_BEGINS*/
.section .fini
lwz 0,20(1)
mtlr 0
addi 1,1,16
blr
.ident "GCC: (GNU) egcs-2.90.29 980515 (egcs-1.0.3 release)"
<<crtn.S>>
.file "initfini.c"
# rs6000/powerpc options: -msdata=data -G 8
# GNU C version egcs-2.90.29 980515 (egcs-1.0.3 release) (powerpc-unknown-linux-gnulibc1
) compiled by GNU C version egcs-2.90.28 980423 (egcs-1.0.3 prerelease).
# options passed: -g0 -g0 -O3 -Wall -Winline -Wno-parentheses
# -Wstrict-prototypes -Wwrite-strings -fpic -fpic -finhibit-size-directive
# -fno-exceptions
# options enabled: -fdefer-pop -fomit-frame-pointer -fcse-follow-jumps
# -fcse-skip-blocks -fexpensive-optimizations -fthread-jumps
# -fstrength-reduce -fpeephole -fforce-mem -ffunction-cse
# -finline-functions -finline -fkeep-static-consts -fcaller-saves
# -fpcc-struct-return -frerun-cse-after-loop -frerun-loop-opt
# -fschedule-insns -fschedule-insns2 -fsched-interblock -fsched-spec -fpic
# -fsjlj-exceptions -fcommon -finhibit-size-directive -fverbose-asm
# -fgnu-linker -fregmove -falias-check -fargument-alias -mpowerpc
# -mnew-mnemonics -mcall-sysv -msdata=data
gcc2_compiled.:
#include "defs.h"
/*@HEADER_ENDS*/
/*@TRAILER_BEGINS*/
.section ".text"
.align 2
.globl dummy
.type dummy,@function
dummy:
stwu 1,-16(1)
mflr 0
stw 0,20(1)
mr. 9,3
bc 12,2,.L19
mtlr 9
blrl
.L19:
lwz 0,20(1)
mtlr 0
addi 1,1,16
blr
.align 2
.globl _init
.type _init,@function
_init:
stwu 1,-16(1)
mflr 0
stw 0,20(1)
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr 9
lwz 0,__gmon_start__@got(9)
cmpwi 1,0,0
bc 12,6,.L21
bl __gmon_start__@plt
.L21:
ALIGN
END_INIT
/*@_init_PROLOG_ENDS*/
/*@_init_EPILOG_BEGINS*/
/*@_init_EPILOG_BEGINS*/
.section .init
.section .init
lwz 0,20(1)
lwz 0,20(1)
mtlr 0
mtlr 0
addi 1,1,16
addi 1,1,16
blr
blr
.align 2
.align 2
.globl _fini
.globl _fini
.type _fini,@function
.type _fini,@function
_fini:
_fini:
stwu 1,-16(1)
stwu 1,-16(1)
mflr 0
mflr 0
stw 0,20(1)
stw 0,20(1)
ALIGN
ALIGN
END_FINI
END_FINI
/*@_fini_PROLOG_ENDS*/
/*@_fini_PROLOG_ENDS*/
bl i_am_not_a_leaf@plt
bl i_am_not_a_leaf@plt
/*@_fini_EPILOG_BEGINS*/
/*@_fini_EPILOG_BEGINS*/
.section .fini
.section .fini
lwz 0,20(1)
lwz 0,20(1)
mtlr 0
mtlr 0
addi 1,1,16
addi 1,1,16
blr
blr
.ident "GCC: (GNU) egcs-2.90.29 980515 (egcs-1.0.3 release)"
.ident "GCC: (GNU) egcs-2.90.29 980515 (egcs-1.0.3 release)"
> From: Ulrich Drepper <drepper@cygnus.com>
>
> Consider installing GNU sed. The rewrite of the sources using sed failed.
>
I installed sed-3.01-beta6.tar.gz.
But the result is no change.
I found the cause in glibc-2.0.93/csu/Makefile.
The labels which created by the compilure is cross over,
then I make this patch.
=====================
--- glibc-2.0.93/csu/Makefile Fri May 22 14:56:57 1998
+++ glibc-2.0.93/csu/Makefile.fixed Fri May 22 14:56:19 1998
@@ -75,13 +75,12 @@
# shared libraries are build using the PIC version.
$(objpfx)crti.S: $(objpfx)initfini.s
sed -n -e '1,/@HEADER_ENDS/p' \
- -e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \
- -e '/@TRAILER_BEGINS/,$$p' $< > $@
+ -e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' $< >$@
$(objpfx)crtn.S: $(objpfx)initfini.s
sed -n -e '1,/@HEADER_ENDS/p' \
- -e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \
- -e '/@TRAILER_BEGINS/,$$p' $< > $@
+ -e '/@_init_EPILOG_BEGINS/,/@_fini_PROLOG_ENDS/p' \
+ -e '/@_fini_EPILOG_BEGINS/,$$p' $< >$@
$(objpfx)defs.h: $(objpfx)initfini.s
sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \
=====================
=================
Second error
=================
make[2]: Entering directory `/wk-glibc-egcs103a/glibc-2.0.93/assert'
make[2]: Nothing to be done for `others'.
make[2]: Leaving directory `/wk-glibc-egcs103a/glibc-2.0.93/assert'
make -C ctype others
make[2]: Entering directory `/wk-glibc-egcs103a/glibc-2.0.93/ctype'
make[2]: Nothing to be done for `others'.
make[2]: Leaving directory `/wk-glibc-egcs103a/glibc-2.0.93/ctype'
make -C db2 others
make[2]: Entering directory `/wk-glibc-egcs103a/glibc-2.0.93/db2'
gcc -nostdlib -nostartfiles -o /wk-glibc-egcs103a/build-glibc/db2/makedb -Wl
,-dynamic-linker=/lib/ld.so.1 /wk-glibc-egcs103a/build-glibc/csu/crt1.o /wk-glibc-egcs103a
/build-glibc/csu/crti.o `gcc --print-file-name=crtbegin.o` /wk-glibc-egcs103a
/build-glibc/db2/makedb.o /wk-glibc-egcs103a/build-glibc/db2/libdb.so.3 -Wl
,-rpath-link=/wk-glibc-egcs103a/build-glibc:/wk-glibc-egcs103a/build-glibc/math
:/wk-glibc-egcs103a/build-glibc/elf:/wk-glibc-egcs103a/build-glibc/nss:/wk-glibc-egcs103a
/build-glibc/nis:/wk-glibc-egcs103a/build-glibc/db2:/wk-glibc-egcs103a/build-glibc
/rt:/wk-glibc-egcs103a/build-glibc/linuxthreads /wk-glibc-egcs103a/build-glibc
/libc.so.6 /wk-glibc-egcs103a/build-glibc/libc_nonshared.a -lgcc `gcc --print-file-name
=crtend.o` /wk-glibc-egcs103a/build-glibc/csu/crtn.o
/wk-glibc-egcs103a/build-glibc/libc.so.6: undefined reference to `__syscall_
pread64'
/wk-glibc-egcs103a/build-glibc/libc.so.6: undefined reference to `__syscall_
pwrite64'
collect2: ld returned 1 exit status
make[2]: *** [/wk-glibc-egcs103a/build-glibc/db2/makedb] Error 1
make[2]: Leaving directory `/wk-glibc-egcs103a/glibc-2.0.93/db2'
make[1]: *** [db2/others] Error 2
make[1]: Leaving directory `/wk-glibc-egcs103a/glibc-2.0.93'
make: *** [all] Error 2
Kaoru Fukui
k_fukui@highway.ne.jp
More information about the Libc-alpha
mailing list