1 |
On Friday 17 November 2006 15:15, Mike Frysinger wrote: |
2 |
> On Friday 17 November 2006 16:35, Corey wrote: |
3 |
> > scanner gentoo # ./bin/bash --version |
4 |
> > GNU bash, version 3.1.17(1)-release (i686-pc-linux-gnu) |
5 |
> > Copyright (C) 2005 Free Software Foundation, Inc. |
6 |
> > scanner gentoo # chroot /mnt/gentoo/ /bin/bash |
7 |
> > chroot: cannot run command `/bin/bash': No such file or directory |
8 |
> |
9 |
> assuming / is glibc and /mnt/gentoo is uclibc, this looks like the bin/bash is |
10 |
> incorrectly linked against glibc |
11 |
> |
12 |
|
13 |
I think that may be the problem. ( I'm completely new to this ). |
14 |
|
15 |
|
16 |
> try running `readelf -d bin/bash` and make sure it is linked against uClibc |
17 |
> libs |
18 |
> |
19 |
|
20 |
scanner gentoo # readelf -d bin/bash |
21 |
|
22 |
Dynamic section at offset 0xce014 contains 22 entries: |
23 |
Tag Type Name/Value |
24 |
0x00000001 (NEEDED) Shared library: [libncurses.so.5] |
25 |
0x00000001 (NEEDED) Shared library: [libdl.so.2] |
26 |
0x00000001 (NEEDED) Shared library: [libc.so.6] |
27 |
|
28 |
|
29 |
|
30 |
I was concerned about the way I was doing this the other night. |
31 |
|
32 |
I was successfully ( in appearance at least ) able to run a full stage4 |
33 |
crossdev on my local dev box: crossdev --t i686-pc-linux-uclibc . |
34 |
|
35 |
THis completed successfully, we're talking linux-headers, gcc, uclibc, |
36 |
etc. My '/etc/portage/catagories' has "cross-i686-pc-linux-uclibc". I was |
37 |
able to then install/(bootstrap) uclibc w/ gcc and linux-headers onto my |
38 |
'/mnt/gentoo' partition, basically like so: |
39 |
|
40 |
ROOT="/mnt/gentoo" CHOST="cross-i686-pc-linux-uclibc" emerge cross-i686-pc-linux-uclibc/linux-headers |
41 |
|
42 |
etc,etc. |
43 |
|
44 |
The suspicion that I was doing something wrong, however, didn't occur until |
45 |
I attempted to install some other necessary packages, such as bash: |
46 |
|
47 |
ROOT="/mnt/gentoo" CHOST="cross-i686-pc-linux-uclibc" emerge bash |
48 |
|
49 |
would cause: |
50 |
|
51 |
"checking build system type... Invalid configuration `cross-i686-pc-linux-uclibc': machine `cross-i686-pc' not recognized |
52 |
configure: error: /bin/sh ./support/config.sub cross-i686-pc-linux-uclibc failed" |
53 |
|
54 |
So, trying a few different (basically random) things, I gave up and compiled it without |
55 |
that CHOST env var - figuring that I would need to kind of recompile/'bootstrap' things |
56 |
once I chroot'd into the new sandbox. |
57 |
|
58 |
Here is ( what I believe to be ) a relevant portion of the bash config.log: |
59 |
|
60 |
configure:2310: $? = 0 |
61 |
configure:2312: i686-pc-linux-uclibc-gcc -v </dev/null >&5 |
62 |
Using built-in specs. |
63 |
Target: i686-pc-linux-uclibc |
64 |
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 |
65 |
Thread model: posix |
66 |
gcc version 4.1.1 (Gentoo 4.1.1-r2) |
67 |
configure:2315: $? = 0 |
68 |
configure:2317: i686-pc-linux-uclibc-gcc -V </dev/null >&5 |
69 |
i686-pc-linux-uclibc-gcc: '-V' option must have argument |
70 |
configure:2320: $? = 1 |
71 |
configure:2346: checking for C compiler default output |
72 |
configure:2349: i686-pc-linux-uclibc-gcc -O3 -march=i686 -pipe -fomit-frame-pointer -funroll-loops conftest.c >&5 |
73 |
configure:2352: $? = 0 |
74 |
configure:2385: result: a.out |
75 |
configure:2390: checking whether the C compiler works |
76 |
configure:2396: ./a.out |
77 |
./configure: line 2397: ./a.out: No such file or directory |
78 |
configure:2399: $? = 127 |
79 |
configure:2407: error: cannot run C compiled programs. |
80 |
If you meant to cross compile, use `--host'. |
81 |
|
82 |
-- |
83 |
gentoo-embedded@g.o mailing list |