LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 02-05-2007, 09:20 PM   #1
katinoel
LQ Newbie
 
Registered: Feb 2007
Posts: 1

Rep: Reputation: 0
Cross LFS for IA64 Glibc make error


I'm trying to make cross toolchains and cross-lfs for IA64 based on CLFS 1.0.0. Now, I met a problem when I compile glibc. I tried to find any other cases like this, but I couldn't. Can sombody help me?


All processes are based on the CLFS 1.0.0 manual and package.

Error messages:

Quote:
ia64-unknown-linux-gnu-gcc -nostdlib -nostartfiles -static -o /linux2/sources/glibc-build/elf/sln /linux2/sources/ glibc-build/csu/crt1.o /linux2/sources/glibc-build/csu/crti.o `ia64-unknown-linux-gnu-gcc --print-file-name=crtbegin. o` /linux2/sources/glibc-build/elf/sln.o /linux2/sources/glibc-build/libc.a -lgcc /linux2/sources/glibc-build/libc. a `ia64-unknown-linux-gnu-gcc --print-file-name=crtend.o` /linux2/sources/glibc-build/csu/crtn.o
/linux2/cross-tools/lib/gcc/ia64-unknown-linux-gnu/4.1.1/libgcc.a(unwind-compat.o): In function `_Unwind_SetIP':
../../gcc-4.1.1/gcc/unwind-compat.c:205: undefined reference to `__libunwind_Unwind_SetIP'
/linux2/cross-tools/lib/gcc/ia64-unknown-linux-gnu/4.1.1/libgcc.a(unwind-compat.o): In function `_Unwind_SetGR':
../../gcc-4.1.1/gcc/unwind-compat.c:195: undefined reference to `__libunwind_Unwind_SetGR'
/linux2/cross-tools/lib/gcc/ia64-unknown-linux-gnu/4.1.1/libgcc.a(unwind-compat.o): In function `_Unwind_Resume_or_Re throw':
../../gcc-4.1.1/gcc/unwind-compat.c:184: undefined reference to `__libunwind_Unwind_Resume_or_Rethrow'
/linux2/cross-tools/lib/gcc/ia64-unknown-linux-gnu/4.1.1/libgcc.a(unwind-compat.o): In function `_Unwind_Resume':
../../gcc-4.1.1/gcc/unwind-compat.c:174: undefined reference to `__libunwind_Unwind_Resume'
/linux2/cross-tools/lib/gcc/ia64-unknown-linux-gnu/4.1.1/libgcc.a(unwind-compat.o): In function `_Unwind_RaiseExcepti on':
../../gcc-4.1.1/gcc/unwind-compat.c:165: undefined reference to `__libunwind_Unwind_RaiseException'
/linux2/cross-tools/lib/gcc/ia64-unknown-linux-gnu/4.1.1/libgcc.a(unwind-compat.o): In function `_Unwind_GetRegionSta rt':
../../gcc-4.1.1/gcc/unwind-compat.c:155: undefined reference to `__libunwind_Unwind_GetRegionStart'
/linux2/cross-tools/lib/gcc/ia64-unknown-linux-gnu/4.1.1/libgcc.a(unwind-compat.o): In function `_Unwind_GetLanguageS pecificData':
../../gcc-4.1.1/gcc/unwind-compat.c:145: undefined reference to `__libunwind_Unwind_GetLanguageSpecificData'
/linux2/cross-tools/lib/gcc/ia64-unknown-linux-gnu/4.1.1/libgcc.a(unwind-compat.o): In function `_Unwind_GetIP':
../../gcc-4.1.1/gcc/unwind-compat.c:135: undefined reference to `__libunwind_Unwind_GetIP'
/linux2/cross-tools/lib/gcc/ia64-unknown-linux-gnu/4.1.1/libgcc.a(unwind-compat.o): In function `_Unwind_GetGR':
../../gcc-4.1.1/gcc/unwind-compat.c:126: undefined reference to `__libunwind_Unwind_GetGR'
/linux2/cross-tools/lib/gcc/ia64-unknown-linux-gnu/4.1.1/libgcc.a(unwind-compat.o): In function `_Unwind_GetBSP':
../../gcc-4.1.1/gcc/unwind-compat.c:95: undefined reference to `__libunwind_Unwind_GetBSP'
/linux2/cross-tools/lib/gcc/ia64-unknown-linux-gnu/4.1.1/libgcc.a(unwind-compat.o): In function `_Unwind_GetCFA':
../../gcc-4.1.1/gcc/unwind-compat.c:84: undefined reference to `__libunwind_Unwind_GetCFA'
/linux2/cross-tools/lib/gcc/ia64-unknown-linux-gnu/4.1.1/libgcc.a(unwind-compat.o): In function `_Unwind_ForcedUnwind ':
../../gcc-4.1.1/gcc/unwind-compat.c:74: undefined reference to `__libunwind_Unwind_ForcedUnwind'
/linux2/cross-tools/lib/gcc/ia64-unknown-linux-gnu/4.1.1/libgcc.a(unwind-compat.o): In function `_Unwind_FindEnclosin gFunction':
../../gcc-4.1.1/gcc/unwind-compat.c:63: undefined reference to `__libunwind_Unwind_FindEnclosingFunction'
/linux2/cross-tools/lib/gcc/ia64-unknown-linux-gnu/4.1.1/libgcc.a(unwind-compat.o): In function `_Unwind_DeleteExcept ion':
../../gcc-4.1.1/gcc/unwind-compat.c:54: undefined reference to `__libunwind_Unwind_DeleteException'
/linux2/cross-tools/lib/gcc/ia64-unknown-linux-gnu/4.1.1/libgcc.a(unwind-compat.o): In function `_Unwind_Backtrace':
../../gcc-4.1.1/gcc/unwind-compat.c:44: undefined reference to `__libunwind_Unwind_Backtrace'
collect2: ld returned 1 exit status
make[2]: *** [/linux2/sources/glibc-build/elf/sln] Error 1
make[2]: Leaving directory `/linux2/sources/glibc-2.4/elf'
make[1]: *** [elf/others] Error 2
make[1]: Leaving directory `/linux2/sources/glibc-2.4'
make: *** [all] Error 2
[clfs2@testgcc glibc-build]$
Build log:
Quote:
###### shell log : CLFS for IA64 #########

