NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/40003: Adding wpa_cli to a ramdisk has duplicate symbols



>Number:         40003
>Category:       bin
>Synopsis:       Adding wpa_cli to a ramdisk breaks linking with duplicate 
>symbols
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 22 11:00:01 +0000 2008
>Originator:     Stephen Borrill
>Release:        NetBSD 5.0_BETA
>Organization:
Precedence Technologies Ltd
>Environment:
        
        
System: NetBSD devel5.precedence.co.uk 5.0_BETA NetBSD 5.0_BETA (XEN3_DOMU) #1: 
Mon Nov 17 11:18:55 GMT 2008 
root@ugly:/usr/src/5.0/obj.i386/sys/arch/i386/compile/XEN3_DOMU i386
Architecture: i386
Machine: i386
>Description:
I need to get wpa_supplicant and wpa_cli into an embededded ramdisk. When
wpa_cli is added to the list, linking fails with duplicate symbols:
#      link  ramdisk-rescuetiny/ramdiskbin
/root/thinit/work/tools/bin/i386--netbsdelf-gcc  
-B/root/thinit/work/obj/destdir.i386/usr/lib/ 
-B/root/thinit/work/obj/destdir.i386/usr/lib/  -Wl,-nostdlib  
-Wl,-Map,ramdiskbin.map,--cref   -static  -o ramdiskbin  ramdiskbin.o cat.cro 
chmod.cro cp.cro ln.cro ls.cro mkdir.cro mv.cro pax.cro pwd.cro rm.cro sh.cro 
stty.cro disklabel.cro dmesg.cro fsck.cro fsck_ffs.cro ifconfig.cro init.cro 
mknod.cro mount.cro mount_cd9660.cro mount_ffs.cro mount_msdos.cro 
mount_nfs.cro mount_tmpfs.cro newfs.cro ping.cro reboot.cro route.cro 
swapctl.cro umount.cro ftp.cro gzip.cro sed.cro chown.cro chroot.cro dd.cro 
df.cro ed.cro mt.cro rcmd.cro sync.cro fdisk.cro restore.cro more.cro 
wpa_cli.cro  libhack.o -lbz2 -ledit -lutil -lcurses -ltermcap -lrmt -lcrypt -ll 
-lm -lz -lprop       -L/root/thinit/work/obj/destdir.i386/usr/lib   
-Wl,-rpath-link,/root/thinit/work/obj/destdir.i386/lib  
-L/root/thinit/work/obj/destdir.i386/lib 
-Wl,-rpath-link,/root/thinit/work/obj/destdir.i386/usr/lib  -L/root/thin
 it/work/obj/destdir.i386/usr/lib
/root/thinit/work/obj/destdir.i386/usr/lib/libc.a(getpwent.o): In function 
`_endpwent':
getpwent.c:(.text+0x110): multiple definition of `_endpwent'
libhack.o:: first defined here
/root/thinit/work/tools/lib/gcc/i386--netbsdelf/4.1.3/../../../../i386--netbsdelf/bin/ld:
 Warning: size of symbol `_endpwent' changed from 49 in libhack.o to 63 in 
/root/thinit/work/obj/destdir.i386/usr/lib/libc.a(getpwent.o)
/root/thinit/work/obj/destdir.i386/usr/lib/libc.a(getpwent.o): In function 
`_getpwent':
getpwent.c:(.text+0x378): multiple definition of `_getpwent'
libhack.o:: first defined here
/root/thinit/work/tools/lib/gcc/i386--netbsdelf/4.1.3/../../../../i386--netbsdelf/bin/ld:
 Warning: size of symbol `_getpwent' changed from 69 in libhack.o to 88 in 
/root/thinit/work/obj/destdir.i386/usr/lib/libc.a(getpwent.o)
/root/thinit/work/obj/destdir.i386/usr/lib/libc.a(getpwent.o): In function 
`_getpwnam':
getpwent.c:(.text+0x2a4): multiple definition of `_getpwnam'
libhack.o:: first defined here
/root/thinit/work/tools/lib/gcc/i386--netbsdelf/4.1.3/../../../../i386--netbsdelf/bin/ld:
 Warning: size of symbol `_getpwnam' changed from 49 in libhack.o to 92 in 
/root/thinit/work/obj/destdir.i386/usr/lib/libc.a(getpwent.o)
/root/thinit/work/obj/destdir.i386/usr/lib/libc.a(getpwent.o): In function 
`_getpwnam_r':
getpwent.c:(.text+0x228): multiple definition of `_getpwnam_r'
libhack.o:: first defined here
/root/thinit/work/tools/lib/gcc/i386--netbsdelf/4.1.3/../../../../i386--netbsdelf/bin/ld:
 Warning: size of symbol `_getpwnam_r' changed from 102 in libhack.o to 123 in 
/root/thinit/work/obj/destdir.i386/usr/lib/libc.a(getpwent.o)
/root/thinit/work/obj/destdir.i386/usr/lib/libc.a(getpwent.o): In function 
`_getpwuid':
getpwent.c:(.text+0x1cc): multiple definition of `_getpwuid'
libhack.o:: first defined here
/root/thinit/work/tools/lib/gcc/i386--netbsdelf/4.1.3/../../../../i386--netbsdelf/bin/ld:
 Warning: size of symbol `_getpwuid' changed from 49 in libhack.o to 92 in 
/root/thinit/work/obj/destdir.i386/usr/lib/libc.a(getpwent.o)
/root/thinit/work/obj/destdir.i386/usr/lib/libc.a(getpwent.o): In function 
`_getpwuid_r':
getpwent.c:(.text+0x150): multiple definition of `_getpwuid_r'
libhack.o:: first defined here
/root/thinit/work/tools/lib/gcc/i386--netbsdelf/4.1.3/../../../../i386--netbsdelf/bin/ld:
 Warning: size of symbol `_getpwuid_r' changed from 102 in libhack.o to 123 in 
/root/thinit/work/obj/destdir.i386/usr/lib/libc.a(getpwent.o)
/root/thinit/work/obj/destdir.i386/usr/lib/libc.a(getpwent.o): In function 
`_setpassent':
getpwent.c:(.text+0xb4): multiple definition of `_setpassent'
libhack.o:: first defined here
/root/thinit/work/tools/lib/gcc/i386--netbsdelf/4.1.3/../../../../i386--netbsdelf/bin/ld:
 Warning: size of symbol `_setpassent' changed from 30 in libhack.o to 92 in 
/root/thinit/work/obj/destdir.i386/usr/lib/libc.a(getpwent.o)
/root/thinit/work/obj/destdir.i386/usr/lib/libc.a(getpwent.o): In function 
`_setpwent':
getpwent.c:(.text+0x74): multiple definition of `_setpwent
libhack.o:: first defined here
/root/thinit/work/tools/lib/gcc/i386--netbsdelf/4.1.3/../../../../i386--netbsdelf/bin/ld:
 Warning: size of symbol `_setpwent' changed from 18 in libhack.o to 63 in 
/root/thinit/work/obj/destdir.i386/usr/lib/libc.a(getpwent.o)
collect2: ld returned 1 exit status
>How-To-Repeat:
1) cd src/distrib/i386/ramdisks/ramdisk-rescuetiny

2) Add the following lines to list:
SRCDIRS usr.sbin/wpa
PROG    usr/sbin/wpa_cli

3) make
>Fix:
        

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index