Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 49277 - Compile of usermode-sources-2.6.x fails
Summary: Compile of usermode-sources-2.6.x fails
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
: 51446 51546 57225 65220 71578 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-04-28 06:49 UTC by Bogdan Agica
Modified: 2005-07-14 01:40 UTC (History)
15 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Working UML config file (uml.config,7.61 KB, text/plain)
2004-10-25 16:16 UTC, Neil Katin
Details
usermode-sources-2.6.12 + uml-2.6.12-bs5 patch (usermode-sources-2.6.12-bs5.ebuild,883 bytes, text/plain)
2005-07-14 01:12 UTC, Alessio Cassibba (X-Drum)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bogdan Agica 2004-04-28 06:49:08 UTC
Compile of usermode linux fails towards the end:


  LD      .tmp_vmlinux2
  KSYM    .tmp_kallsyms2.S
  AS      .tmp_kallsyms2.o
  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+0x119b00): In function `strcpy':
lib/string.c:71: multiple definition of `strcpy'
arch/um/kernel/tt/unmap_fin.o(.text+0x3fe60): 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 32 in vmlinux
vmlinux(.text+0x10def0): In function `qsort':
fs/xfs/support/qsort.c:79: multiple definition of `qsort'
arch/um/kernel/tt/unmap_fin.o(.text+0x13c70): 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 1980 in vmlinux
vmlinux(.text+0x119dd0): In function `strrchr':
lib/string.c:266: multiple definition of `strrchr'
arch/um/kernel/tt/unmap_fin.o(.text+0x6610): 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 47 in vmlinux
vmlinux(.text+0x119d40): In function `strncmp':
lib/string.c:231: multiple definition of `strncmp'
arch/um/kernel/tt/unmap_fin.o(.text+0x6570): 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 66 in vmlinux
vmlinux(.text+0x11af50): In function `sscanf':
lib/vsprintf.c:813: multiple definition of `sscanf'
arch/um/kernel/tt/unmap_fin.o(.text+0x33140): 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+0x119c10): In function `strncat':
lib/string.c:159: multiple definition of `strncat'
arch/um/kernel/tt/unmap_fin.o(.text+0x990): first defined here
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `strncat' changed from 125 in arch/um/kernel/tt/unmap_fin.o to 91 in vmlinux
vmlinux(.text+0x119d10): In function `strcmp':
lib/string.c:211: multiple definition of `strcmp'
arch/um/kernel/tt/unmap_fin.o(.text+0x6490): 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 39 in vmlinux
vmlinux(.text+0x119d90): In function `strchr':
lib/string.c:251: multiple definition of `strchr'
arch/um/kernel/tt/unmap_fin.o(.text+0x6320): 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 53 in vmlinux
vmlinux(.text+0x119f00): In function `strpbrk':
lib/string.c:382: multiple definition of `strpbrk'
arch/um/kernel/tt/unmap_fin.o(.text+0x35650): 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 82 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


Reproducible: Always
Steps to Reproduce:
1. emerge usermode-sources
2. make menuconfig ARCH=um
3. make linux ARCH=um

Actual Results:  
Compile error.

Expected Results:  
Should have compiled cleanly.

kramer linux-2.6.4-uml1-r0 # emerge info
Portage 2.0.50-r6 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040420-r0,
2.6.3-gentoo-r1)
=================================================================
System uname: 2.6.3-gentoo-r1 i686 AMD Athlon(tm) XP 1800+
Gentoo Base System version 1.4.10
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=athlon-xp -march=athlon-xp -O3 -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/lib/mozilla/defaults/pref
/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/alias
/var/qmail/control /var/vpopmail/domains /var/vpopmail/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-mcpu=athlon-xp -march=athlon-xp -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://ftp.lug.ro/gentoo ftp://gentoo.inode.at/source/
http://ftp.lug.ro/gentoo  ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo 
http://gentoo.math.bme.hu ftp://ftp.iasi.roedu.net/pub/mirrors/gentoo.org/
http://ftp.iasi.roedu.net/mirrors/gentoo.org/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dfx 3dnow GAPING_SECURITY_HOLE X X509 Xaw3d aalib aavm acl acpi acpi4linux
activefilter adns alsa amd apache2 autofs avi berkdb bonobo caps cddb cdr cgi
chroot clamav crypt cups curl diet directfb doc dv encode esd evms2 faad fam
fastcgi fbcon ffmpeg flac foomaticdb foreign-package foreign-sysvinit freetds
freetype fs gdbm gif gnome gnomedb gpm gstreamer gtk gtk2 gtkhtml guile hardened
imagemagick imap imlib ipalias ipv6 java javamail javascript jikes jpeg libg++
libwww lua mad maildir md5sum memlimit mikmod mmx motif mozilla moznocompose
moznoirc moznomail moznoxft mpeg mpeg4 msn music mysql nagios-dns nagios-ntp
nagios-ping nagios-ssh ncurses net nls no-opts no24bpp nocd noreiserfs nptl
nvidia oav offensive oggvorbis opengl openssh pam pda pdflib perl php physfs pic
png pthreads pwdb python qt quicktime readline regexp samba sdl skey slang snmp
spell sse ssl svga tcltk tcpd tetex theora tiff transparent-proxy truetype type1
uml usb video_cards_nvidia videos vim-with-x virus-scan wolk-bootsplash
wolk-supermount x86 xchattext xml2 xmms xv yahoo zlib"
Comment 1 Chris White (RETIRED) gentoo-dev 2004-04-28 09:00:43 UTC
Well, didn't get those same results.  I did the following:

1) Emerged the specific version of usermode sources that was given

2) researched and confirmed the conflicting file was not part of the kernel (ie. a module/builtin).

3) did make menuconfig ARCH=um, left settings as-is

4) did make linux ARCH=um

Results:

Compiled successfully.

So nothing wrong on my side.
Comment 2 Bogdan Agica 2004-04-28 15:41:53 UTC
Tried again with the default .config. Still got the exact same error. Any differences in the programs used?
[ebuild   R   ] sys-devel/gcc-3.3.3-r3
[ebuild   R   ] sys-libs/glibc-2.3.3_pre20040420
[ebuild   R   ] sys-devel/binutils-2.14.90.0.8-r1
[ebuild   R   ] dev-lang/nasm-0.98.38
[ebuild   R   ] sys-devel/bison-1.875
[ebuild   R   ] sys-devel/flex-2.5.4a-r5
[ebuild   R   ] sys-devel/make-3.80
[ebuild   R   ] sys-devel/automake-1.8.3

I'll post anything else anybody would think appropriate, but I don't really know what to look for :)
Comment 3 Chris White (RETIRED) gentoo-dev 2004-04-28 16:42:42 UTC
I've been hearing issues about gcc-3.3.3 and compiling.  Might want to switch back to at least 3.3.2-r5 (that's what I'm on) and see if it works.  My versions are as follows:

sys-devel/gcc-3.3.2-r5 *
sys-libs/glibc-2.3.2-r9 *
sys-devel/binutils-2.14.90.0.7-r4 *
dev-lang/nasm-0.98.38 *
sys-devel/bison-1.875 *
sys-devel/flex-2.5.4a-r5 *
sys-devel/make-3.80 *
sys-devel/automake-1.8.3 *

Besides gcc our versions look pretty much the same.  This could be more of a gcc + usermode-2.6.4 bug than anything else.
Comment 4 Bogdan Agica 2004-04-29 03:53:53 UTC
Tried with gcc-3.3.2-r5, still the same error. Any ideas of what's going on? I must be something that's got to do with my setup, but I've got no clue whatsoever.
Comment 5 Chris White (RETIRED) gentoo-dev 2004-04-29 09:28:09 UTC
Try also downgrading glibc to the version shown, as the libs in it are what the kernel links to.
Comment 6 Joshua J. Berry (CondorDes) (RETIRED) gentoo-dev 2004-04-30 13:57:15 UTC
I have the exact same versions of gcc/glibc/etc as Chris, and I'm having similar issues.  Here's the tailing output from "make linux ARCH=um":

  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
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: BFD 2.14.90.0.7 20031029 assertion fail elf.c:3460
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: BFD 2.14.90.0.7 20031029 assertion fail elf.c:3460
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: BFD 2.14.90.0.7 20031029 assertion fail elf.c:3460
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: BFD 2.14.90.0.7 20031029 assertion fail elf.c:3460
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: linux: Not enough room for program headers (allocated 5, need 6)
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make: *** [linux] Error 1

(I can also post my "emerge info" if anyone thinks it's necessary.)
Comment 7 Chris White (RETIRED) gentoo-dev 2004-04-30 22:22:32 UTC
Please post emerge --info, I want to see what everyone's CFLAG's are.
Comment 8 Joshua J. Berry (CondorDes) (RETIRED) gentoo-dev 2004-04-30 22:24:40 UTC
Portage 2.0.50-r6 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040207-r0, 2.6.6-rc2)
=================================================================
System uname: 2.6.6-rc2 i686 Mobile Intel(R) Pentium(R) 4 - M CPU 2.00GHz
Gentoo Base System version 1.4.10
distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium4 -mcpu=pentium4 -pipe -mmmx -msse -msse2 -mfpmath=sse"
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="-O2 -march=pentium4 -mcpu=pentium4 -pipe -mmmx -msse -msse2 -mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache distcc nostrip userpriv"
GENTOO_MIRRORS="ftp://gentoo.ccccom.com http://gentoo.ccccom.com http://gentoo.noved.org/"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac aalib acl acpi aim alsa arts artswrappersuid avi berkdb cap cdr chroot crypt cups dga directfb dvd encode ethereal fam fbcon flac foomaticdb gd gdbm gif gtk gtk2 imap imlib innodb jabber java jpeg junit kde lcms libg++ libwww mad maildir mikmod mmx mng motif mpeg ncurses nls nptl odbc offensive oggvorbis opengl oscar oss pam pcmcia pcre pdflib perl pic png postgres python qt quicktime readline samba sdl slang spell sse ssl svga tcltk tcpd tetex tiff truetype usb wmf x86 xfs xinerama xml2 xmms xv zlib"
Comment 9 Marc Ballarin 2004-05-05 07:38:32 UTC
I get exactly the same error as in comment #6, but only if using static linking. Everything works fine using these options:
# CONFIG_MODE_TT is not set
# CONFIG_STATIC_LINK is not set
CONFIG_MODE_SKAS=y

Build environment is the same as in comment #3.

BTW: What means "GAPING_SECURITY_HOLE" in the first "emerge info" output?

Portage 2.0.50-r6 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.5-skas)
=================================================================
System uname: 2.6.5 i686 AMD Athlon(tm) XP 2400+
Gentoo Base System version 1.4.10
distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon -O2 -frename-registers -fomit-frame-pointer -pipe"
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/lib/mozilla/defaults/pref /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 -O2 -frename-registers -fomit-frame-pointer -pipe"
DISTDIR="/mnt/shared/gentoo/distfiles"
FEATURES="autoaddcvs buildpkg ccache sandbox sfperms userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.inode.at/"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/home/tmp/portage-tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="3dnow X X509 Xaw3d aalib acl acpi alsa apm arts artswrappersuid avi berkdb caps cdr crypt cups curl directfb dvd dvdr encode faad fam fbcon foomaticdb gdbm gif gphoto2 gpm gtk2 hbci imap imlib ipv6 java javascript joystick jpeg kde lcms libg++ libwww linguas_de mad maildir mbox mikmod mmx motif mozilla mpeg mysql ncurses nls nptl oggvorbis openal opengl oss pam pdflib perl pic plotutils png ppds python qt quicktime radeon readline samba scanner sdl slang slp sox spell ssl tcpd tetex tiff truetype usb v4l v4l2 video_cards_radeon wmf wxwindows x86 xinerama xml2 xmms xosd xv xvid zlib"
Comment 10 Gregor Suhr 2004-05-15 03:40:17 UTC
I have the same problem. 

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 Pentium II (Klamath)
Gentoo Base System version 1.4.12
distcc 2.14 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -mcpu=i686 -funroll-loops -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -mcpu=i686 -funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://128.213.5.34/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://gentoo.math.bme.hu"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acl acpi acpi4linux apache2 apm berkdb chroot crypt cups curl gdbm isdn maildir mbox mldonkeypango nopop3d nptl pam perl pthreads python readline sasl ssl tcpd threads x86 xml2 zlib"



/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `strncmp' changed from 175 in arch/um/kernel/tt/unmap_fin.o to 67 in vmlinux
vmlinux(.text+0xe62c0): In function `sscanf':
: multiple definition of `sscanf'
arch/um/kernel/tt/unmap_fin.o(.text+0x33970): first defined here
vmlinux(.text+0xe4f70): In function `strcmp':
: multiple definition of `strcmp'
arch/um/kernel/tt/unmap_fin.o(.text+0x5930): 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+0xe4ff0): In function `strchr':
: multiple definition of `strchr'
arch/um/kernel/tt/unmap_fin.o(.text+0x57c0): 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+0xe5150): In function `strpbrk':
: multiple definition of `strpbrk'
arch/um/kernel/tt/unmap_fin.o(.text+0x35e60): 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

