This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

"make check" tests wrong library


The first time I run "make check" I had never done a "make install"
before, and all checks of libstdc++ FAILed, see my report at
http://www.cygnus.com/ml/egcs/1998-Jun/0715.html.

After *installing* egcs, "make check" suddenly succeeds for 100%.
This made me a bit suspicious, so I looked in .../testsuite/libstdc++.log
to find:

                === libstdc++ tests ===

Running target unix
Using /usr/local/bin/../share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/local/bin/../share/dejagnu/config/unix.exp as generic interface file for target.
Using ../../../../egcs-1.0.3a/libstdc++/testsuite/config/default.exp as tool-and-target-specific interface file.
Running ../../../../egcs-1.0.3a/libstdc++/testsuite/libstdc++.tests/test.exp ...
Executing on host: /usr/src/egcs/egcs-1.0.3a-objdir/gcc/xgcc -B/usr/src/egcs/egcs-1.0.3a-objdir/gcc/ ../../../../egcs-1.0.3a/libstdc++/testsuite/libstdc++.tests/../../tests/tcomplex.cc  -I.. -I../../../../egcs-1.0.3a/libstdc++/testsuite/.. -I../../../../egcs-1.0.3a/libstdc++/testsuite/../stl -I.   -g -L/usr/src/egcs/egcs-1.0.3a-objdir/libraries/libstdc++/testsuite/../../libstdc++ -lstdc++  -lm   -o /usr/src/egcs/egcs-1.0.3a-objdir/libraries/libstdc++/testsuite/tcomplex
PASS: tcomplex.cc compilation
[...etc...]

The executable `tcomplex' is still there - but also after recompiling it
with the command above - we see that:

/usr/src/egcs/egcs-1.0.3a-objdir/libraries/libstdc++/testsuite>ldd tcomplex
        libstdc++.so.2.8 => /usr/local/egcs/lib/libstdc++.so.2.8 (0x40003000)
        libm.so.6 => /lib/libm.so.6 (0x40042000)
        libc.so.6 => /lib/libc.so.6 (0x4005b000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000)

... it uses the *installed* libstdc++.so.2.8.
And NOT the libstdc++ that I just compiled:

>ls /usr/src/egcs/egcs-1.0.3a-objdir/libraries/libstdc++/lib*
/usr/src/egcs/egcs-1.0.3a-objdir/libraries/libstdc++/libstdc++.a
/usr/src/egcs/egcs-1.0.3a-objdir/libraries/libstdc++/libstdc++.so@
/usr/src/egcs/egcs-1.0.3a-objdir/libraries/libstdc++/libstdc++.so.2.8@
/usr/src/egcs/egcs-1.0.3a-objdir/libraries/libstdc++/libstdc++.so.2.8.0*

Although in this case the installed library and the test-case library
is the same, it doesn't matter.  But because I won't install every
snapshot - and because I see explicitly the
-L/usr/src/egcs/egcs-1.0.3a-objdir/libraries/libstdc++/testsuite/../../libstdc++in the compile statement, I do assume this is not what is intended.

---------------------

Note that this "make check", as well as the first run, was done with
dejagnu-971222 without patches.

After applying H.J. Lu's lookfor_dir_with_trigger patch to dejagnu-971222,
I re-did the "make check" and found the following:

                === libstdc++ Summary ===

# of expected passes            30

(Of course).  And:

/usr/src/egcs/egcs-1.0.3a-objdir/libraries/libstdc++/testsuite>ldd tcomplex
        libstdc++.so.2.8 => /usr/src/egcs/egcs-1.0.3a-objdir/libraries/libstdc++/libstdc++.so.2.8 (0x40000000)
        libm.so.6 => /lib/libm.so.6 (0x40046000)
        libc.so.6 => /lib/libc.so.6 (0x4005f000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000)

I hope this is a good reason to honour H.J. Lu request and use his patch.

Regards,

Carlo Wood


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]