Subject: Re: Build failure: multiple definitions of mbrtowc and wcrtomb
To: Andreas Gustafsson <>
From: Paul Goyette <>
List: current-users
Date: 03/03/2007 09:35:47
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE

On Sat, 3 Mar 2007, Andreas Gustafsson wrote:

> The build is still failing for me, despite Christos saying he fixed
> it.  In fact, it has gotten worse: now both mbrtowc and wcrtomb are
> multiply defined:
> #      link  ramdisk-big/ramdiskbin
> /usr/build/1050/tools/bin/i386--netbsdelf-gcc -Wl,-nostdlib  -Wl,-Map,ram=,--cref -static -o ramdiskbin  -Wl,-rpath-link,/usr/build/1050/d=
estdir/lib:/usr/build/1050/destdir/usr/lib  -L/usr/build/1050/destdir/lib  =
-B/usr/build/1050/destdir/usr/lib/ -B/usr/build/1050/destdir/usr/lib/   ram=
diskbin.o cat.cro chmod.cro cp.cro ln.cro ls.cro mkdir.cro mv.cro pax.cro p=
wd.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 m=
ount_msdos.cro mount_nfs.cro newfs.cro ping.cro reboot.cro route.cro swapct=
l.cro umount.cro ftp.cro gzip.cro sed.cro chown.cro chroot.cro chio.cro dd.=
cro df.cro ed.cro mt.cro rcmd.cro sync.cro dhclient.cro fdisk.cro mount_ext=
2fs.cro mount_ntfs.cro raidctl.cro restore.cro scsictl.cro shutdown.cro sla=
ttach.cro sysctl.cro less.cro tip.cro installboot.cro wiconfig.cro sysinst.=
cro progress.cro ping6.cro rtsol.cro  libhack.o -lbz2 -ledit -lutil -lcurse=
s -ltermcap -lrmt -lcrypt -ll -lm -lz   -L/usr/build/1050/destdir/usr/lib -=
> /usr/build/1050/destdir/usr/lib/libc.a(multibyte_amd1.o): In function `mb=
> /usr/src/lib/libc/locale/multibyte_amd1.c:85: multiple definition of `mbr=
> libhack.o:: first defined here
> /usr/build/1050/tools/lib/gcc/i386--netbsdelf/4.1.2/../../../../i386--net=
bsdelf/bin/ld: Warning: size of symbol `mbrtowc' changed from 23 in libhack=
=2Eo to 123 in /usr/build/1050/destdir/usr/lib/libc.a(multibyte_amd1.o)
> /usr/build/1050/destdir/usr/lib/libc.a(multibyte_amd1.o): In function `wc=
> /usr/src/lib/libc/locale/multibyte_amd1.c:117: multiple definition of `wc=
> libhack.o:: first defined here
> /usr/build/1050/tools/lib/gcc/i386--netbsdelf/4.1.2/../../../../i386--net=
bsdelf/bin/ld: Warning: size of symbol `wcrtomb' changed from 18 in libhack=
=2Eo to 120 in /usr/build/1050/destdir/usr/lib/libc.a(multibyte_amd1.o)
> collect2: ld returned 1 exit status
> This is building everything from scratch (starting with an empty
> objdir, destdir, and tooldir).

Hmmm.  I just wiped my tooldir, reldir, destdir, and objdir and did a=20
new `` release'' without any problem on amd64.