Comment 11 Elton Algera 2004-05-20 08:06:47 UTC
Hi,

I have the same issue with gcc-3.3.3-r3 and glibc-2.3.3_pre20040420.

However, For some reason, unmerging the entire kerneltree and merging it again fixes the issue.

Something wrong with cleaning up maybe?
Comment 12 Tim Yamin (RETIRED) gentoo-dev 2004-06-20 05:49:32 UTC
*** Bug 51446 has been marked as a duplicate of this bug. ***
Comment 13 Alan 2004-07-27 16:01:36 UTC
Some more information from my own trails trying to get uml going.  I've had no success trying to compile any of the three versions that are currently in portage.  All fail with some sort of linking errors.  I'll post the last few lines of errors from the final link of each one, and with the results of enabling / disabling differrent options.

usermode-sources-2.4.24-r6 DEFAULT config (no changes)
---------------------------------------
nm vmlinux | grep -v '\(compiled\)\|\(\.o$\)\|\( [aUw] \)\|\(\.\.ng$\)\|\(LASH[RL]DI\)' | sort > System.map
mv vmlinux vmlinux.o
gcc -Wl,-T,arch/um/link.ld -static -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc \
        -o linux arch/um/main.o vmlinux.o -L/usr/lib -lutil
vmlinux.o(.text+0x15ad60): In function `sscanf':
/usr/src/uml/linux-2.4.24-uml1-r6/lib/vsprintf.c:718: multiple definition of `sscanf'
arch/um/kernel/tt/unmap_fin.o(.text+0x32a30): 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.o
vmlinux.o(.text+0x159d50): In function `strpbrk':
/usr/src/uml/linux-2.4.24-uml1-r6/lib/string.c:280: multiple definition of `strpbrk'
arch/um/kernel/tt/unmap_fin.o(.text+0x34fa0): 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 82 in vmlinux.o
/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
---------------------------------------

