This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: CVS build fails for x86 (SUSE 10.3, gcc 4.2.1) with multiple definition of __memcpy_chk


Hi!

(Fixed the subject - I certainly meant SUSE 10.3, not 9.3)

>> 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.
[...]
>> /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'
[...]
> Can you try this?
> 
> 
> H.J.
> ----
> 2007-09-13  H.J. Lu  <hongjiu.lu@intel.com>
> 
> 	* sysdeps/i386/i586/memcpy_chk.S: New.
> 	* sysdeps/i386/i586/mempcpy_chk.S: Likewise.
> 	* sysdeps/i386/i586/memset_chk.S: Likewise.
[...]

Hmmm, looks like we get a small bit further now, but:

gcc   -shared -static-libgcc -Wl,-O1  -Wl,-z,defs
-Wl,-dynamic-linker=/lib/ld-linux.so.2
-B/home/hillier_g/build-libc-default/csu/
-Wl,--version-script=/home/hillier_g/build-libc-default/libc.map
-Wl,-soname=libc.so.6 -Wl,-z,combreloc -Wl,-z,relro
-Wl,--hash-style=both -nostdlib -nostartfiles -e __libc_main
-L/home/hillier_g/build-libc-default
-L/home/hillier_g/build-libc-default/math
-L/home/hillier_g/build-libc-default/elf
-L/home/hillier_g/build-libc-default/dlfcn
-L/home/hillier_g/build-libc-default/nss
-L/home/hillier_g/build-libc-default/nis
-L/home/hillier_g/build-libc-default/rt
-L/home/hillier_g/build-libc-default/resolv
-L/home/hillier_g/build-libc-default/crypt
-L/home/hillier_g/build-libc-default/nptl
-Wl,-rpath-link=/home/hillier_g/build-libc-default:/home/hillier_g/build-libc-default/math:/home/hillier_g/build-libc-default/elf:/home/hillier_g/build-libc-default/dlfcn:/home/hillier_g/build-libc-default/nss:/home/hillier_g/build-libc-default/nis:/home/hillier_g/build-libc-default/rt:/home/hillier_g/build-libc-default/resolv:/home/hillier_g/build-libc-default/crypt:/home/hillier_g/build-libc-default/nptl
-o /home/hillier_g/build-libc-default/libc.so -T
/home/hillier_g/build-libc-default/shlib.lds
/home/hillier_g/build-libc-default/csu/abi-note.o
/home/hillier_g/build-libc-default/elf/soinit.os
/home/hillier_g/build-libc-default/libc_pic.os
/home/hillier_g/build-libc-default/elf/sofini.os
/home/hillier_g/build-libc-default/elf/interp.os
/home/hillier_g/build-libc-default/elf/ld.so -lgcc

/home/hillier_g/build-libc-default/libc_pic.os: In function `__libc_fork':
/home/hillier_g/libc/posix/../nptl/sysdeps/unix/sysv/linux/i386/../fork.c:76:
undefined reference to `__sync_bool_compare_and_swap_4'
/home/hillier_g/build-libc-default/libc_pic.os: In function
`__nscd_drop_map_ref':
/home/hillier_g/libc/nscd/nscd-client.h:320: undefined reference to
`__sync_fetch_and_add_4'
/home/hillier_g/build-libc-default/libc_pic.os: In function `nscd_getpw_r':
/home/hillier_g/libc/nscd/nscd_getpw_r.c:232: undefined reference to
`__sync_fetch_and_add_4'
/home/hillier_g/build-libc-default/libc_pic.os: In function
`__nscd_drop_map_ref':
/home/hillier_g/libc/nscd/nscd-client.h:320: undefined reference to
`__sync_fetch_and_add_4'
/home/hillier_g/build-libc-default/libc_pic.os: In function `nscd_getgr_r':
/home/hillier_g/libc/nscd/nscd_getgr_r.c:307: undefined reference to
`__sync_fetch_and_add_4'
/home/hillier_g/build-libc-default/libc_pic.os: In function
`__nscd_drop_map_ref':
/home/hillier_g/libc/nscd/nscd-client.h:320: undefined reference to
`__sync_fetch_and_add_4'
/home/hillier_g/build-libc-default/libc_pic.os:/home/hillier_g/libc/nscd/nscd_gethst_r.c:400:
more undefined references to `__sync_fetch_and_add_4' follow
/home/hillier_g/build-libc-default/libc_pic.os: In function
`__nscd_get_map_ref':
/home/hillier_g/libc/nscd/nscd_helper.c:371: undefined reference to
`__sync_val_compare_and_swap_4'
/home/hillier_g/build-libc-default/libc_pic.os: In function
`*__GI___libc_freeres':
/home/hillier_g/libc/malloc/set-freeres.c:39: undefined reference to
`__sync_bool_compare_and_swap_4'
collect2: ld returned 1 exit status
make[1]: *** [/home/hillier_g/build-libc-default/libc.so] Fehler 1
make[1]: Leaving directory `/home/hillier_g/libc'
make: *** [all] Fehler 2

Last time I saw this, I omitted the architecture, but this time I tried
with "--host=i586-linux-gnu" and alternatively "--build=i586-linux-gnu"
(I'm always confused which one to use), but nothing helped. :-(

-- 
Gernot Hillier

Siemens AG, CT SE 2
Corporate Competence Center Embedded Linux


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]