Summary: | glibc 2.4 and GCC 4.1: touch function not implemented because /proc gets unmounted | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Bob <custom_basses> |
Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED NEEDINFO | ||
Severity: | major | CC: | corsair, gentoo-bugs, pylon, rockoo |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Bob
2006-03-13 02:51:32 UTC
same result with 2.5.9-r1. :-/ emerge -d patch The problem is that something causes the `touch .unpacked` command to fail (portage behaves correctly). uhh, are you sure you're using linux 2.6.15 ? only time ive seen this issue is when people built the libc for a 2.6 kernel but then used the program on a 2.4 kernel Root cause is coreutils: /bin/touch does not work glibc-2.4 / gcc 3.4.5 It is only in a chroot if there is no /proc in chroot. Do this in chroot: mount -t proc proc /proc (In reply to comment #4) > uhh, are you sure you're using linux 2.6.15 ? only time ive seen this issue is > when people built the libc for a 2.6 kernel but then used the program on a 2.4 > kernel no, i didn't forge the output of "emerge --info", so i guess the answer is yes, i'm sure that i'm using a 2.6.15 kernel. :) *** Bug 126096 has been marked as a duplicate of this bug. *** > no, i didn't forge the output of "emerge --info", so i guess the answer is yes,
> i'm sure that i'm using a 2.6.15 kernel. :)
if you read bugzilla as much as i do, you'd know it isnt uncommon for users to accidently run `emerge info` from a chroot or the wrong terminal that is ssh-ed to a remote host
post the output as an attachment of:
strace -o log touch ~/unpacked
strace -o log touch /var/tmp/portage/unpacked
just so there's no concern about getting the output of emerge info from the wrong box, i'll confirm the information. the total post is pretty brief, so i'll post the relevant info here:
todland / # emerge --info
Portage 2.1_pre6 (default-linux/x86/2006.0, gcc-4.1.0, glibc-2.4-r0, 2.6.15-gentoo-r1 i686)
=================================================================
System uname: 2.6.15-gentoo-r1 i686 unknown
Gentoo Base System version 1.6.14
dev-lang/python: 2.4.2
sys-apps/sandbox: 1.2.12
sys-devel/autoconf: 2.13, 2.59-r7
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils: 2.16.1-r2
sys-devel/libtool: 1.5.22
virtual/os-headers: 2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=i686 -O2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
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="-march=i686 -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="http://*************"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -s"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://**************/gentoo-portage"
USE="x86 X alsa apache2 apm arts avi berkdb bitmap-fonts cli crypt ctype cups dba dri eds emboss encode esd expat fastbuild foomaticdb force-cgi-redirect fortran ftp gd gdbm gif gnome gpm gstreamer gtk gtk2 imlib ipv6 jpeg kde libg++ libwww mad memlimit mikmod motif mp3 mpeg ncurses nls nptl nptlonly ogg opengl oss pam pcre pdflib perl png posix python qt quicktime readline sdl session simplexml soap sockets spell spl ssl tcpd tokenizer truetype truetype-fonts type1-fonts udev unicode vorbis xml xmms xsl xv zlib elibc_glibc kernel_linux userland_GNU"
Unset: ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LC_ALL, LINGUAS
todland / # emerge -e system
Calculating system dependencies... done!
>>> Emerging (1 of 100) sys-devel/patch-2.5.9-r1 to /
>>> checksums files ;-) patch-2.5.9.ebuild
>>> checksums files ;-) patch-2.5.9-r1.ebuild
>>> checksums files ;-) files/digest-patch-2.5.9
>>> checksums files ;-) files/patch-2.5.9-cr-stripping.patch
>>> checksums files ;-) files/digest-patch-2.5.9-r1
>>> checksums src_uri ;-) patch-2.5.9.tar.gz
>>> Unpacking source...
>>> Unpacking patch-2.5.9.tar.gz to /var/tmp/portage/patch-2.5.9-r1/work
* Applying patch-2.5.9-cr-stripping.patch ... [ ok ]
touch: setting times of `/var/tmp/portage/patch-2.5.9-r1/.unpacked': Function not implemented
!!! ERROR: sys-devel/patch-2.5.9-r1 failed.
Call stack:
ebuild.sh, line 1557: Called dyn_unpack
!!! IO Failure -- Failed 'touch .unpacked' in /var/tmp/portage/patch-2.5.9-r1
!!! If you need support, post the topmost build error, and the call stack if relevant.
todland / # strace -o log touch ~/unpacked
bash: strace: command not found
todland / # > strace -o log touch /var/tmp/portage/unpacked
bash: -o: command not found
> todland / # strace -o log touch ~/unpacked
> bash: strace: command not found
so build strace statically somewhere and copy it over
You should make sure that you have proc inside your chroot: #mount -t proc proc /mnt/gentoo/proc (chroot)#ps -efa (chroot)#mount -t proc proc /proc If this not helps: (chroot)#mv /bin/touch /bin/touch.coreutils (chroot)#ln -s /bin/busybox /bin/touch (chroot)#touch somefile (chroot)#emerge strace (chroot)#rm /bin/touch (chroot)#mv /bin/touch.coreutils /bin/touch Background: busybox touch use other calls to touch a file. utime("somefile", NULL) = 0 The coreutils touch program uses a fd from /proc. open("somefile", O_WRONLY|O_NONBLOCK|O_CREAT|O_NOCTTY|O_LARGEFILE, 0666) = 0 utimes("/proc/self/fd/0", NULL) = 0 coreutils need /proc. (In reply to comment #11) > You should make sure that you have proc inside your chroot: thanks for the tip. since two people have recommended the same tip, i guess i should clarify that i think i covered that base prior to chrooting: # mount -t proc none /mnt/gentoo/proc # mount -o bind /dev /mnt/gentoo/dev # cp /proc/mounts /mnt/gentoo/etc/mtab # chroot /mnt/gentoo /bin/bash # env-update # source /etc/profile i haven't had an opportunity to transfer the exexutables for debugging yet. I have repeated an installation on multiple boxes, paying strict attention to mounting proc before stepping into the chroot. Upon entering the chroot, I've issued the following command:
emerge -e system && emerge -e system
The first emerge -e system completes successfully. The second emerge -e system fails on the first package, patch, with the following error:
<snip>
Calculating system dependencies... done!
>>> Emerging (1 of 100) sys-devel/patch-2.5.9 to /
>>> checksums files ;-) patch-2.5.9.ebuild
>>> checksums files ;-) patch-2.5.9-r1.ebuild
>>> checksums files ;-) files/digest-patch-2.5.9
>>> checksums files ;-) files/patch-2.5.9-cr-stripping.patch
>>> checksums files ;-) files/digest-patch-2.5.9-r1
>>> checksums src_uri ;-) patch-2.5.9.tar.gz
>>> Unpacking source...
>>> Unpacking patch-2.5.9.tar.gz to /var/tmp/portage/patch-2.5.9/work
touch: setting times of `/var/tmp/portage/patch-2.5.9/.unpacked': Function not implemented
!!! ERROR: sys-devel/patch-2.5.9 failed.
Call stack:
ebuild.sh, line 1557: Called dyn_unpack
!!! IO Failure -- Failed 'touch .unpacked' in /var/tmp/portage/patch-2.5.9
!!! If you need support, post the topmost build error, and the call stack if relevant.
</snip>
It is interesting that the first emerge -e system completes without an error, but the second one fails.
Upon repeating the commands to mount proc within the chroot, a subsequent emerge -e system will complete successfully. Specifically, if I remount proc using the following command:
mount -t proc proc /proc
then the emerge -e system will complete. But a subsequent emerge -e system will always fail.
It appears that proc is being dismounted somewhere during the system rebuild, as a manual mount fixes the problem and a subsequent emerge -e system always reintroduces it.
I have been building identical toolkits with Glibc-2.3.6 in parallel chroots on the same boxes that are having the problem with Glibc 2.4. Reverting to glibc-2.3.6-r3 eliminates the problem on all of the boxes. The chroots are otherwise identical.
so run a bg job that constantly checks /proc to see when it gets unmounted sorry. i'm not the developer. i'm happy to fall back to glibc 2.3.6 and leave the problem unsolved. k (In reply to comment #14) > so run a bg job that constantly checks /proc to see when it gets unmounted Coreutils or Baselayout It breaks in Baselayout. i'm reopening because somebody else is interested. you still need to figure it out ive rebuilt both coreutils and baselayout in chroots and never had a problem with my /proc being unmounted there is also the fact that neither coreutils nor baselayout nor portage call `umount` in the ebuilds *** Bug 133131 has been marked as a duplicate of this bug. *** |