usermode-sources-2.4.24-r6 Thread Tracing Disabled
---------------------------------------
nm vmlinux | grep -v '\(compiled\)\|\(\.o$\)\|\( [aUw] \)\|\(\.\.ng$\)\|\(LASH[RL]DI\)' | sort > System.map
pages=$(( 1 << 2 )) ; \
m4 -DSTART=$((0xc0000000 - ((0 + 1) * 0x20000000))) -DELF_ARCH=i386 \
        -DELF_FORMAT=elf32-i386  \
        -DKERNEL_STACK_SIZE=$(( 4096 * $pages )) arch/um/dyn_link.ld.in > arch/um/dyn_link.ld
mv vmlinux vmlinux.o
gcc -Wl,-T,arch/um/dyn_link.ld -Wl,-rpath,/lib  -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc \
        -o linux arch/um/main.o vmlinux.o -L/usr/lib -lutil
arch/um/main.o(.text+0x377): In function `__wrap_malloc':
arch/um/main.c:168: undefined reference to `tracing_pid'
arch/um/main.o(.text+0x417): In function `__wrap_free':
arch/um/main.c:186: undefined reference to `tracing_pid'
collect2: ld returned 1 exit status
make: *** [linux] Error 1
---------------------------------------


usermode-sources-2.4.24-r6 Thread Tracing Disabled, Static Compile
---------------------------------------
nm vmlinux | grep -v '\(compiled\)\|\(\.o$\)\|\( [aUw] \)\|\(\.\.ng$\)\|\(LASH[RL]DI\)' | sort > System.map
mv vmlinux vmlinux.o
gcc -Wl,-T,arch/um/link.ld -static -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc \
        -o linux arch/um/main.o vmlinux.o -L/usr/lib -lutil
vmlinux.o(.text+0x144b80): In function `sscanf':
/usr/src/uml/linux-2.4.24-uml1-r6/lib/vsprintf.c:718: multiple definition of `sscanf'
arch/um/kernel/tt/unmap_fin.o(.text+0x32a30): 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.o
vmlinux.o(.text+0x143b70): In function `strpbrk':
/usr/src/uml/linux-2.4.24-uml1-r6/lib/string.c:280: multiple definition of `strpbrk'
arch/um/kernel/tt/unmap_fin.o(.text+0x34fa0): 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 82 in vmlinux.o
/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
arch/um/main.o(.text+0x377): In function `__wrap_malloc':
arch/um/main.c:168: undefined reference to `tracing_pid'
arch/um/main.o(.text+0x417): In function `__wrap_free':
arch/um/main.c:186: undefined reference to `tracing_pid'
collect2: ld returned 1 exit status
make: *** [linux] Error 1
---------------------------------------


usermode-sources-2.4.24-r6 SKAS disabled, TT enabled
---------------------------------------
nm vmlinux | grep -v '\(compiled\)\|\(\.o$\)\|\( [aUw] \)\|\(\.\.ng$\)\|\(LASH[RL]DI\)' | sort > System.map
mv vmlinux vmlinux.o
gcc -Wl,-T,arch/um/link.ld -static -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc \
        -o linux arch/um/main.o vmlinux.o -L/usr/lib -lutil
vmlinux.o(.text+0x149ac0): In function `sscanf':
/usr/src/uml/linux-2.4.24-uml1-r6/lib/vsprintf.c:718: multiple definition of `sscanf'
arch/um/kernel/tt/unmap_fin.o(.text+0x32a30): 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.o
vmlinux.o(.text+0x148ab0): In function `strpbrk':
/usr/src/uml/linux-2.4.24-uml1-r6/lib/string.c:280: multiple definition of `strpbrk'
arch/um/kernel/tt/unmap_fin.o(.text+0x34fa0): 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 82 in vmlinux.o
/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
---------------------------------------


usermode-sources-2.4.26-r3 DEFAULT config (no changes)
---------------------------------------
nm vmlinux | grep -v '\(compiled\)\|\(\.o$\)\|\( [aUw] \)\|\(\.\.ng$\)\|\(LASH[RL]DI\)' | sort > System.map
mv vmlinux vmlinux.o
gcc -Wl,-T,arch/um/link.ld -static -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc \
        -o linux arch/um/main.o vmlinux.o -L/usr/lib -lutil
vmlinux.o(.text+0x178f60): In function `sscanf':
/usr/src/uml/linux-2.4.26-uml1-r3/lib/vsprintf.c:730: multiple definition of `sscanf'
arch/um/kernel/tt/unmap_fin.o(.text+0x32a30): 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.o
vmlinux.o(.text+0x177f30): In function `strpbrk':
/usr/src/uml/linux-2.4.26-uml1-r3/lib/string.c:280: multiple definition of `strpbrk'
arch/um/kernel/tt/unmap_fin.o(.text+0x34fa0): 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 82 in vmlinux.o
/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
---------------------------------------

usermode-sources-2.4.26-r3 TT disabled
---------------------------------------
nm vmlinux | grep -v '\(compiled\)\|\(\.o$\)\|\( [aUw] \)\|\(\.\.ng$\)\|\(LASH[RL]DI\)' | sort > System.map
mv vmlinux vmlinux.o
gcc -Wl,-T,arch/um/dyn_link.ld -Wl,-rpath,/lib  -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc \
        -o linux arch/um/main.o vmlinux.o -L/usr/lib -lutil
arch/um/main.o(.text+0x3c7): In function `__wrap_malloc':
arch/um/main.c:187: undefined reference to `tracing_pid'
arch/um/main.o(.text+0x49a): In function `__wrap_free':
arch/um/main.c:227: undefined reference to `tracing_pid'
collect2: ld returned 1 exit status
make: *** [linux] Error 1
---------------------------------------

usermode-sources-2.4.26-r3 TT disabled, static compile
---------------------------------------
nm vmlinux | grep -v '\(compiled\)\|\(\.o$\)\|\( [aUw] \)\|\(\.\.ng$\)\|\(LASH[RL]DI\)' | sort > System.map
mv vmlinux vmlinux.o
gcc -Wl,-T,arch/um/link.ld -static -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc \
        -o linux arch/um/main.o vmlinux.o -L/usr/lib -lutil
vmlinux.o(.text+0x1628c0): In function `sscanf':
/usr/src/uml/linux-2.4.26-uml1-r3/lib/vsprintf.c:730: multiple definition of `sscanf'
arch/um/kernel/tt/unmap_fin.o(.text+0x32a30): 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.o
vmlinux.o(.text+0x161890): In function `strpbrk':
/usr/src/uml/linux-2.4.26-uml1-r3/lib/string.c:280: multiple definition of `strpbrk'
arch/um/kernel/tt/unmap_fin.o(.text+0x34fa0): 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 82 in vmlinux.o
/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
arch/um/main.o(.text+0x3c7): In function `__wrap_malloc':
arch/um/main.c:187: undefined reference to `tracing_pid'
arch/um/main.o(.text+0x49a): In function `__wrap_free':
arch/um/main.c:227: undefined reference to `tracing_pid'
collect2: ld returned 1 exit status
make: *** [linux] Error 1
---------------------------------------

