DejaGNU testsuite does not build in toolchain

Bernd Pol bernd.pol at
Thu Jan 18 01:50:57 PST 2007

Dan Nicholson schrieb am 18.01.2007 04:31:
> On 1/17/07, Bernd Pol <bernd.pol at> wrote:
>> Dan Nicholson schrieb am 17.01.2007 23:47:
>>> On 1/17/07, Bernd Pol <bernd.pol at> wrote:
>>>> Hi all,
>>>> while building the tool chain according to SVN-20070109, ch. 5.10,
>>>> DejaGNU refused to build its test suite (make check):
>>>> ------------------------------------
>>>> make[4]: Entering directory `/mnt/lfs/sources/dejagnu-1.4.4/testsuite/libdejagnu'
>>>> if g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"dejagnu\" -DVERSION=\"1.4.4\"  -I. -I.    -I../.. -g -g -O2 -MT unit.o -MD -MP -MF ".deps/unit.Tpo" \
>>>>   -c -o unit.o `test -f '' || echo './'`; \
>>>> then mv -f ".deps/unit.Tpo" ".deps/unit.Po"; \
>>>> else rm -f ".deps/unit.Tpo"; exit 1; \
>>>> fi
>>>> g++ -I../.. -g -g -O2   -o unit  unit.o
>>>> /lib/ undefined reference to `_dl_out_of_memory at GLIBC_PRIVATE'
>>>> collect2: ld returned 1 exit status
>>>> make[4]: *** [unit] Error 1
>>>> make[4]: Leaving directory `/mnt/lfs/sources/dejagnu-1.4.4/testsuite/libdejagnu'
>>>> ------------------------------------
>>> $ /tools/bin/ld --verbose | grep SEARCH_DIR
>>> I get
>>> SEARCH_DIR("/tools/i686-pc-linux-gnu/lib"); SEARCH_DIR("/tools/lib");
>> I get exactly the same reading. There is something weird going on.
>> I tried rebuilding the toolchain again from scratch, just in case.
>> No change.
> Wait, now I think I know. See how above it's calling g++? In
> gcc-pass1, we only install the C compiler, not the C++ compiler. So,
> it's actually using your host's C++ compiler, g++. I'm not sure which
> collect2 it's calling (probably your host's, and in turn it's ld), but
> it's trying to link to your host's C libraries and this doesn't work
> for you. Just to see what's happening, do this
> $ g++ -Wl,--verbose 2>&1 | grep SEARCH_DIR

I thought so, too. Yet this also gives:
SEARCH_DIR("/tools/i686-pc-linux-gnu/lib"); SEARCH_DIR("/tools/lib");

Now, that's somewhat surprising. Cross checking in my standard user yields:

SEARCH_DIR("/usr/i686-pc-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib");
SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");

Obviously there has some kind of stub g++ been built in pass 1. Would be
interesting to check this one.

> You can definitely skip the dejagnu testsuite. Most people never
> run it. In fact, we should probably remove that from the book since it
> depends on the host's toolchain, and we don't want that.

I second this. In fact, the DejaGNU build test is not really worth its
value, except for its developers. We are interested in "runtest" only
and this appears to work properly.

> What kind of host are you using (distro)?

This is basically a grown up LFS 6.1, based on a Mobile Athlon and Linux
  2.6.15.  I used to build SVN regularly, just out of curiosity, but
never tested DejaGNU. Hence my surprises.

Currently I am trying to switch to 6.2 in earnest, considering it stable
enough. This is why I decided to run this test as well.


More information about the lfs-dev mailing list