Gentoo Logo
Gentoo Spaceship

Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-embedded
Lists: gentoo-embedded: < Prev By Thread Next > < Prev By Date Next >
To: gentoo-embedded@g.o
From: "Corey" <corey@...>
Subject: Re: unable to chroot
Date: Fri, 17 Nov 2006 17:08:33 -0700
On Friday 17 November 2006 15:15, Mike Frysinger wrote:
> On Friday 17 November 2006 16:35, Corey wrote:
> > scanner gentoo # ./bin/bash --version
> > GNU bash, version 3.1.17(1)-release (i686-pc-linux-gnu)
> > Copyright (C) 2005 Free Software Foundation, Inc.
> > scanner gentoo # chroot /mnt/gentoo/ /bin/bash
> > chroot: cannot run command `/bin/bash': No such file or directory
> assuming / is glibc and /mnt/gentoo is uclibc, this looks like the bin/bash is 
> incorrectly linked against glibc

I think that may be the problem.  ( I'm completely new to this ).

> try running `readelf -d bin/bash` and make sure it is linked against uClibc 
> libs

scanner gentoo # readelf -d bin/bash

Dynamic section at offset 0xce014 contains 22 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: []
 0x00000001 (NEEDED)                     Shared library: []
 0x00000001 (NEEDED)                     Shared library: []

I was concerned about the way I was doing this the other night.

I was successfully ( in appearance at least ) able to run a full stage4
crossdev on my local dev box:  crossdev --t i686-pc-linux-uclibc .

THis completed successfully, we're talking linux-headers, gcc, uclibc,
etc. My '/etc/portage/catagories' has "cross-i686-pc-linux-uclibc". I was
able to then install/(bootstrap) uclibc w/ gcc and linux-headers onto my
'/mnt/gentoo' partition, basically like so:

ROOT="/mnt/gentoo" CHOST="cross-i686-pc-linux-uclibc" emerge cross-i686-pc-linux-uclibc/linux-headers


The suspicion that I was doing something wrong, however, didn't occur until
I attempted to install some other necessary packages, such as bash:

ROOT="/mnt/gentoo" CHOST="cross-i686-pc-linux-uclibc" emerge bash

would cause:

"checking build system type... Invalid configuration `cross-i686-pc-linux-uclibc': machine `cross-i686-pc' not recognized
configure: error: /bin/sh ./support/config.sub cross-i686-pc-linux-uclibc failed"

So, trying a few different (basically random) things, I gave up and compiled it without
that CHOST env var - figuring that I would need to kind of recompile/'bootstrap' things
once I chroot'd into the new sandbox.

Here is ( what I believe to be ) a relevant portion of the bash config.log:

configure:2310: $? = 0
configure:2312: i686-pc-linux-uclibc-gcc -v </dev/null >&5
Using built-in specs.
Target: i686-pc-linux-uclibc
Configured with: /var/tmp/portage/gcc-4.1.1-r2/work/gcc-4.1.1/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/i686-pc-linux-uclibc/gcc-bin/4.1.1 --includedir=/usr/lib/gcc/i686-pc-linux-uclibc/4.1.1/include --datadir=/usr/share/gcc-data/i686-pc-linux-uclibc/4.1.1 --mandir=/usr/share/gcc-data/i686-pc-linux-uclibc/4.1.1/man --infodir=/usr/share/gcc-data/i686-pc-linux-uclibc/4.1.1/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-uclibc/4.1.1/include/g++-v4 --host=i686-pc-linux-gnu --target=i686-pc-linux-uclibc --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libmudflap --disable-libssp --disable-libgcj --enable-objc-gc --enable-languages=c,c++,objc,obj-c++ --with-sysroot=/usr/i686-pc-linux-uclibc --disable-__cxa_atexit --enable-target-optspace --enable-clocale=uclibc
Thread model: posix
gcc version 4.1.1 (Gentoo 4.1.1-r2)
configure:2315: $? = 0
configure:2317: i686-pc-linux-uclibc-gcc -V </dev/null >&5
i686-pc-linux-uclibc-gcc: '-V' option must have argument
configure:2320: $? = 1
configure:2346: checking for C compiler default output
configure:2349: i686-pc-linux-uclibc-gcc -O3 -march=i686 -pipe -fomit-frame-pointer -funroll-loops   conftest.c  >&5
configure:2352: $? = 0
configure:2385: result: a.out
configure:2390: checking whether the C compiler works
configure:2396: ./a.out
./configure: line 2397: ./a.out: No such file or directory
configure:2399: $? = 127
configure:2407: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.

gentoo-embedded@g.o mailing list

unable to chroot
-- Corey
Re: unable to chroot
-- Mike Frysinger
Lists: gentoo-embedded: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: unable to chroot
Next by thread:
Re: unable to chroot
Previous by date:
Re: unable to chroot
Next by date:
Re: unable to chroot

Updated Jun 17, 2009

Summary: Archive of the gentoo-embedded mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.