public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* lookfor_dir_with_trigger strikes again...
@ 1998-06-25  0:25 Carlo Wood
  0 siblings, 0 replies; only message in thread
From: Carlo Wood @ 1998-06-25  0:25 UTC (permalink / raw)
  To: egcs

This is just a report on what I have been doing today :).

Summary of the below:

lookfor_dir_with_trigger.patch *is* needed to link with
the correct libstdc++.  egcs-1.0.3a contained a bug that
made it link with an installed libstdc++ without
lookfor_dir_with_trigger.patch, the current snapshot
fortunately just fails.

I will continue to investigate wether or not
lookfor_dir_with_trigger.patch is the Best(tm) solution,
or that egcs itself should be fixed.

Carlo Wood

carlo@runaway.xs4all.nl

-------

Attachment (you can skip this if you're not interested)
==========

Ok, I got it reproducing now:

Running ../../../../egcs-cvs/libio/testsuite/libio.tests/hounddog.exp ...
Executing on host: /usr/src/egcs/egcs-cvs-objdir/gcc/xgcc -B/usr/src/egcs/egcs-cvs-objdir/gcc/ ../../../../egcs-cvs/libio/testsuite/../tests/hounddog.cc  -O3 -I.. -I../../../../egcs-cvs/libio/testsuite/..  -nostdinc++ -I/usr/src/egcs/egcs-cvs/libstdc++ -I/usr/src/egcs/egcs-cvs/libstdc++/stl  -L/usr/src/egcs/egcs-cvs-objdir/libraries/libiberty -g -lstdc++ -liberty  -lm   -o /usr/src/egcs/egcs-cvs-objdir/libraries/libio/testsuite/hounddog
compiler exited with status 1
output is:
/usr/bin/ld: cannot open -lstdc++: No such file or directory
collect2: ld returned 1 exit status

FAIL: hounddog.cc compilation

-------
At this point I can reproduce this over and over.  I now install
lookfor_dir_with_trigger.patch.  Getting:

Running ../../../../egcs-cvs/libio/testsuite/libio.tests/hounddog.exp ...
Executing on host: /usr/src/egcs/egcs-cvs-objdir/gcc/xgcc -B/usr/src/egcs/egcs-cvs-objdir/gcc/ ../../../../egcs-cvs/libio/testsuite/../tests/hounddog.cc  -O3 -I.. -I../../../../egcs-cvs/libio/testsuite/..  -nostdinc++ -I/usr/src/egcs/egcs-cvs/libstdc++ -I/usr/src/egcs/egcs-cvs/libstdc++/stl -L/usr/src/egcs/egcs-cvs-objdir/libraries//libstdc++ -L/usr/src/egcs/egcs-cvs-objdir/libraries//libiberty  -L/usr/src/egcs/egcs-cvs-objdir/libraries//libiberty -g -lstdc++ -liberty  -lm   -o /usr/src/egcs/egcs-cvs-objdir/libraries/libio/testsuite/hounddog
PASS: hounddog.cc compilation

The difference with and without lookfor_dir_with_trigger.patch is thus:

without we have a:

-L/usr/src/egcs/egcs-cvs-objdir/libraries/libiberty

with we get:

-L/usr/src/egcs/egcs-cvs-objdir/libraries//libstdc++
-L/usr/src/egcs/egcs-cvs-objdir/libraries//libiberty
-L/usr/src/egcs/egcs-cvs-objdir/libraries//libiberty

The double '//' is ugly, and the including `libiberty'
twice is weird too, but at least it adds the needed
`libstdc++' directory.

* conclusion: lookfor_dir_with_trigger.patch *is* needed
  for with the current snapshot in order to make it find
  the (correct) libstdc++.

-------
The same test with egcs-1.0.3a gives:

with lookfor_dir_with_trigger.patch:

Running ../../../../egcs-1.0.3a/libio/testsuite/libio.tests/hounddog.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/libio/testsuite/../tests/hounddog.cc  -O3 -I.. -I../../../../egcs-1.0.3a/libio/testsuite/..  -nostdinc++ -I/usr/src/egcs/egcs-1.0.3a/libstdc++ -I/usr/src/egcs/egcs-1.0.3a/libstdc++/stl -L/usr/src/egcs/egcs-1.0.3a-objdir/libraries//libstdc++ -L/usr/src/egcs/egcs-1.0.3a-objdir/libraries//libiberty  -L/usr/src/egcs/egcs-1.0.3a-objdir/libraries//libiberty -g -lstdc++ -liberty  -lm   -o /usr/src/egcs/egcs-1.0.3a-objdir/libraries/libio/testsuite/hounddog
PASS: hounddog.cc compilation

without lookfor_dir_with_trigger.patch:

Running ../../../../egcs-1.0.3a/libio/testsuite/libio.tests/hounddog.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/libio/testsuite/../tests/hounddog.cc  -O3 -I.. -I../../../../egcs-1.0.3a/libio/testsuite/..  -nostdinc++ -I/usr/src/egcs/egcs-1.0.3a/libstdc++ -I/usr/src/egcs/egcs-1.0.3a/libstdc++/stl  -L/usr/src/egcs/egcs-1.0.3a-objdir/libraries/libiberty -g -lstdc++ -liberty  -lm   -o /usr/src/egcs/egcs-1.0.3a-objdir/libraries/libio/testsuite/hounddog
PASS: hounddog.cc compilation

The parameters are 100% equivalent with the above,
but now it does NOT fail...

The reason this egcs-1.0.3a does not fail is a bug in egcs-1.0.3a
which apperantly has been fixed in the latest snapshot:
egcs-1.0.3a passes "-L/usr/local/egcs/i686-pc-linux-gnu/lib -L/usr/local/egcs/lib"
to the call of /usr/src/egcs/egcs-1.0.3a-objdir/gcc/ld, while
egcs-cvs does not (and calls /usr/src/egcs/egcs-cvs-objdir/gcc/collect2):

without lookfor_dir_with_trigger.patch, egcs-1.0.3a, using -v -save-temps:

...
 /usr/src/egcs/egcs-1.0.3a-objdir/gcc/ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o /usr/src/egcs/egcs-1.0.3a-objdir/libraries/libio/testsuite/hounddog /usr/lib/crt1.o /usr/lib/crti.o /usr/src/egcs/egcs-1.0.3a-objdir/gcc/crtbegin.o -L/usr/src/egcs/egcs-1.0.3a-objdir/libraries/libiberty -L/usr/src/egcs/egcs-1.0.3a-objdir/gcc -L/usr/local/egcs/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.90.29 -L/usr/local/egcs/i686-pc-linux-gnu/lib -L/usr/local/egcs/lib hounddog.o -lstdc++ -liberty -lm -lgcc -lc -lgcc /usr/src/egcs/egcs-1.0.3a-objdir/gcc/crtend.o /usr/lib/crtn.o

without lookfor_dir_with_trigger.patch, egcs-cvs, using -v -save-temps:

...
 /usr/src/egcs/egcs-cvs-objdir/gcc/collect2 -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o /usr/src/egcs/egcs-cvs-objdir/libraries/libio/testsuite/hounddog /usr/lib/crt1.o /usr/lib/crti.o /usr/src/egcs/egcs-cvs-objdir/gcc/crtbegin.o -L/usr/src/egcs/egcs-cvs-objdir/libraries/libiberty -L/usr/src/egcs/egcs-cvs-objdir/gcc hounddog.o -lstdc++ -liberty -lm -lgcc -lc -lgcc /usr/src/egcs/egcs-cvs-objdir/gcc/crtend.o /usr/lib/crtn.o
/usr/bin/ld: cannot open -lstdc++: No such file or directory

* conclusion: The reason that egcs-1.0.3a seemed not to fail
  without lookfor_dir_with_trigger.patch is that it actually
  contained a bug, which has been fixed in the current
  snapshot.

-------

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-06-25  0:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-06-25  0:25 lookfor_dir_with_trigger strikes again Carlo Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).