This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Undefined references to `std::locale::id::_S_highwater'
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Undefined references to `std::locale::id::_S_highwater'
- From: Michael Elizabeth Chastain <chastain at cygnus dot com>
- Date: Sat, 24 Mar 2001 23:08:24 -0800
I'm seeing these too. Here are some details.
Every weekend, I check out the head of the branch gcc-3_0-branch and the
head of the gdb tree and run the gdb test suite. Here's my history:
2001-03-24 broken
2001-03-17 ok
2001-03-10 ok
2001-03-04 ok
2001-02-24 ok
2001-02-17 ok
2001-02-11 ok
2001-02-02 ok
2001-01-27 ok
Platforms:
native i686-pc-linux-gnu (red hat linux 6.2)
native i686-pc-linux-gnu (red hat linux 6)
native solaris 2.5.1
g++ -v says:
bash-2.04$ g++ -v x2.cc
Reading specs from /vittone/fsf/2001-03-24/gehman/native/install/lib/gcc-lib/i686-pc-linux-gnu/3.0/specs
Configured with: /vittone/fsf/2001-03-24/source/configure --prefix=/vittone/fsf/2001-03-24/gehman/native/install --disable-shared : (reconfigured)
gcc version 3.0 20010324 (prerelease)
/vittone/fsf/2001-03-24/gehman/native/install/lib/gcc-lib/i686-pc-linux-gnu/3.0/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ x2.cc -D__GNUG__=3 -D_GNU_SOURCE -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -quiet -dumpbase x2.cc -version -o /tmp/cce8ZwLC.s
GNU CPP version 3.0 20010324 (prerelease) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.0 20010324 (prerelease) (i686-pc-linux-gnu)
compiled by GNU C version 2.96 20000731 (Red Hat Linux 7.0).
#include "..." search starts here:
#include <...> search starts here:
/vittone/fsf/2001-03-24/gehman/native/install/include/g++-v3
/vittone/fsf/2001-03-24/gehman/native/install/include/g++-v3/i686-pc-linux-gnu
/vittone/fsf/2001-03-24/gehman/native/install/include
/vittone/fsf/2001-03-24/gehman/native/install/lib/gcc-lib/i686-pc-linux-gnu/3.0/include
/vittone/fsf/2001-03-24/gehman/native/install/i686-pc-linux-gnu/include
/usr/include
End of search list.
/vittone/fsf/2001-03-24/gehman/native/install/lib/gcc-lib/i686-pc-linux-gnu/3.0/../../../../i686-pc-linux-gnu/bin/as -V -Qy -o /tmp/ccTGScIE.o /tmp/cce8ZwLC.s
GNU assembler version 2.11.90 (i686-pc-linux-gnu) using BFD version 2.11.90
/vittone/fsf/2001-03-24/gehman/native/install/lib/gcc-lib/i686-pc-linux-gnu/3.0/collect2 -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o /vittone/fsf/2001-03-24/gehman/native/install/lib/gcc-lib/i686-pc-linux-gnu/3.0/crtbegin.o -L/vittone/fsf/2001-03-24/gehman/native/install/lib/gcc-lib/i686-pc-linux-gnu/3.0 -L/vittone/fsf/2001-03-24/gehman/native/install/lib/gcc-lib/i686-pc-linux-gnu/3.0/../../../../i686-pc-linux-gnu/lib -L/vittone/fsf/2001-03-24/gehman/native/install/lib/gcc-lib/i686-pc-linux-gnu/3.0/../../.. /tmp/ccTGScIE.o -lstdc++ -lm -lgcc -lc -lgcc /vittone/fsf/2001-03-24/gehman/native/install/lib/gcc-lib/i686-pc-linux-gnu/3.0/crtend.o /usr/lib/crtn.o
/vittone/fsf/2001-03-24/gehman/native/install/lib/gcc-lib/i686-pc-linux-gnu/3.0/../../../libstdc++.a(localename.o): In function `std::locale::facet::~facet()':
/vittone/fsf/2001-03-24/source/libstdc++-v3/include/bits/localefwd.h:417: undefined reference to `std::locale::id::_S_highwater'
/vittone/fsf/2001-03-24/source/libstdc++-v3/include/bits/localefwd.h:417: undefined reference to `std::locale::id::_S_highwater'
collect2: ld returned 1 exit status
Test program x2.cc.
#include <iostream.h>
class A1 {
public:
A1 ();
friend ostream& operator<<(ostream& outs, A1 one);
private:
int x;
};
A1::A1 ()
: x (0)
{
;
}
ostream& operator<<(ostream& outs, A1 one)
{
return outs << one.x << endl;
}
int main (void)
{
return 0;
}
The program 'x2.cc' is a stripped-down version of the test program
gdb/testsuite/gdb.c++/userdef.cc.
The libary source file libstdc++-v3/src/locale.cc defines
std::locale::id:_S_highwater, but recent compilers fail to omit a
definition. locale.cc is not changing -- it appears to be a compiler bug.
I'll go binary search the compiler dates and see if I can pinpoint
the breakage.
Michael Elizabeth Chastain
<chastain@redhat.com>
"love without fear"