usermode-sources-2.4.26-r3 SKAS disabled TT enabled
---------------------------------------
nm vmlinux | grep -v '\(compiled\)\|\(\.o$\)\|\( [aUw] \)\|\(\.\.ng$\)\|\(LASH[RL]DI\)' | sort > System.map
mv vmlinux vmlinux.o
gcc -Wl,-T,arch/um/link.ld -static -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc \
        -o linux arch/um/main.o vmlinux.o -L/usr/lib -lutil
vmlinux.o(.text+0x167530): In function `sscanf':
/usr/src/uml/linux-2.4.26-uml1-r3/lib/vsprintf.c:730: multiple definition of `sscanf'
arch/um/kernel/tt/unmap_fin.o(.text+0x32a30): 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.o
vmlinux.o(.text+0x166500): In function `strpbrk':
/usr/src/uml/linux-2.4.26-uml1-r3/lib/string.c:280: multiple definition of `strpbrk'
arch/um/kernel/tt/unmap_fin.o(.text+0x34fa0): 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 82 in vmlinux.o
/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
---------------------------------------

usermode-sources-2.6.6-r4 DEFAULT (no changes)
---------------------------------------
  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+0xed8a0): In function `strcpy':
lib/string.c:71: multiple definition of `strcpy'
arch/um/kernel/tt/unmap_fin.o(.text+0x3f720): 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 32 in vmlinux
vmlinux(.text+0xedb70): In function `strrchr':
lib/string.c:266: multiple definition of `strrchr'
arch/um/kernel/tt/unmap_fin.o(.text+0x190f0): 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 47 in vmlinux
vmlinux(.text+0xedae0): In function `strncmp':
lib/string.c:231: 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 146 in arch/um/kernel/tt/unmap_fin.o to 66 in vmlinux
vmlinux(.text+0xeecf0): In function `sscanf':
lib/vsprintf.c:813: multiple definition of `sscanf'
arch/um/kernel/tt/unmap_fin.o(.text+0x32a30): 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+0xedab0): In function `strcmp':
lib/string.c:211: 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 39 in vmlinux
vmlinux(.text+0xedb30): In function `strchr':
lib/string.c:251: 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 53 in vmlinux
vmlinux(.text+0xedca0): In function `strpbrk':
lib/string.c:382: multiple definition of `strpbrk'
arch/um/kernel/tt/unmap_fin.o(.text+0x34fa0): 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 82 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
---------------------------------------

usermode-sources-2.6.6-r4 TT disabled
---------------------------------------
gcc -Wl,-T,arch/um/dyn.lds.s -Wl,-rpath,/lib  -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc \
        -o linux arch/um/main.o vmlinux -L/usr/lib -lutil
vmlinux(.text+0xc8ee): In function `sig_handler':
arch/um/kernel/trap_user.c:101: undefined reference to `sig_handler_common_tt'
vmlinux(.text+0xc93e): In function `alarm_handler':
arch/um/kernel/trap_user.c:114: undefined reference to `sig_handler_common_tt'
vmlinux(.text+0xc8c2): In function `usr2_handler':
arch/um/kernel/trap_user.c:74: undefined reference to `syscall_handler_tt'
vmlinux(.text+0xd207): In function `not_dead_yet':
arch/um/kernel/umid.c:191: undefined reference to `tracing_pid'
vmlinux(.text+0x1b225): In function `register_winch':
arch/um/drivers/chan_user.c:193: undefined reference to `is_tracer_winch'
collect2: ld returned 1 exit status
make: *** [linux] Error 1
---------------------------------------

usermode-sources-2.6.6-r4 TT disabled static link
---------------------------------------
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
/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
/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
/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
/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
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: linux: Not enough room for program headers (allocated 6, need 8)
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make: *** [linux] Error 1
---------------------------------------


usermode-sources-2.6.6-r4 SKAS disabled TT enabled
---------------------------------------
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+0xe2bc0): In function `strcpy':
lib/string.c:71: multiple definition of `strcpy'
arch/um/kernel/tt/unmap_fin.o(.text+0x3f720): 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 32 in vmlinux
vmlinux(.text+0xe2e90): In function `strrchr':
lib/string.c:266: multiple definition of `strrchr'
arch/um/kernel/tt/unmap_fin.o(.text+0x190f0): 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 47 in vmlinux
vmlinux(.text+0xe2e00): In function `strncmp':
lib/string.c:231: 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 146 in arch/um/kernel/tt/unmap_fin.o to 66 in vmlinux
vmlinux(.text+0xe4010): In function `sscanf':
lib/vsprintf.c:813: multiple definition of `sscanf'
arch/um/kernel/tt/unmap_fin.o(.text+0x32a30): 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+0xe2dd0): In function `strcmp':
lib/string.c:211: 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 39 in vmlinux
vmlinux(.text+0xe2e50): In function `strchr':
lib/string.c:251: 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 53 in vmlinux
vmlinux(.text+0xe2fc0): In function `strpbrk':
lib/string.c:382: multiple definition of `strpbrk'
arch/um/kernel/tt/unmap_fin.o(.text+0x34fa0): 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 82 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
---------------------------------------

usermode-sources-2.6.6-r4 SKAS disabled TT disabled (same with static disabled)
---------------------------------------
  CC      init/main.o
In file included from include/asm/uaccess.h:33,
                 from include/linux/poll.h:11,
                 from include/linux/skbuff.h:28,
                 from include/linux/security.h:34,
                 from init/main.c:35:
arch/um/include/um_uaccess.h: In function `verify_area':
arch/um/include/um_uaccess.h:25: warning: implicit declaration of function `CHOOSE_MODE'
arch/um/include/um_uaccess.h:25: warning: implicit declaration of function `verify_area_tt'
arch/um/include/um_uaccess.h:25: warning: implicit declaration of function `verify_area_skas'
arch/um/include/um_uaccess.h: In function `copy_from_user':
arch/um/include/um_uaccess.h:31: warning: implicit declaration of function `copy_from_user_tt'
arch/um/include/um_uaccess.h:31: warning: implicit declaration of function `copy_from_user_skas'
arch/um/include/um_uaccess.h: In function `copy_to_user':
[... et infinitum ... ]
---------------------------------------

I've tried downgrading binutils to from 2.14.90.0.8 to .7-* and .6-*

emerge info:
-----------------------
Portage 2.0.50-r9 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.7-gentoo-r11)
=================================================================
System uname: 2.6.7-gentoo-r11 i686 AMD Athlon(tm) XP 2500+
Gentoo Base System version 1.4.16
distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -finline-functions -falign-jumps=4 -falign-loops=4 -falign-functions=64 -funroll-loops -mfpmath=sse,387"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /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 -finline-functions -falign-jumps=4 -falign-loops=4 -falign-functions=64 -funroll-loops -mfpmath=sse,387"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache fixpackages prelink sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X aalib acl alsa apache2 apm arts avi berkdb bonobo cdr composite crypt cups curl ddbm dga directfb encode esd evo exif faad fbcon flac flash foomaticdb gd gdbm gif gimpprint gnome gnomedb gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile imap imlib innodb java javascript jpeg kde lame libg++ libwww mad mikmod mitshm mmx mng motif mozcalendar mozilla mpeg mysql nas ncurses nptl oggvorbis opengl oss pam pda pdflib perl pic png postgres python qt qtmt quicktime readline samba scanner sdl shadow slang slp snmp spell ssl svga tcltk tcpd tetex theora tiff truetype vim-with-x wmf x86 xine xinerama xml xml2 xmms xv xvid zlib"
-----------------------

