From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jody Goldberg To: egcs@cygnus.com Subject: Re: problems with the recent snapshot (971207) (Solved) Date: Mon, 08 Dec 1997 20:22:00 -0000 Message-id: <19971208222126.19112@tymbri> References: <199712082343.RAA29705@server.cs.uiowa.edu> X-SW-Source: 1997-12/msg00509.html On Mon, Dec 08, 1997 at 05:05:56PM -0800, H.J. Lu wrote: > > /tmp/cca294841.o:/home/phenning/EGCS/Build/build/libraries/libstdc++/testsuite/../../../../egcs-971207/libstdc++/testsuite/../std/bastring.h:148: undefined reference to `ostream & operator<<, __default_alloc_template >(ostream &, basic_string, __default_alloc_template > const &)' > > [plus a lot of other similar errors] > > > > so, tstring.cc compilation and tstring.cc -O compilation fail unexpectedly. > > > > What else can I provide to help resolve this? > > Same here on i586-linux-gnu. But it was ok on i586-linux-glibc1. > Since egcs 971207 miscompiles things on x86, it is not that strange. > The patch I submitted for bastring is the source of these problems. If you look at the error messages carefully you'll notice undefined reference to `ostream & operator<<, __default_alloc_template ^^^^^ >(ostream &, basic_string, __default_alloc_template > const &)' ^^^^^ In the library you find basic_string, __default_alloc_template > ^^^^^ The issue is the -D_PTHREAD during the compilation of sinst.cc. This causes the thread safe allocator to be used by default under Linux glibc2. However, _PTHREAD is NOT defined when tstring.cc is compiled and it attempts to use the NON-thread safe allocator which was not instantiated in libstdc++. I mentioned this issue with the patch but did not have a solution. What version(s) should go into the library ? SGI uses _PTHREAD in the stl and egcs defines it for linux in libstdc++/config/linux.mt. How should it be defined for general programs ? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ jodyg@idt.net | By definition all answers are replies. Unfortunately, | not all replies are answers. -- JMS