dwhitney67 |
08-24-2007 10:10 AM |
glibc-2.5.1 cannot find libstdc++
Hi,
I am working with the LFS Version SVN-20070821 guide, which I believe was recently updated to use glibc-2.5.1. I am building LFS under Ubuntu 7.04 (Feisty) with the latest updates.
Anyhow, I am stuck at a point where it cannot find the libstdc++ library. Here's the error output leading up to the error:
PHP Code:
g++ bug-atexit3-lib.cc -c -isystem /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2 -isystem /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/i486-linux-gnu -isystem /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/backward -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -g -mpreferred-stack-boundary=2 -fPIC -I../include -I/mnt/lfs/sources/glibc-build/dlfcn -I/mnt/lfs/sources/glibc-build -I../sysdeps/i386/elf -I../nptl/sysdeps/unix/sysv/linux/i386/i686 -I../nptl/sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux/i386 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386 -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../nptl/sysdeps/i386/i686 -I../sysdeps/i386/i686 -I../sysdeps/i386/i486 -I../nptl/sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../nptl/sysdeps/i386 -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I.. -I../libio -I. -nostdinc -isystem /mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/include -isystem /tools/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -o /mnt/lfs/sources/glibc-build/dlfcn/bug-atexit3-lib.os -MD -MP -MF /mnt/lfs/sources/glibc-build/dlfcn/bug-atexit3-lib.os.dt -MT /mnt/lfs/sources/glibc-build/dlfcn/bug-atexit3-lib.os ../include/unistd.h:4: warning: 'void _exit(int)': visibility attribute ignored because it ../posix/unistd.h:548: warning: conflicts with previous declaration here ../include/unistd.h:7: warning: 'int execl(const char*, const char*, ...)': visibility attribute ignored because it ../posix/unistd.h:527: warning: conflicts with previous declaration here ../include/unistd.h:8: warning: 'int execle(const char*, const char*, ...)': visibility attribute ignored because it ../posix/unistd.h:522: warning: conflicts with previous declaration here ../include/unistd.h:9: warning: 'int execlp(const char*, const char*, ...)': visibility attribute ignored because it ../posix/unistd.h:538: warning: conflicts with previous declaration here ../include/unistd.h:10: warning: 'int execvp(const char*, char* const*)': visibility attribute ignored because it ../posix/unistd.h:532: warning: conflicts with previous declaration here gcc -B/tools/bin/ -shared -static-libgcc -Wl,-dynamic-linker=/tools/lib/ld-linux.so.2 -Wl,-z,defs -B/mnt/lfs/sources/glibc-build/csu/ -Wl,-z,combreloc -Wl,-z,relro -L/mnt/lfs/sources/glibc-build -L/mnt/lfs/sources/glibc-build/math -L/mnt/lfs/sources/glibc-build/elf -L/mnt/lfs/sources/glibc-build/dlfcn -L/mnt/lfs/sources/glibc-build/nss -L/mnt/lfs/sources/glibc-build/nis -L/mnt/lfs/sources/glibc-build/rt -L/mnt/lfs/sources/glibc-build/resolv -L/mnt/lfs/sources/glibc-build/crypt -L/mnt/lfs/sources/glibc-build/nptl -Wl,-rpath-link=/mnt/lfs/sources/glibc-build:/mnt/lfs/sources/glibc-build/math:/mnt/lfs/sources/glibc-build/elf:/mnt/lfs/sources/glibc-build/dlfcn:/mnt/lfs/sources/glibc-build/nss:/mnt/lfs/sources/glibc-build/nis:/mnt/lfs/sources/glibc-build/rt:/mnt/lfs/sources/glibc-build/resolv:/mnt/lfs/sources/glibc-build/crypt:/mnt/lfs/sources/glibc-build/nptl -o /mnt/lfs/sources/glibc-build/dlfcn/bug-atexit3-lib.so -T /mnt/lfs/sources/glibc-build/shlib.lds /mnt/lfs/sources/glibc-build/csu/abi-note.o /mnt/lfs/sources/glibc-build/dlfcn/bug-atexit3-lib.os /mnt/lfs/sources/glibc-build/libc.so /mnt/lfs/sources/glibc-build/libc_nonshared.a -lstdc++ -lgcc_eh /mnt/lfs/sources/glibc-build/elf/ld.so /mnt/lfs/sources/glibc-build/libc_nonshared.a /tools/bin/ld: cannot find -lstdc++ collect2: ld returned 1 exit status make[2]: *** [/mnt/lfs/sources/glibc-build/dlfcn/bug-atexit3-lib.so] Error 1 make[2]: Leaving directory `/mnt/lfs/sources/glibc-2.5.1/dlfcn' make[1]: *** [dlfcn/tests] Error 2 make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.5.1' make: *** [check] Error 2 lfs@huahin:/mnt/lfs$
These are my environment (shell) settings:
PHP Code:
lfs@huahin:/mnt/lfs$ env TERM=xterm OLDPWD=/mnt/lfs/sources LC_ALL=POSIX LFS=/mnt/lfs PATH=/tools/bin:/bin:/usr/bin PWD=/mnt/lfs PS1=${debian_chroot:+($debian_chroot)}\u@\h:\w\$ SHLVL=1 HOME=/home/lfs _=/usr/bin/env lfs@huahin:/mnt/lfs$
And included here is the partial listing of the script I am using to perform the build:
PHP Code:
#!/bin/sh
PrintStep() { echo "##########################################" echo "#" echo "# $1" echo "#" echo "##########################################" }
# # Transition to sources directory # pushd sources
# # binutils -- PASS 1 # if [ ! -f bp1_binutils_pass1.done ] then PrintStep "Building binutils-2.17 -- PASS 1" tar xjvf binutils-2.17.tar.bz2 mkdir -v binutils-build pushd binutils-build CC="gcc -B/usr/bin/" ../binutils-2.17/configure \ --prefix=/tools --disable-nls --disable-werror make || exit 1 make install || exit 2 make -C ld clean || exit 3 make -C ld LIB_PATH=/tools/lib || exit 4 cp -v ld/ld-new /tools/bin || exit 5 popd touch bp1_binutils_pass1.done fi
# # gcc -- PASS 1 # if [ ! -f bp1_gcc_pass1.done ] then PrintStep "Building gcc-4.1.2 -- PASS 1" tar xjvf gcc-4.1.2.tar.bz2 mkdir -v gcc-build pushd gcc-build CC="gcc -B/usr/bin/" ../gcc-4.1.2/configure --prefix=/tools \ --with-local-prefix=/tools --disable-nls --enable-shared \ --enable-languages=c make bootstrap || exit 1 make install || exit 2 ln -vs gcc /tools/bin/cc || exit 3 popd touch bp1_gcc_pass1.done fi
# # Linux API headers # if [ ! -f bp1_linux_headers.done ] then PrintStep "Installing linux-2.6.22.4 API Headers" tar xjvf linux-2.6.22.4.tar.bz2 pushd linux-2.6.22.4 make mrproper || exit 1 make headers_check || exit 2 make INSTALL_HDR_PATH=dest headers_install || exit 3 cp -rv dest/include/* /tools/include || exit 4 popd touch bp1_linux_headers.done fi
# # glibc # if [ ! -f bp1_glibc.done ] then PrintStep "Building glibc-2.5.1" tar xjvf glibc-2.5.1.tar.bz2 mkdir -v glibc-build pushd glibc-build ../glibc-2.5.1/configure --prefix=/tools \ --disable-profile --enable-add-ons \ --enable-kernel=2.6.0 --with-binutils=/tools/bin \ --without-gd --with-headers=/tools/include \ --without-selinux make || exit 1 make check || exit 2 mkdir -v /tools/etc touch /tools/etc/ld.so.conf make install || exit 3 popd touch bp1_glibc.done fi . . .
As you can see I have not gotten very far. I had copied/pasted all of the commands from the LFS guide, so I am confident I did not miss any steps.
Please let me know if you have any thoughts on this issue, or if you require additional info.
Thank you.
P.S. When previewing my post, I noticed that the PHP wrapping around my script removes the "\" character following some of the lengthier statements (generally the configure commands). Please bear in mind that my script actually does contains them.
P.S.S. One final thing... the the libstdc++ does not exist in /tools/lib (or anywhere else under /tools).
|