Software versions:
[ebuild   R   ] sys-devel/gcc-3.3.3-r6  
[ebuild   R   ] sys-devel/gcc-config-1.3.5  
[ebuild   R   ] sys-devel/binutils-2.14.90.0.8-r1  
[ebuild   R   ] sys-libs/glibc-2.3.3.20040420 

Kernel gentoo-sources-2.6.7-r11

Not sure what is going on, hopefully some of this debug will help someone figure it out.
Comment 14 Alan 2004-07-27 16:17:29 UTC
ARGH!  What the heck.... I set the settings via .config as in #c9 and it compiles.  

*shakes head*

Please ignore me now...
Comment 15 Daniel Drake (RETIRED) gentoo-dev 2004-08-21 14:56:10 UTC
*** Bug 51546 has been marked as a duplicate of this bug. ***
Comment 16 Daniel Drake (RETIRED) gentoo-dev 2004-08-26 08:08:42 UTC
*** Bug 57225 has been marked as a duplicate of this bug. ***
Comment 17 Daniel Drake (RETIRED) gentoo-dev 2004-10-06 02:52:40 UTC
*** Bug 65220 has been marked as a duplicate of this bug. ***
Comment 18 BlaisorBlade 2004-10-06 12:01:45 UTC
I'm one UML developer, BlaisorBlade <blaisorblade_spam@yahoo.it>. I'm
investigating over this problem, which is one UML bug. It does not show up in
any distro other than Gentoo and LFS because the glibc-2.3.3 release is
strange.

Here is what Patrick Volkerding says (from
http://www.slackware.com/changelog/current.php?cpu=i386):
a/glibc-solibs-2.3.3-i486-1.tgz: Upgraded to glibc-2.3.3. This is from
       a CVS snapshot taken in early August. The official glibc-2.3.3 tarball
       was released in such an obsolete condition (a snapshot from 8 months ago)
       that I'd be surprised if any Linux distributions actually package it.

In fact, one of the LFS developers added:

Ulrich and the rest, have decided to no longer cut "stable" tarballs of glibc, because glibc is "always" stable...which I've found to not by any means be true.  Instead, they expect the distributors of Linux to do the final stabilization for release.  Makes it a real pain, both for us in the LinuxFromScratch
project, and from what I hear, it's causing problems for Gentoo as
well.

Actually, what is causing the problem is that unmap_fin.o, which just uses mmap() and munmap(), brings in even some librt symbols, which is fine and happens also here. On Gentoo, for some reasons, those symbols brings in even some strXXX symbols, which then conflict.
Comment 19 BlaisorBlade 2004-10-06 12:10:32 UTC
To Alan: when you enable CONFIG_TT_MODE, you get the same error as all the others.

But most link-time errors you get when changing the setting of CONFIG_MODE_TT can be fixed with "make clean ARCH=um". In fact kbuild, on both 2.4 and 2.6, does not track correctly the dependencies of some files on CONFIG_*, so changing CONFIG_* does not trigger all the needed recompilations. In fact, you say that it worked in a following comment, after some unrelated changes

"ARGH!  What the heck.... I set the settings via .config as in #c9 and it compiles.  

*shakes head*

Please ignore me now...": what fixed actually the problem was the clean compilation you did.

About this config:

usermode-sources-2.6.6-r4 SKAS disabled TT disabled (same with static disabled)

If you disable both TT and SKAS, then your configuration is invalid.
Comment 20 Daniel Drake (RETIRED) gentoo-dev 2004-10-06 12:25:03 UTC
Hey BlaisorBlade, thanks for getting involved with these issues.
I'm not sure, but I believe the warnings about symbol size changing may be related to those people running "Gentoo hardened". This is where extra patches are applied to the compiler and glibc which introduce checks that the code isnt doing naughty things (I'm really not too sure about this though, you may wish to check http://hardened.gentoo.org and #gentoo-hardened on freenode IRC). Let us know if there is anything we can do to investigate.
Comment 21 Joel Parker 2004-10-14 23:12:50 UTC
Well, I'm having this same problem, and am not running Gentoo Hardened. I'm running a fully stable and up-to-date normal Gentoo system with NPTL.
Comment 22 Tim Yamin (RETIRED) gentoo-dev 2004-10-21 11:16:46 UTC
Please try usermode-sources-2.6.8.1-r1.
Comment 23 Neil Katin 2004-10-21 12:51:19 UTC
usermode-sources-2.6.8.1-r1 doesn't seem to be in the portage tree,
nor does it show up in CVS.  Any suggestions for where to look for
it so we can help test it?
Comment 24 Joel Parker 2004-10-25 09:47:04 UTC
I just tried 2.6.8.1-r1, but got the same error:

--
  LD      vmlinux
  CPP     arch/um/uml.lds.s
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+0xf8b20): In function `strcpy':
lib/string.c:71: multiple definition of `strcpy'
arch/um/kernel/tt/unmap_fin.o(.text+0x3e378): first defined here
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc-linux-gnu/bin/ld: W arning: size of symbol `strcpy' changed from 35 in arch/um/kernel/tt/unmap_fin.o  to 32 in vmlinux
vmlinux(.text+0xf8df0): In function `strrchr':
lib/string.c:273: multiple definition of `strrchr'
arch/um/kernel/tt/unmap_fin.o(.text+0x18560): first defined here
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../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+0xf8d60): In function `strncmp':
lib/string.c:236: multiple definition of `strncmp'
arch/um/kernel/tt/unmap_fin.o(.text+0x5578): first defined here
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc-linux-gnu/bin/ld: W arning: size of symbol `strncmp' changed from 171 in arch/um/kernel/tt/unmap_fin .o to 66 in vmlinux
vmlinux(.text+0xfa090): In function `sscanf':
lib/vsprintf.c:836: multiple definition of `sscanf'
arch/um/kernel/tt/unmap_fin.o(.text+0x318b8): first defined here
vmlinux(.text+0xf8d30): In function `strcmp':
lib/string.c:215: multiple definition of `strcmp'
arch/um/kernel/tt/unmap_fin.o(.text+0x5550): first defined here
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc-linux-gnu/bin/ld: W arning: size of symbol `strcmp' changed from 37 in arch/um/kernel/tt/unmap_fin.o  to 39 in vmlinux
vmlinux(.text+0xf8db0): In function `strchr':
lib/string.c:257: multiple definition of `strchr'
arch/um/kernel/tt/unmap_fin.o(.text+0x53e0): first defined here
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc-linux-gnu/bin/ld: W arning: size of symbol `strchr' changed from 359 in arch/um/kernel/tt/unmap_fin. o to 53 in vmlinux
vmlinux(.text+0xf8f20): In function `strpbrk':
lib/string.c:394: multiple definition of `strpbrk'
arch/um/kernel/tt/unmap_fin.o(.text+0x33ab0): first defined here
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc-linux-gnu/bin/ld: W arning: size of symbol `strpbrk' changed from 179 in arch/um/kernel/tt/unmap_fin .o to 82 in vmlinux
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc-linux-gnu/bin/ld: B FD 2.14.90.0.8 20040114 assertion fail elf.c:3465
collect2: ld returned 1 exit status
make: *** [linux] Error 1
#
--
Comment 25 Neil Katin 2004-10-25 16:16:20 UTC
Created attachment 42583 [details]
Working UML config file


I saw comment #24, and thought I would try some experiments myself.

For all its worth I got 2.6.8.1-r1 to compile, both with and without
CONFIG_MODE_TT set (it used to fail to compile if both TT and SKAS modes
were set).  So for me at least this kernel is a definite improvement.

I've attached my working .config file, if anyone who has a failing compile
wants to try it.  The steps I used were:

# make mrproper ARCH=um
# cp uml.config .config
# make oldconfig ARCH=um
# make linux ARCH=um
Comment 26 Joel Parker 2004-10-27 12:52:49 UTC
I just tried the UML config file listed above, and the exact method in comment #25. Here's what I got:

--
  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+0xf3a10): In function `strcpy':