echo # linux-headers
tar -xjf linux-headers-2.6.17.13-09092006.tar.bz2
cd linux-headers-2.6.17.13

install -dv $CLFS/tools/include
cp -av include/asm-ia64 $CLFS/tools/include/asm
cp -av include/{asm-generic,linux} $CLFS/tools/include/

cd ..



echo # binutils
tar -xjf binutils-2.17.tar.bz2
cd binutils-2.17

patch -Np1 -i ../binutils-2.17-posix-1.patch

mkdir -v ../binutils-build
cd ../binutils-build

../binutils-2.17/configure --prefix=$CLFS/cross-tools --host=${CLFS_HOST} --target=${CLFS_TARGET} --with-lib-path=$CLFS/tools/lib --disable-nls --enable-shared --enable-64-bit-bfd --disable-multilib

make -s configure-host
make -s

make -s install

cp -v ../binutils-2.17/include/libiberty.h $CLFS/tools/include

cd ..



echo # glibc - headers
tar -xjf glibc-2.4.tar.bz2
cd glibc-2.4
cp -v configure{,.orig}
sed -e 's/3.4/3.[0-9]/g' configure.orig > configure
mkdir -v ../glibc-build
cd ../glibc-build

echo "libc_cv_forced_unwind=yes" > config.cache
echo "libc_cv_c_cleanup=yes" >> config.cache
echo "libc_cv_mlong_double_128=yes" >> config.cache
echo "libc_cv_ia64_tls=yes" >> config.cache

CC=gcc ../glibc-2.4/configure --prefix=$CLFS/tools --host=${CLFS_TARGET} --build=${CLFS_HOST} --disable-sanity-checks --enable-kernel=2.6.0 --with-headers=$CLFS/tools/include --cache-file=config.cache --with-binutils=$CLFS/cross-tools/${CLFS_TARGET}/bin --with-tls --with-__thread

make -s install-headers

install -dv $CLFS/tools/include/bits
cp -v bits/stdio_lim.h $CLFS/tools/include/bits
touch $CLFS/tools/include/gnu/stubs.h
cp -v ../glibc-2.4/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
$CLFS/tools/include/bits/

cd ..
rm glibc-build -rf
rm glibc-2.4 -rf




