[Clfs-support] Error building cross eglibc 2.17 64 bit

Charlie Brown stieizc.33 at gmail.com
Wed Jul 3 05:38:20 PDT 2013


I'm having trouble compiling cross eglibc 2.17 64 bit in Chapter 5.
----------------------------------------
BOOK:GIT-20130630-x86_64-Multilib

host: debian 7, x86_64
target: x86_64
$CLFS_HOST=x86_64-cross-linux-gnu
$CLFS_TARGET=x86_64-unknown-linux-gnu $BUILD32=-m32 $BUILD64=-m64

Thanks in advance.

Here's what I did:

cat > config.cache <<"EOF"
libc_cv_forced_unwind=yes
libc_cv_c_cleanup=yes
libc_cv_gnu89_inline=yes
libc_cv_ssp=no
EOF
echo "slibdir=/tools/lib64" >> configparms &&
BUILD_CC="gcc" CC="${CLFS_TARGET}-gcc ${BUILD64}" \
AR="${CLFS_TARGET}-ar" RANLIB="${CLFS_TARGET}-ranlib" \
../eglibc-2.17/configure --prefix=/tools \
--host=${CLFS_TARGET} --build=${CLFS_HOST} --libdir=/tools/lib64 \
--disable-profile --with-tls --enable-kernel=2.6.32 --with-__thread \
--with-binutils=/cross-tools/bin --with-headers=/tools/include \
--enable-obsolete-rpc--cache-file=config.cache &&
make -j4 &&
make install inst_vardbdir=/tools/var/db

Here's the output of make:
/mnt/clfs/sources/eglibc-build/resolv/libresolv_pic.a(ns_print.os): In
function `__GI_ns_sprintrrf':
ns_print.c:(.text+0x48a): undefined reference to `__stack_chk_guard'
ns_print.c:(.text+0x6cb): undefined reference to `__stack_chk_guard'
/mnt/clfs/sources/eglibc-build/resolv/libresolv_pic.a(gethnamaddr.os):
In function `getanswer':
gethnamaddr.c:(.text+0x728): undefined reference to `__stack_chk_guard'
gethnamaddr.c:(.text+0x756): undefined reference to `__stack_chk_guard'
/mnt/clfs/sources/eglibc-build/resolv/libresolv_pic.a(gethnamaddr.os):
In function `__GI_res_gethostbyname2':
gethnamaddr.c:(.text+0x107c): undefined reference to `__stack_chk_guard'
/mnt/clfs/sources/eglibc-build/resolv/libresolv_pic.a(gethnamaddr.os):gethnamaddr.c:(.text+0x1261):
more undefined references to `__stack_chk_guard' follow
collect2: error: ld returned 1 exit status
make[2]: *** [/mnt/clfs/sources/eglibc-build/resolv/libresolv.so] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/mnt/clfs/sources/eglibc-2.17/resolv'
make[1]: *** [resolv/others] Error 2
make[1]: Leaving directory `/mnt/clfs/sources/eglibc-2.17'
make: *** [all] Error 2

It seems that the GCC Stack Smashing Protector is working here,
preventing the source code from being built.
I don't know what to do now, maybe I should turn off the checking.

Sincerely,
王文鑫
Charlie



More information about the Clfs-support mailing list