lib/string.c:71: multiple definition of `strcpy'
arch/um/kernel/tt/unmap_fin.o(.text+0x3e378): first defined here
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `strcpy' changed from 35 in arch/um/kernel/tt/unmap_fin.o to 32 in vmlinux
vmlinux(.text+0xf3ce0): In function `strrchr':
lib/string.c:273: multiple definition of `strrchr'
arch/um/kernel/tt/unmap_fin.o(.text+0x18560): first defined here
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `strrchr' changed from 441 in arch/um/kernel/tt/unmap_fin.o to 47 in vmlinux
vmlinux(.text+0xf3c50): In function `strncmp':
lib/string.c:236: multiple definition of `strncmp'
arch/um/kernel/tt/unmap_fin.o(.text+0x5578): first defined here
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `strncmp' changed from 171 in arch/um/kernel/tt/unmap_fin.o to 66 in vmlinux
vmlinux(.text+0xf4f80): In function `sscanf':
lib/vsprintf.c:836: multiple definition of `sscanf'
arch/um/kernel/tt/unmap_fin.o(.text+0x318b8): first defined here
vmlinux(.text+0xf3c20): In function `strcmp':
lib/string.c:215: multiple definition of `strcmp'
arch/um/kernel/tt/unmap_fin.o(.text+0x5550): first defined here
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `strcmp' changed from 37 in arch/um/kernel/tt/unmap_fin.o to 39 in vmlinux
vmlinux(.text+0xf3ca0): In function `strchr':
lib/string.c:257: multiple definition of `strchr'
arch/um/kernel/tt/unmap_fin.o(.text+0x53e0): first defined here
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `strchr' changed from 359 in arch/um/kernel/tt/unmap_fin.o to 53 in vmlinux
vmlinux(.text+0xf3e10): In function `strpbrk':
lib/string.c:394: multiple definition of `strpbrk'
arch/um/kernel/tt/unmap_fin.o(.text+0x33ab0): first defined here
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `strpbrk' changed from 179 in arch/um/kernel/tt/unmap_fin.o to 82 in vmlinux
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../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
#
--
Comment 27 Daniel Drake (RETIRED) gentoo-dev 2004-10-27 14:51:01 UTC
I read somewhere that this is an issue with NPTL. I think it was a post from a usermode developer, so they are definately aware.
Comment 28 BlaisorBlade 2004-10-29 12:41:02 UTC
I'm the UML developer who is trying to face this issue, and I use Gentoo.

This issues comes when using a NPTL enabled glibc on the host, placed in /lib.
It can be avoided by disabling TT mode in the build (the resulting binary will still not run).

However, in the testing(~x86) branch, there are new glibc ebuilds which by default (if you do *not* enable the nptlonly USE flag) will build a non-NPTL glibc in /lib and a NPTL-one in /lib/tls. UML will link against the non-NPTL one and will work very happily.

I've come to an improvement of the situation (fixing the duplicate symbols), but there is another much harder problem which is blocking me, i.e. this one

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
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: BFD 2.14.90.0.7 20031029 assertion fail elf.c:3460
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: BFD 2.14.90.0.7 20031029 assertion fail elf.c:3460
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: BFD 2.14.90.0.7 20031029 assertion fail elf.c:3460
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: BFD 2.14.90.0.7 20031029 assertion fail elf.c:3460
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: linux: Not enough room for program headers (allocated 5, need 6)
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make: *** [linux] Error 1
Comment 29 BlaisorBlade 2004-11-11 19:19:01 UTC
Ok, now I have another solution, apart upgrading glibc, also thanks to Bodo Stroesser.

Go to
http://www.user-mode-linux.org/~blaisorblade/

and download the 2.6.9-bb2 patchset. Apply it to a 2.6.9, disable CONFIG_MODE_TT in kernel configuration (it's called like "Tracing thread support" in the kernel config), and recompile UML. The resulting binary will work!

At least, so it does on my Gentoo NPTL-only system, and it seem to work also for everybody else.

Also note, that if you use DevFS inside UML, /dev/ubd/0 must be replaced by /dev/ubd/disc0, and so on for other ubd devices, with that patch applied - this change will soon go in mainline, so update your filesystems now. The new syntax works even in older UML's.

If you still don't want to face this DevFS, apply with patch -p1 -R (i.e. revert) this patch:

http://www.user-mode-linux.org/~blaisorblade/patches/guest/uml-2.6.9-bb2/broken-out/patches/uml-remove-devfs-mk-symlink.patch
Comment 30 BlaisorBlade 2004-11-11 21:10:03 UTC
An important correction: instead of 

/dev/ubd/0 must be replaced by /dev/ubd/disc0

I should have written

/dev/ubd/0 must be replaced by /dev/ubd/disc0/disc

Sorry for the typo!
Comment 31 Michiel de Bruijne 2004-11-12 03:14:21 UTC
Paolo, thanks a lot for your support and patches!

Is it possible to bump usermode-sources and include this patch?
Comment 32 Michiel de Bruijne 2004-11-12 03:54:33 UTC
Paolo, I have just applied the patches from the website to my system, however the guest os now doesn't check if skas3 and /proc/mm are available on the host. Resulting in the segmentation fault after a reboot of the guest os.

These are the checks that are performed on the guest:
Checking for host processor cmov support...Yes
Checking for host processor xmm support...No
Checking that ptrace can change system call numbers...OK
Checking that host ptys support output SIGIO...Yes
Checking that host ptys support SIGIO on close...No, enabling workaround
Checking for /dev/anon on the host...Not available (open failed with errno 2)
Comment 33 BlaisorBlade 2004-11-12 20:55:17 UTC
> Resulting in the segmentation fault after a reboot of the guest os.
This is another, randomical, yet undiagnosed problem, not related to the missing SKAS detection.

* About the missing startup check

From checking the code, this behaviour is not influenced by this patch.

I think that recompiling UML with the same config after "make clean ARCH=um" will result in a binary which does the startup test... It's a common error, even because "make clean ARCH=um" should not be required when changing the configuration. It happens, anyway, with UML, and is difficult to fix, but there is ongoing work to fix it.

Otherwise, I would suppose that you d
Comment 34 BlaisorBlade 2004-11-12 20:55:17 UTC
> Resulting in the segmentation fault after a reboot of the guest os.
This is another, randomical, yet undiagnosed problem, not related to the missing SKAS detection.

* About the missing startup check

From checking the code, this behaviour is not influenced by this patch.

I think that recompiling UML with the same config after "make clean ARCH=um" will result in a binary which does the startup test... It's a common error, even because "make clean ARCH=um" should not be required when changing the configuration. It happens, anyway, with UML, and is difficult to fix, but there is ongoing work to fix it.

Otherwise, I would suppose that you dìd not enable SKAS mode when compiling UML.

If neither is the case, which seems unlikely, please post another comment here.
Comment 35 Michiel de Bruijne 2004-11-15 15:55:47 UTC
Paolo, I have done 'make clean ARCH=um' and 'make mrproper ARCH=um' mutiple times, I have tried other UML-kernels as well, I'm positive that I have only enabled SKAS (TT disabled). I have cleany applied host-skas3-2.6.9-v7.patch to the host (gentoo-dev-sources-2.6.9-r4) and enabled /proc/mm (which is available on the host).
All UML-kernels don't check for skas and/or /proc/mm. When I reboot with a 2.6 UML-kernel I get a segmentation fault. When I reboot with a 2.4 UML-kernel it just hangs forever at power down. This is exactly the same behaviour I had on another host-machine without skas enabled.

I'm using another host with gentoo-dev-sources-2.6.8-r2 and host-skas3-2.6.7-v7.patch without problems.

How can I check if skas is correctly enabled on the host besides looking for /proc/mm?
Comment 36 BlaisorBlade 2004-11-15 17:23:25 UTC
Sorry, yes, this patch skips the check when TT mode is disabled (but it happens for an unobvious reason, so I didn't realize that).

However, again, this does not interfere with the problems on reboot you are getting. I too have problems rebooting UML. There is a fix which has just arrived to me - I'll try to put it in next version, if it actually fixes this issue.
Comment 37 Daniel Drake (RETIRED) gentoo-dev 2004-11-17 11:59:54 UTC
*** Bug 71578 has been marked as a duplicate of this bug. ***
Comment 38 BlaisorBlade 2004-11-18 08:20:00 UTC
The patch does not skip the startup check, at least in my SKAS-only configuration... in my last post I thought so by noticing some strange code, but I know looked better into that code and it is correct.

So, please, attach to this report the complete output of vmlinux --showconfig and the complete startup output of running vmlinux (the one of the main console).
Comment 39 Michiel de Bruijne 2004-11-22 14:38:30 UTC
Paolo, I'm sorry for a late response. I had to remove gentoo-dev-sources-2.6.9-r4 and host-skas3-2.6.9-v7.patch from the host. I had to install gentoo-dev-sources-2.6.8-r2 and host-skas3-2.6.7-v7.patch. Using the first combination I had segfaults after a restart and a lot of kernel stack overflows during normal operation. The second combination works fine (although a bit slow). Unfortunately this is now a production environment and this system doesn't have enough resources to do some more testing. If I have resources available and you are still interested in the results I will report them to you. Focussing on the original bug problem; I was unable to compile SMP-support on both combinations.
Comment 40 BlaisorBlade 2004-12-07 11:45:27 UTC
Ok, for SKAS mode, if for any reason you don't want to apply the whole -bb patchset (now we are at 2.6.9-bb4, and it's much stabler than previous releases), this fix alone will work, for running SKAS mode:

http://marc.theaimsgroup.com/?l=linux-kernel&m=110011391701565&w=2

Without this fix or 2.6.9-bb4, SKAS mode compiles but does not work. With and without, TT mode does not compile with a NPTL glibc.
Comment 41 Daniel Drake (RETIRED) gentoo-dev 2005-02-09 07:38:17 UTC
Could someone please update me with the status of this bug? Are there still problems?

I notice that the latest version in portage is based on 2.6.8.1. Would upgrading to a newer version (assuming there are newer releases) help at all?
Comment 42 BlaisorBlade 2005-02-09 13:58:00 UTC
Yes, upgrading would partially help. Alternatively, using a non-NPTL glibc is a workaround (but things get slower); using the latest, ~x86 glibc, built without the nptlonly flag, makes sure that UML is linked against a non-NPTL glibc, so this is also a workaround.

In short, see my previous message, and note that the previous official source (Jeff Dike) for the portage releases has stopped doing releases, since main work happens onto vanilla kernels (UML has been merged into vanilla Linux, finally). He now only maintains a development tree (http://user-mode-linux.sourceforge.net/patches.html, if you want, but it's for development).

Both the 2.6.9-bs6 patchset (which I maintain and is very stable, see at http://www.user-mode-linux.org/~blaisorblade/) and the vanilla 2.6.10 Linux kernel (with a bit of other problems, which are fixed in the upcoming vanilla 2.6.11) have the (partial) fix included: they work if you compile a SKAS-only UML (enable CONFIG_SKAS and disable CONFIG_TT).

Everything fails to compile if you have a NPTL glibc in /lib (necessary condition to experience the bug) and UML is statically linked, i.e. you enable also TT mode or explicitly request static linking (which is implied by TT mode).

For this configuration, no workaround exists at the moment, nor I know anyone who knows enough about linking scripts and glibc details to fix it.
And note that enabling TT mode is required to run UML onto a vanilla Linux kernel as host system; with the SKAS patch on the host it is possible to run a UML built with only SKAS mode enabled and TT mode disabled.

* Why wasn't the portage tree not updated (I guess):
The reason is that while previously UML was a separate patch to apply to a vanilla tarball, while starting from 2.6.9 UML has been merged in mainline so a vanilla kernel (should) compile. However, a vanilla 2.6.9 kernel tarball contains the whole UML architecture, but has these problems (they were discovered and fixed later).

I release (when needed) a patchset (the -bb/-bs one) against vanilla kernels, however, for further UML fixes. "When needed" means that if the mainline release is good, and no important fixes are written, or if my time is short, I don't do a release.

Possibly including it inside the portage tree would be good (as usermode-bb-sources, if you want). I both use a Gentoo system and maintain that patchset, so if you want I can help for this.
Comment 43 Daniel Drake (RETIRED) gentoo-dev 2005-02-18 05:05:07 UTC
Thanks for the explanation- thats good news. So, when Linux 2.6.11 comes out and gets marked stable in portage, we will effectively be able to drop usermode-sources-2.6 from portage without losing any functionality?
Comment 44 BlaisorBlade 2005-03-02 07:04:53 UTC
I hope that, but I'm not sure... actually, both 2.6.9 and 2.6.10 were not Good Enough releases.

Well, not that bad (2.6.9 works like a charm on a host < 2.6.9, in most cases); but I feel that in some cases we (UML developers) will still have to do some post-releases little fixes. I've done a lot of them for 2.6.9, I hadn't the time for 2.6.10.

http://www.user-mode-linux.org/~blaisorblade is the site to download them from. If you can include -bs7 inside portage (and add the security updates you want to add) I'd be grateful.
Comment 45 Daniel Drake (RETIRED) gentoo-dev 2005-03-02 15:27:59 UTC
Perhaps some UML users here could test 2.6.11 (gentoo-dev-sources) and see how they get on.
Comment 46 Daniel Webert 2005-03-19 12:54:32 UTC
overhere the gentoo-source.11-r3 as host and gentoo-source.11-r4 as uml works fine

what about a skas-patched-host-kernel? a use-flag for gentoo-sources/usermode-sources?

Portage 2.0.51.19 (default-linux/x86/2004.3, gcc-3.3.5, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r3 i686)
=================================================================
System uname: 2.6.11-gentoo-r3 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 28 2005, 13:40:03)]
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.8.5-r3, 1.4_p6, 1.5, 1.7.9-r1, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.4.22-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=pentium4 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
Comment 47 BlaisorBlade 2005-04-08 11:01:01 UTC
I'm maintaining some external patches for UML, as "fix after release" a bit like the -stable tree, but for UML only.

What about adding it to portage? I can help if needed.
Comment 48 Daniel Drake (RETIRED) gentoo-dev 2005-04-13 08:50:28 UTC
If it's as quiet as the -stable tree and the patches are going upstream then I might consider just merging it into gentoo-sources instead. Could you please give me the URL to the patches? I got a little lost on your site.
Comment 49 Daniel Drake (RETIRED) gentoo-dev 2005-04-28 09:26:59 UTC
Think I found it. Would this be the latest version?

http://www.user-mode-linux.org/~blaisorblade/patches/guest/uml-2.6.11-bs4/
Comment 50 Daniel Drake (RETIRED) gentoo-dev 2005-04-29 17:41:57 UTC
Added 2.6.11-bs4 to portage under name usermode-sources-2.6.11 - thanks. I'd appreciate it if someone could test it and let me know if it works, I'm not a UML user myself.
Comment 51 Daniel Drake (RETIRED) gentoo-dev 2005-05-08 04:55:29 UTC
No bug reports, I assume this is OK. The NPTL compilation issue still exists (I believe?) so closing as UPSTREAM. Hopefully someone will find the time and resources to fix it soon.
Comment 52 BlaisorBlade 2005-06-06 17:57:58 UTC
Ok, I hope there is still somebody using UML on a NPTL-only system. The 
workaround suggested last time was to avoid enabling CONFIG_MODE_TT; now I 
think I've got over this problem, too. So, when I release 2.6.11.8-bs6 (which 
will happen very shortly, I hope), I'd like to get some testing from you about 
this issue. 
 
Thanks a lot. 
Comment 53 Daniel Drake (RETIRED) gentoo-dev 2005-07-06 02:57:10 UTC
usermode-sources-2.6.12 is in portage. Please test it (see comment #51) as it
should solve the NPTL issues.
Comment 54 BlaisorBlade 2005-07-06 09:22:56 UTC
About that (since I'm the author of comment #51), actually the solution had a 
bit of problems, I think I've got around them but 2.6.12-bs1 does not yet 
include the fix, so probably neither does usermode-sources-2.6.12.
Comment 55 Alessio Cassibba (X-Drum) 2005-07-09 15:41:47 UTC
(In reply to comment #52)
> usermode-sources-2.6.12 is in portage. Please test it (see comment #51) as it
> should solve the NPTL issues.

Hi,
I'm using glibc-2.3.4.20041102-r1 compiled with the USE="nptl nptlonly".

Finally i was able to build an uml kernel from the source with this "mix"!!!
i patched the host kernel (gentoo-sources-2.6.12-r4)
with this patch:
http://www.user-mode-linux.org/~blaisorblade/patches/skas3-2.6/skas-2.6.12-rc4-v9-pre4/skas-2.6.12-rc4-v9-pre4.patch.bz2

then i emerged the usermode-sources-2.6.12
and in the kernel configuration 
i disabled CONFIG_MODE_TT 
and enabled CONFIG_SKAS 
(see comment #41 by BlaisorBlade)

NOTE1: when CONFIG_MODE_TT is disabled in the guest kernel (uml)
the host kernel must be patched with the skas patch.

NOTE2: i would like to thank you all! :D

my emerge info:
-----------------------------------------------------------------
Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130,
glibc-2.3.4.20041102-r1, 2.6.12-gentoo-r4-skas3-v9-pre4 i686)
=================================================================
System uname: 2.6.12-gentoo-r4-skas3-v9-pre4 i686 Intel(R) Pentium(R) 4 CPU 2.53GHz
Gentoo Base System version 1.6.12
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Apr 28 2005, 17:46:54)]
dev-lang/python:     2.3.5
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="it_IT@euro"
LINGUAS="it"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync1.it.gentoo.org/gentoo-portage"
USE="x86 X aalib acpi alsa apm arts avi berkdb bitmap-fonts cdr crypt cups curl
dvd dvdr emboss encode esd fam flac foomaticdb fortran gdbm gif gnome gpm gtk
gtk2 imagemagick imlib ipv6 java jpeg junit kde libg++ libwww mad mikmod mmx
motif mp3 mpeg mysql ncurses nls nptl nptlonly odbc ogg oggvorbis opengl oss pam
pdflib perl png python qt quicktime readline samba sdl slang spell ssl svga tcpd
tiff truetype truetype-fonts type1-fonts unicode usb vorbis xine xinerama xml
xml2 xmms xv zlib linguas_it userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LC_ALL, LDFLAGS


Comment 56 BlaisorBlade 2005-07-12 10:13:34 UTC
Ok, a couple of notes: 
1) You'll probably like to upgrade your SKAS patch to V8.2 or V9-pre7, since  
they fix an important bug which could affect apps other than UML (difficult to  
trigger since you use NPTL, anyway).  
  
2) With the latest patch for UML on my site, 2.6.12-bs5, you should be able to 
enable TT mode and still get a successful compile, it was tested on FC4. That 
tree will be probably added in portage (see bug #98785). 
 
3) I think that even in past releases UML compiled for NPTL-only systems, if 
enabling SKAS and disabling TT. 
Comment 57 Alessio Cassibba (X-Drum) 2005-07-13 08:14:09 UTC
(In reply to comment #55)
> Ok, a couple of notes: 
> 1) You'll probably like to upgrade your SKAS patch to V8.2 or V9-pre7, since  
> they fix an important bug which could affect apps other than UML (difficult to  
> trigger since you use NPTL, anyway).  
thanks for the tip, updated the host kernel

> 2) With the latest patch for UML on my site, 2.6.12-bs5, you should be able to 
> enable TT mode and still get a successful compile,
you are right,
patched a vanilla 2.6.12 with this patch, now i can run an uml kernel
compiled with CONFIG_TT and CONFIG_SKAS enabled on my nptlonly system.

Comment 58 Alessio Cassibba (X-Drum) 2005-07-14 01:11:22 UTC
UML patch 2.6.12-bs5 also worked with usermode-sources-2.6.12
(that includes the gentoo patchset)

Comment 59 Alessio Cassibba (X-Drum) 2005-07-14 01:12:50 UTC
Created attachment 63369 [details]
usermode-sources-2.6.12 + uml-2.6.12-bs5 patch
Comment 60 BlaisorBlade 2005-07-14 01:39:06 UTC
Yes, and -r1 should include -bs5 already... Bye  
Comment 61 Alessio Cassibba (X-Drum) 2005-07-14 01:40:00 UTC
> Yes, and -r1 should include -bs5 already... Bye  

nice! bye