echo # gcc-static
pwd
tar -xjf gcc-4.1.1.tar.bz2
cd gcc-4.1.1
patch -Np1 -i ../gcc-4.1.1-specs-1.patch
patch -Np1 -i ../gcc-4.1.1-posix-1.patch
patch -Np1 -i ../gcc-4.1.1-cross_search_paths-1.patch

echo "
#undef STARTFILE_PREFIX_SPEC
#define STARTFILE_PREFIX_SPEC \"$CLFS/tools/lib/\"" >> gcc/config/linux.h

cp -v gcc/Makefile.in{,.orig}
sed -e "s@\(^CROSS_SYSTEM_HEADER_DIR =\).*@\1 $CLFS/tools/include@g"
gcc/Makefile.in.orig > gcc/Makefile.in

mkdir -v ../gcc-build
cd ../gcc-build

../gcc-4.1.1/configure --prefix=$CLFS/cross-tools --host=${CLFS_HOST} --target=${CLFS_TARGET} --disable-mutlilib --with-local-prefix=$CLFS/tools --disable-nls --disable-shared --disable-threads --enable-languages=c

make -s all-gcc

make -s install-gcc

cd ..
rm gcc-build -rf
rm gcc-4.1.1 -rf



echo # linux-2.6.17.13
pwd
tar -xjf linux-2.6.17.13.tar.bz2
cp ./linux-2.6.17.13/include/asm-ia64/gcc_intrin.h $CLFS/tools/include/asm/




echo # glibc-2.4
pwd
tar -xjf glibc-2.4.tar.bz2
cd glibc-2.4

patch -Np1 -i ../glibc-2.4-libgcc_eh-1.patch
patch -Np1 -i ../glibc-2.4-localedef_segfault-1.patch

cp -v nscd/Makefile{,.orig}
sed -e "/nscd_stat.o: sysincludes = # nothing/d" nscd/Makefile.orig > nscd/Makefile

mkdir -v ../glibc-build
cd ../glibc-build

echo "libc_cv_forced_unwind=yes" > config.cache
echo "libc_cv_c_cleanup=yes" >> config.cache
# echo "libc_cv_mlong_double_128=yes" >> config.cache
# echo "libc_cv_ia64_tls=yes" >> config.cache

BUILD_CC="gcc" CC="${CLFS_TARGET}-gcc" AR="${CLFS_TARGET}-ar" RANLIB="${CLFS_TARGET}-ranlib"

../glibc-2.4/configure --prefix=$CLFS/tools --host=${CLFS_TARGET} --build=${CLFS_HOST} --disable-profile --enable-add-ons --with-tls --enable-kernel=2.6.0 --with-__thread --with-binutils=$CLFS/cross-tools/bin --with-headers=$CLFS/tools/include --cache-file=config.cache

make

#make -s install


Last edited by katinoel; 02-05-2007 at 09:24 PM.
 
Old 03-03-2007, 06:34 AM   #2
Jaqui
Member
 
Registered: Jan 2006
Location: Vancouver BC
Distribution: LFS, SLak, Gentoo, Debian
Posts: 291

Rep: Reputation: 36
what is the build environment?
it looks like you are building on linux, which would mean that a cross build isn't really needed.
you can just target the ia64 arch with a standard build rather than use cross-lfs for the build.

I'm currntly building an AMD 64bit lfs system, and using the livecd it's a standard lfs build on the hardware, no targeting needed for the compiling.


but this part here:
Quote:
__libunwind_Unwind_SetIP'
means that your build isn't finding libunwind.
all the error message lines are showing an "undefined reference" message, which means ld isn't loading something right.
 
  


Reply

Tags
clfs, cross, glibc, ia64, lfs


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross-lfs Glibc-2.4 EXS Linux From Scratch 1 06-09-2006 02:03 PM
glibc 2.3.4 - make install error - LFS 6.1.1-3 dave-gallagher Linux From Scratch 2 05-23-2006 04:12 PM
make configure-host for binutils-2.16.1 fails under 7.0-cross-lfs-20051019-x86_64 Basel Linux From Scratch 2 10-24-2005 11:07 PM
LFS 6, chapter 6.11; Glibc 'make check' error Zamochit Linux From Scratch 5 05-31-2005 12:54 PM
make glibc error (LFS) gatblast45 Linux - Software 3 12-21-2004 11:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 05:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration