This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
CVS build fails for x86 (SUSE 9.3, gcc 4.2.1) with multiple definition of __memcpy_chk
- From: "Hillier, Gernot" <gernot dot hillier at siemens dot com>
- To: libc-alpha at sourceware dot org
- Date: Tue, 02 Oct 2007 13:01:46 +0200
- Subject: CVS build fails for x86 (SUSE 9.3, gcc 4.2.1) with multiple definition of __memcpy_chk
Hi!
Just wanted to let you know, that for me the build of a current CVS
snapshot of libc fails for x86 while it works for x86_64.
Error messages are:
: /home/hillier_g/build-libc-default/libc_nonshared.a
gcc -nostdlib -nostartfiles -r -o
/home/hillier_g/build-libc-default/libc_pic.os \
-Wl,-d -Wl,--whole-archive
/home/hillier_g/build-libc-default/libc_pic.a
/home/hillier_g/build-libc-default/libc_pic.a(memcpy_chk.os): In
function `__memcpy_chk':
/home/hillier_g/libc/debug/memcpy_chk.c:32: multiple definition of
`__memcpy_chk'
/home/hillier_g/build-libc-default/libc_pic.a(memcpy.os):(.text+0x0):
first defined here
/home/hillier_g/build-libc-default/libc_pic.a(mempcpy_chk.os): In
function `__mempcpy_chk':
/home/hillier_g/libc/debug/mempcpy_chk.c:33: multiple definition of
`__mempcpy_chk'
/home/hillier_g/build-libc-default/libc_pic.a(mempcpy.os):(.text+0x0):
first defined here
/home/hillier_g/build-libc-default/libc_pic.a(memset_chk.os): In
function `__memset_chk':
/home/hillier_g/libc/debug/memset_chk.c:28: multiple definition of
`__memset_chk'
/home/hillier_g/build-libc-default/libc_pic.a(memset.os):(.text+0x0):
first defined here
collect2: ld returned 1 exit status
make[1]: *** [/home/hillier_g/build-libc-default/libc_pic.os] Fehler 1
As far as I can see, the problem is that definitions of __memcpy_chk are
drawn in from string/memcpy.os as well as from debug/memcpy_chk.os
(probably originating from sysdeps/i386/i586/mempcpy.S as well as from
debug/memcpy_chk.c).
Configure line was:
../libc/configure --prefix=/usr --enable-add-ons=nptl --host=i586-linux-gnu
> gcc -v
Using built-in specs.
Target: i586-suse-linux
Configured with: ../configure --enable-threads=posix --prefix=/usr
--with-local-prefix=/usr/local --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib
--enable-languages=c,c++,objc,fortran,obj-c++,java,ada
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.2.1
--enable-ssp --disable-libssp --disable-libgcj --with-slibdir=/lib
--with-system-zlib --enable-shared --enable-__cxa_atexit
--enable-libstdcxx-allocator=new --disable-libstdcxx-pch
--program-suffix=-4.2 --enable-version-specific-runtime-libs
--without-system-libunwind --with-cpu=generic --host=i586-suse-linux
Thread model: posix
gcc version 4.2.1 (SUSE Linux)
The problem is not critical for me as I only need the x86_64 build;
however if you are interested in debugging the issue, I'm happy to help
as far as I can. :-)
--
With kind regard,
Gernot Hillier
Siemens AG, CT SE 2
Corporate Competence Center Embedded Linux