Glibc cannot find -lstdc++

satish patel satish at
Tue Aug 26 17:10:05 PDT 2008

Chapter 5

When I am doing gcc pass 2 check I got error when I make -k check

for i in `${compiler} --print-multi-lib 2>/dev/null`; do \
    dir=`echo $i | sed -e 's/;.*$//'`; \
    if [ "${dir}" = "." ]; then \
      true; \
    else \
      if [ -d ../${dir}/${lib} ]; then \
        flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
        if (cd ../${dir}/${lib}; make  \
                        CFLAGS="-O2 -g -O2  ${flags}" \
                        FCFLAGS=" ${flags}" \
                        FFLAGS=" ${flags}" \
                        ADAFLAGS=" ${flags}" \
                        prefix="/tools" \
                        exec_prefix="/tools" \
                        GCJFLAGS=" ${flags}" \
                        CXXFLAGS="-g -O2  -D_GNU_SOURCE ${flags}" \
                        LIBCFLAGS="-O2 -g -O2  ${flags}" \
                        LIBCXXFLAGS="-g -O2  -D_GNU_SOURCE
-fno-implicit-templates ${flags}" \
                        LDFLAGS=" ${flags}" \
                        MULTIFLAGS="${flags}" \
                        DESTDIR="" \
                        INSTALL="/usr/bin/install -c" \
                        INSTALL_DATA="/usr/bin/install -c -m 644" \
                        INSTALL_PROGRAM="/usr/bin/install -c" \
                        INSTALL_SCRIPT="/usr/bin/install -c" \
                        all); then \
          true; \
        else \
          exit 1; \
        fi; \
      else true; \
      fi; \
    fi; \
  done; \
make[3]: Leaving directory
make[2]: Leaving directory
make[2]: Entering directory
make[3]: Entering directory
make[3]: Nothing to be done for `check'.
make[3]: Leaving directory
make[2]: Leaving directory
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
make: *** [do-check] Error 2
make: Target `check' not remade because of errors.

What I do on this stage ignore it or solve it

-----Original Message-----
From: lfs-support-bounces at
[mailto:lfs-support-bounces at] On Behalf Of Ken Moffat
Sent: Tuesday, August 26, 2008 6:33 PM
To: LFS Support List
Subject: Re: Glibc cannot find -lstdc++

On Tue, Aug 26, 2008 at 05:54:44PM -0400, satish patel wrote:
> Again I got new error 
 For the moment, I shall ignore the fact you are continuing to
top-post, and not trimming what you reply to.  Your choice of mail
client is not a valid excuse! ;-)

 First, the test suites in chapter 5 are of marginal use - if you
_regularly_ build development versions of LFS you will be able to
form an opinion about what changed in the results, and if it is
important.  Most people will do better to NOT run the tests in
chapter 5.

> gcc -B/tools/bin/ -nostdlib -nostartfiles -o
> /mnt/lfs/sources/glibc-build/nptl/tst-cancel1
> -Wl,-dynamic-linker=/tools/lib/   -Wl,-z,combreloc
> /mnt/lfs/sources/glibc-build/csu/crt1.o
> /mnt/lfs/sources/glibc-build/csu/crti.o `gcc -B/tools/bin/
> --print-file-name=crtbegin.o`
> /mnt/lfs/sources/glibc-build/nptl/tst-cancel1.o
> /mnt/lfs/sources/glibc-build/nptl/
> /mnt/lfs/sources/glibc-build/nptl/libpthread_nonshared.a
> build/crypt:/mnt/lfs/sources/glibc-build/nptl
> /mnt/lfs/sources/glibc-build/
> /mnt/lfs/sources/glibc-build/libc_nonshared.a -lgcc -Wl,--as-needed
> -Wl,--no-as-needed `gcc -B/tools/bin/ --print-file-name=crtend.o`
 > /mnt/lfs/sources/glibc-build/csu/crtn.o
> GCONV_PATH=/mnt/lfs/sources/glibc-build/iconvdata LC_ALL=C
> /mnt/lfs/sources/glibc-build/elf/ --library-path
> /lfs/sources/glibc-build/nptl
> > /mnt/lfs/sources/glibc-build/nptl/tst-cancel1.out
> Didn't expect signal from child: got `Aborted'
> make[2]: *** [/mnt/lfs/sources/glibc-build/nptl/tst-cancel1.out] Error 1
> make[2]: Leaving directory `/mnt/lfs/sources/glibc-2.5.1/nptl'
> make[1]: *** [nptl/tests] Error 2
> make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.5.1'
> make: *** [check] Error 2

 Secondly, some failures in the glibc tests are common, especially
in nptl/.  This single failure is probably a very good result, but
I've stopped running the tests in chapter 5 so I don't know for

 Thirdly, the important thing is to understand what you are doing.
If it all overloads you (like the mass of errors you reported
recently), take a break from it and afterwards check what you are
doing to make sure it does follow the book.  When you have problems
and ask on the list, _wait_ for replies before trying alternative
fixes.  If you don't get replies in 24 hours (longer at weekends),
that is a different matter.

 Good luck with the rest of your build.

das eine Mal als Tragödie, das andere Mal als Farce
Unsubscribe: See the above information page

More information about the lfs-support mailing list