Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can't find libc.so.6

806 views
Skip to first unread message

zhongho

unread,
Jan 3, 2010, 2:24:39 AM1/3/10
to
I am building an ARM cross compiler on x86 linux.

SYSROOT=/home/zhong/cross
PREFIX=$SYSROOT/usr
BINUTILS=binutils-2.20
GCC=gcc-4.4.2
GLIBC=glibc-2.10.1

My steps:
1. Install linux headers to $SYSROOT/usr/include
2. ../$BINUTILS/configure --prefix=$PREFIX --target=arm-linux --with-
sysroot
3. bootstrap gcc
../$GCC/configure --prefix=$PREFIX --target=arm-linux --with-
sysroot=$SYSROOT --without-headers --with-newlib --disable-threads --
enable-languages=c
4. Compile glibc with bootstrap gcc
5. cross gcc
../$GCC/configure --prefix=$PREFIX --target=arm-linux --with-sysroot=
$SYSROOT --enable-languages=c,c++
make

The first 4 step work, but the last one.
Here is the last error:
/home/zhong/cross/usr/arm-linux/bin/ld: cannot find /home/zhong/cross/
usr/lib/libc.so.6 inside /home/zhong/cross
collect2: ld return 1
make[1]: *** [libgcc_s.so] Error 1

The libc.so.6 does exist in /home/zhong/cross/usr/lib
I don't understand why gcc searchs "/home/zhong/cross/usr/lib" rather
than "/usr/lib" in its sysroot.
Could somebody help me?
Thanks

Fred

unread,
Jan 5, 2010, 6:10:58 PM1/5/10
to

Possibly because you to told it that SYSROOT is "/home/zhong/cross" ?

0 new messages