chroot: failed to run command `/tmp/stage1-preclean-chroot.sh': No such file or directory
At the end of my stage1 build, I get (sorry for gmail's linewraps)
"""
removing /space/catalyst/tmp/default/stage1-mips4_n32-20101114/tmp/chroot-functions.sh
from the chroot
--- Running action sequence: preclean
copying stage1-preclean-chroot.sh to
/space/catalyst/tmp/default/stage1-mips4_n32-20101114/tmp/stage1root/tmp/
copying chroot-functions.sh to
/space/catalyst/tmp/default/stage1-mips4_n32-20101114/tmp/stage1root/tmp/
Running stage1-preclean-chroot.sh in chroot
/space/catalyst/tmp/default/stage1-mips4_n32-20101114/tmp/stage1root
chroot: failed to run command `/tmp/stage1-preclean-chroot.sh': No
such file or directory
!!! catalyst: preclean script failed.
Traceback (most recent call last):
File "modules/generic_stage_target.py", line 1167, in preclean
" preclean","preclean script failed.",env=self.env)
File "/usr/lib/catalyst/modules/catalyst_support.py", line 542, in cmd
raise CatalystError,myexc
CatalystError
None
!!! catalyst: Build failed, could not execute preclean
Traceback (most recent call last):
File "/usr/lib/catalyst/catalyst", line 209, in build_target
mytarget.run()
File "modules/generic_stage_target.py", line 1263, in run
apply(getattr(self,x))
File "modules/generic_stage_target.py", line 1172, in preclean
raise CatalystError, "Build failed, could not execute preclean"
CatalystError
!!! catalyst: Error encountered during run of target stage1
Catalyst aborting....
"""
But the /tmp/stage1-preclean-chroot.sh _is_ there, with proper permissions, etc.
bcm91250a-be space # ls -lh
catalyst/tmp/default/stage1-mips4_n32-20101114/tmp/stage1root/tmp/stage1-preclean-chroot.sh
-rwxr-xr-x 1 root root 435 Nov 4 09:23
catalyst/tmp/default/stage1-mips4_n32-20101114/tmp/stage1root/tmp/stage1-preclean-chroot.sh
So I tried chrooting into the stage1root:
bcm91250a-be space # chroot
catalyst/tmp/default/stage1-mips4_n32-20101114/tmp/stage1root/
/bin/bash
chroot: failed to run command `/bin/bash': No such file or directory
But bash _is_ there, and does work. (=sys-apps/bash-4.1_p9)
bcm91250a-be space #
catalyst/tmp/default/stage1-mips4_n32-20101114/tmp/stage1root/bin/bash
--version
GNU bash, version 4.1.9(2)-release (mips64-unknown-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
glibc is (=sys-libs/glibc-2.11.2-r3):
bcm91250a-be space #
/space/catalyst/tmp/default/stage1-mips4_n32-20101114/tmp/stage1root/lib/libc.so.6
GNU C Library stable release version 2.11.2, by Roland McGrath et al.
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.5.1.
Compiled on a Linux 2.6.35 system on 2010-11-14.
Available extensions:
C stubs add-on version 2.1.2
crypt add-on version 2.1 by Michael Glad and others
Gentoo patchset 6
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
Support for some architectures added on, not maintained in glibc core.
BIND-8.2.3-T5B
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
So there must be some strange problem with glibc and bash. How can I
figure out what's causing this?
Thanks,
Matt
11-15-2010, 03:33 PM
Matt Turner
chroot: failed to run command `/tmp/stage1-preclean-chroot.sh': No such file or directory
On Mon, Nov 15, 2010 at 11:11 AM, Peter Stuge <peter@stuge.se> wrote:
> Matt Turner wrote:
>> chroot: failed to run command `/tmp/stage1-preclean-chroot.sh': No such file or directory
>
> Can you check with strace which file it is that is actually missing?
>
>
> //Peter
Yes, good idea.
bcm91250a-be space # strace -o output.strace chroot
/space/catalyst/tmp/default/stage1-mips4_n32-20101114/tmp/stage1root/
/bin/bash
chroot: failed to run command `/bin/bash': No such file or directory
It actually reports
execve("/bin/bash", ["/bin/bash"], [/* 27 vars */]) = -1 ENOENT (No
such file or directory)
But what the heck?
bcm91250a-be space # ls -lh
/space/catalyst/tmp/default/stage1-mips4_n32-20101114/tmp/stage1root/bin/bash
-rwxr-xr-x 1 root root 880K Nov 15 00:38
/space/catalyst/tmp/default/stage1-mips4_n32-20101114/tmp/stage1root/bin/bash
bcm91250a-be space # file
/space/catalyst/tmp/default/stage1-mips4_n32-20101114/tmp/stage1root/bin/bash
/space/catalyst/tmp/default/stage1-mips4_n32-20101114/tmp/stage1root/bin/bash:
ELF 32-bit MSB executable, MIPS, N32 MIPS64 version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.9, with
unknown capability 0x41000000 = 0xf676e75, with unknown capability
0x10000 = 0x70401, stripped