-8<----8<----8<----8<--- AS .tmp_kallsyms1.o LD .tmp_vmlinux2 KSYM .tmp_kallsyms2.S AS .tmp_kallsyms2.o MAIN arch/um/main.o LD vmlinux CPP arch/um/uml.lds.s gcc -Wl,-T,arch/um/uml.lds.s -static -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc \ -o linux arch/um/main.o vmlinux -L/usr/lib -lutil vmlinux(.text+0xb80e0): In function `strcpy': : multiple definition of `strcpy' arch/um/kernel/tt/unmap_fin.o(.text+0x3f7a0): first defined here /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `strcpy' changed from 33 in arch/um/kernel/tt/unmap_fin.o to 31 in vmlinux vmlinux(.text+0xb8390): In function `strrchr': : multiple definition of `strrchr' arch/um/kernel/tt/unmap_fin.o(.text+0x19130): first defined here /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `strrchr' changed from 441 in arch/um/kernel/tt/unmap_fin.o to 46 in vmlinux vmlinux(.text+0xb8310): In function `strncmp': : multiple definition of `strncmp' arch/um/kernel/tt/unmap_fin.o(.text+0x57f0): first defined here /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `strncmp' changed from 150 in arch/um/kernel/tt/unmap_fin.o to 67 in vmlinux vmlinux(.text+0xb9630): In function `sscanf': : multiple definition of `sscanf' arch/um/kernel/tt/unmap_fin.o(.text+0x32b00): first defined here /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `sscanf' changed from 33 in arch/um/kernel/tt/unmap_fin.o to 35 in vmlinux vmlinux(.text+0xb82e0): In function `strcmp': : multiple definition of `strcmp' arch/um/kernel/tt/unmap_fin.o(.text+0x5710): first defined here /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `strcmp' changed from 37 in arch/um/kernel/tt/unmap_fin.o to 38 in vmlinux vmlinux(.text+0xb8360): In function `strchr': : multiple definition of `strchr' arch/um/kernel/tt/unmap_fin.o(.text+0x55a0): first defined here /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `strchr' changed from 359 in arch/um/kernel/tt/unmap_fin.o to 36 in vmlinux vmlinux(.text+0xb84c0): In function `strpbrk': : multiple definition of `strpbrk' arch/um/kernel/tt/unmap_fin.o(.text+0x35010): first defined here /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `strpbrk' changed from 179 in arch/um/kernel/tt/unmap_fin.o to 81 in vmlinux /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: BFD 2.14.90.0.8 20040114 assertion fail elf.c:3465 collect2: ld returned 1 exit status make: *** [linux] Error 1 -8<----8<----8<----8<--- -8<----8<----8<----8<--- Portage 2.0.50-r6 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3_pre20040420-r0, 2.6.5-gentoo-r1) ================================================================= System uname: 2.6.5-gentoo-r1 i686 AMD Athlon(tm) XP 1800+ Gentoo Base System version 1.4.14 Autoconf: sys-devel/autoconf-2.59-r3 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="suppressed for the sake of length" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow S3TC X X509 Xaw3d aalib aavm alsa amd apache2 apm arts audiofile autofs avi bindist caps cddb cdr chroot crypt cscope cups curl dedicated diet directfb dv dvd encode esd evms2 ext-png ext-zlib faad fbcon ffmpeg fftw flac flash fltk fluidsynth foomaticdb fusion gd gd-external gif glut gphoto2 gpm gstreamer gtk gtk2 guile hbci hyriand imagemagick imlib imlib2 jack jack-caps jack-tmpfs java jikes joystick jpeg kde ladcca lcms libwww lufsusermount mad make-busybox-symlinks matroska md5sum mikmod mmx mng motif moznocompose moznoirc moznomail mpeg mpeg4 mpi nas ncurses nls nocardbus nodod nogcj nptl nvidia nviz objc offensive oggvorbis opengl openssh oss pam parse-clocks pdflib perl physfs pic pie png portaudio psyco pthreads python qt quicktime readline regexp rplay samba sasl sdl slang slp snmp speex spell sse ssl stencil-buffer svga tcltk tcpd tetex theora tiff timidity transcode truetype usb video_cards_nvidia wmf wxwin wxwindows x86 xchattext xfs xml xml2 xmms xv xvid zlib" -8<----8<----8<----8<---
Created attachment 31718 [details] .config used to compile the kernel I am a dummy. Here is the config I used to compile the kernel.
I'm having a very similar problem when trying linux-2.6.6-uml1. Starting from a clean build (make mrproper ARCH=um; make linux ARCH=um) I get these errors when linking vmlinux: make[1]: `arch/um/uml.lds.s' is up to date. gcc -Wl,-T,arch/um/uml.lds.s -static -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wra p,calloc \ -o linux arch/um/main.o vmlinux -L/usr/lib -lutil vmlinux(.text+0xfbab0): In function `strrchr': lib/string.c:266: multiple definition of `strrchr' arch/um/kernel/tt/unmap_fin.o(.text+0xd00): first defined here /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: W arning: size of symbol `strrchr' changed from 441 in arch/um/kernel/tt/unmap_fin .o to 47 in vmlinux vmlinux(.text+0xfb8f0): In function `strncat': lib/string.c:159: multiple definition of `strncat' arch/um/kernel/tt/unmap_fin.o(.text+0x890): first defined here /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: W arning: size of symbol `strncat' changed from 125 in arch/um/kernel/tt/unmap_fin .o to 91 in vmlinux collect2: ld returned 1 exit status make: *** [linux] Error 1
Hii Neil, I confirm problems with compiling linux-2.6.6-uml1, too. I get the following errors towards the end (gcc-3.3.3-r6): -8<----8<----8<----8<--- MAIN arch/um/main.o LD vmlinux make[1]: `arch/um/uml.lds.s' is up to date. gcc -Wl,-T,arch/um/uml.lds.s -static -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc \ -o linux arch/um/main.o vmlinux -L/usr/lib -lutil vmlinux(.text+0x115170): In function `strcpy': : multiple definition of `strcpy' arch/um/kernel/tt/unmap_fin.o(.text+0x3f7a0): first defined here /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `strcpy' changed from 33 in arch/um/kernel/tt/unmap_fin.o to 31 in vmlinux vmlinux(.text+0x107f00): In function `qsort': : multiple definition of `qsort' arch/um/kernel/tt/unmap_fin.o(.text+0x12e70): first defined here /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `qsort' changed from 303 in arch/um/kernel/tt/unmap_fin.o to 2170 in vmlinux vmlinux(.text+0x115420): In function `strrchr': : multiple definition of `strrchr' arch/um/kernel/tt/unmap_fin.o(.text+0x19130): first defined here /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `strrchr' changed from 441 in arch/um/kernel/tt/unmap_fin.o to 46 in vmlinux vmlinux(.text+0x1153a0): In function `strncmp': : multiple definition of `strncmp' arch/um/kernel/tt/unmap_fin.o(.text+0x57f0): first defined here /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `strncmp' changed from 150 in arch/um/kernel/tt/unmap_fin.o to 67 in vmlinux vmlinux(.text+0x1166c0): In function `sscanf': : multiple definition of `sscanf' arch/um/kernel/tt/unmap_fin.o(.text+0x32b00): first defined here /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `sscanf' changed from 33 in arch/um/kernel/tt/unmap_fin.o to 35 in vmlinux vmlinux(.text+0x115370): In function `strcmp': : multiple definition of `strcmp' arch/um/kernel/tt/unmap_fin.o(.text+0x5710): first defined here /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `strcmp' changed from 37 in arch/um/kernel/tt/unmap_fin.o to 38 in vmlinux vmlinux(.text+0x1153f0): In function `strchr': : multiple definition of `strchr' arch/um/kernel/tt/unmap_fin.o(.text+0x55a0): first defined here /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `strchr' changed from 359 in arch/um/kernel/tt/unmap_fin.o to 36 in vmlinux vmlinux(.text+0x115550): In function `strpbrk': : multiple definition of `strpbrk' arch/um/kernel/tt/unmap_fin.o(.text+0x35010): first defined here /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `strpbrk' changed from 179 in arch/um/kernel/tt/unmap_fin.o to 81 in vmlinux /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: BFD 2.14.90.0.8 20040114 assertion fail elf.c:3465 collect2: ld returned 1 exit status make: *** [linux] Error 1 -8<----8<----8<----8<---
I have 2 machines running Gentoo, one a P4 3GHz and one an Athlon XP3200+. I successfully compiled on the P4 machine, but on the Athlon I received the same errors reported in the current bug report. Both machines have very similar configuration since I used the same make.conf (except for architecture selection) and I used NPTL on the Athlon. My "emerge info" is posted below. Googling on the "multiple definition of xxx" error produced two results: 1. A patch correcting this error was submitted to the 2.6 kernel a long time ago and is being used in the Gentoo ebuild. 2. UML does not currently support NPTL. Check your configs (I note a couple nptl USE flags). Moving back down to linuxthreads corrected this problem for me. Sean emerge info (for the P4) Portage 2.0.50-r7 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.5-gentoo-r1) ================================================================= System uname: 2.6.5-gentoo-r1 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /etc/tomcat /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://ftp-mirror.internap.com/pub/gentoo/ http://mirror.datapipe.net/gentoo http://gentoo.eliteitminds.com" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acpi alsa apache2 apm arts avi berkdb cdr crypt cups dvd encode esd ethereal foomaticdb gdbm gif gnome gphoto2 gpm gtk gtk2 imagemagick imlib java jpeg kde ldap libg++ libwww mad mikmod motif mozilla mpeg ncurses nls offensive oggvorbis ooo-kde opengl oss pam pdflib perl png ppds python qt quicktime readline samba sdl slang spell ssl svga tcpd truetype usb x86 xinerama xml xml2 xmms xv zlib"
This bug appears to be a duplicate of 49277; I don't have rights to mark it as a duplicate though. If Christopher Eineke (the reporter) agrees, perhaps he could mark this bug as a dup?
This comment fixed the problem for me: http://bugs.gentoo.org/show_bug.cgi?id=49277#c9 In particular, I commented out CONFIG_MODE_TT, then: # mv .config config # make ARCH=um distclean # cp config .config # make ARCH=um oldconfig (reject the static linking alternative) # make ARCH=um linux and it finally didn't get link errors...
*** This bug has been marked as a duplicate of 49277 ***