Building Glibc
Hello,
When building the GNU libc on a cross-compiler (i686 --> PowerPc 603e) I get
the following linker error (current directory: elf):
../libc_pic.a(init-first.os): In function '_dl_start':
init-first.os(.text+0xb8): multiple definition of '_dl_start' dl-allobjs.os(.text0x0): first defined here
Warning: size of symbol '_dl_start' changed from 1576 to 16 in init-first.os
collect2: ld returned 1 exit status
make[1]: *** [librtld.os] Error 1
make: *** [elf/subdir_lib] Error2
What can I do? Are there special linker/compiler options?
Regards
Rene
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 11 lines · Rene Pachernegg
Hello,
When building the GNU libc on a cross-compiler (i686 --> PowerPc 603e) I get the following linker error (current directory: elf):
../libc_pic.a(init-first.os): In function '_dl_start':
init-first.os(.text+0xb8): multiple definition of '_dl_start' dl-allobjs.os(.text0x0): first defined here Warning: size of symbol '_dl_start' changed from 1576 to 16 in init-first.os collect2: ld returned 1 exit status make[1]: *** [librtld.os] Error 1 make: *** [elf/subdir_lib] Error2
Quoted 1 line
What can I do? Are there special linker/compiler options?
What version of glibc are you using?
How did you configure glibc?
What make command line (s) did you use?
//Marcus
Signature · 3 lines
Signature under construction, please come back later. ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 14 lines · Marcus Sundberg
Quoted 11 lines · Rene Pachernegg
Hello,
When building the GNU libc on a cross-compiler (i686 --> PowerPc 603e) I get the following linker error (current directory: elf):
../libc_pic.a(init-first.os): In function '_dl_start':
init-first.os(.text+0xb8): multiple definition of '_dl_start' dl-allobjs.os(.text0x0): first defined here Warning: size of symbol '_dl_start' changed from 1576 to 16 in init-first.os collect2: ld returned 1 exit status make[1]: *** [librtld.os] Error 1 make: *** [elf/subdir_lib] Error2
Quoted 5 lines
Quoted 1 line
What can I do? Are there special linker/compiler options?
What version of glibc are you using?
How did you configure glibc?
What make command line (s) did you use?
I'd also chime in with,
What version of the compiler are you using?
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
*Note to Dave Wolfe: Changed my mail (Netscape) settings, but I'm not* *sure if its now the format that you need. If not, please appologize* *and give me some hints to upgrade my mail systems.*
Quoted 16 lines · Dan Dickey
Quoted 14 lines · Marcus Sundberg
Quoted 11 lines · Rene Pachernegg
Hello,
When building the GNU libc on a cross-compiler (i686 --> PowerPc 603e) I get the following linker error (current directory: elf):
../libc_pic.a(init-first.os): In function '_dl_start':
init-first.os(.text+0xb8): multiple definition of '_dl_start' dl-allobjs.os(.text0x0): first defined here Warning: size of symbol '_dl_start' changed from 1576 to 16 in init-first.os collect2: ld returned 1 exit status make[1]: *** [librtld.os] Error 1 make: *** [elf/subdir_lib] Error2
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
What can I do? Are there special linker/compiler options?
What version of glibc are you using?
How did you configure glibc?
What make command line (s) did you use?I'd also chime in with,
What version of the compiler are you using?
Glibc 2.1.1 (from one of the linuxppc mirror sites, source/base/..)
Compiler: egcs-2.91.57 (thats what configure says) configure --prefix=./tools/glibc --exec-prefix=./tools/glibc --with-headers=**Dir of the cross-compiled Kernel and its headers** --enable-add-ons --build=i686-*-linux --host=powerpc-*-linux-gnu CC='powerpc-eabi-gcc -b powerpc-eabi'
CFLAGS='-mcpu=603e -meabi'
Addons are just crypt und linuxthreads.
Still more has happend since yesterday. I removed everything, unpacked the glibc again and started building. This time it went a bit further and reportet:
/project/v4/software/ext-tools/egcs-1.1b-newlib/bin/powerpc-eabi-gcc -b
powerpc-eabi -shared -Wl,-O1 -o libdb1.so
-Wl,-dynamic-linker=./compile/lib/ld.so.1 -B../csu/ -Wl,--version-script=../libdb1.map -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 -Wl,--no-whole-archive
collect2: ld terminated with signal 11 [Segmentation fault]
powerpc-eabi-gcc: file path prefix `../csu/' never used
make[1]: *** [libdb1.so] Error 1
make[1]: Leaving directory `/opt/v4lx/work/linux_pkg/glibc/glibc2/db'
make: *** [db/others] Error 2
I suppose I messed something up at the first try( I'am new to powerpc cross compiling and not what you'd call an experienced linux user). I hope you have got enough information for helping me a little bit. Thanks in advance.
Regards
Rene
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 2 lines · René Pachernegg
Glibc 2.1.1 (from one of the linuxppc mirror sites, source/base/..)
Compiler: egcs-2.91.57 (thats what configure says)
Sounds old.
Quoted 26 lines
configure --prefix=./tools/glibc --exec-prefix=./tools/glibc --with-headers=**Dir of the cross-compiled Kernel and its headers** --enable-add-ons --build=i686-*-linux --host=powerpc-*-linux-gnu CC='powerpc-eabi-gcc -b powerpc-eabi'
CFLAGS='-mcpu=603e -meabi'
Addons are just crypt und linuxthreads.Still more has happend since yesterday. I removed everything, unpacked the glibc again and started building. This time it went a bit further and reportet:
/project/v4/software/ext-tools/egcs-1.1b-newlib/bin/powerpc-eabi-gcc -b
powerpc-eabi -shared -Wl,-O1 -o libdb1.so(quoted diff) +0
-7-Wl,-dynamic-linker=./compile/lib/ld.so.1 -B../csu/ -Wl,--version-script=../libdb1.map -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 -Wl,--no-whole-archivecollect2: ld terminated with signal 11 [Segmentation fault]
powerpc-eabi-gcc: file path prefix `../csu/' never used make[1]: *** [libdb1.so] Error 1
make[1]: Leaving directory `/opt/v4lx/work/linux_pkg/glibc/glibc2/db'
make: *** [db/others] Error 2
Quoted 4 lines
I suppose I messed something up at the first try( I'am new to powerpc cross compiling and not what you'd call an experienced linux user). I hope you have got enough information for helping me a little bit. Thanks in advance.
I'm not really sure a compiler built for use with newlib and eabi (is eabi what PPC Linux uses or is it another abi?) (which your compiler path and name suggests), contains the correct startup code for use with glibc and programs/libraries linked against it. The signal 11 in any case suggests that there is something very wrong with your build tools.
I suggest you install binutils 2.9.1.0.25 and gcc 2.95.2 as cross tools, and configure them with ppc-linux as target.
//Marcus
Signature · 3 lines
Signature under construction, please come back later. ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/