This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++ problems /w egcs-2.91.52 on sparc-linux?
- To: Kevin Milans <kmilans at CapAccess dot org>
- Subject: Re: libstdc++ problems /w egcs-2.91.52 on sparc-linux?
- From: Andreas Schwab <schwab at issan dot informatik dot uni-dortmund dot de>
- Date: 29 Jul 1998 11:30:21 +0200
- Cc: egcs at cygnus dot com
- References: <Pine.SUN.3.91-FP.980728122926.6071A-100000@cap1.capaccess.org>
Kevin Milans <kmilans@CapAccess.org> writes:
|> Hello,
|>
|> After a clean build of egcs-2.91.52 from CVS on sparclinux, any
|> linking with libstdc++ complains about an undefined reference to
|> `filebuf virtual table'. I'm using GNU binutils v. 2.9.1 (with BFD
|> 2.9.1.0.4). For example, the file test.cc
|>
|> #include <iostream.h>
|>
|> int main (void)
|> {
|> cout << "Testing" << endl;
|> }
|>
|> will not link correctly. The output of g++ -o test test.cc is:
|>
|> /usr/lib/libstdc++.a(stdstrbufs.o)(.data+0x64): undefined reference to
|> `filebuf virtual table'
|> /usr/lib/libstdc++.a(stdstrbufs.o)(.data+0xcc): undefined reference to
|> `filebuf virtual table'
|> /usr/lib/libstdc++.a(stdstrbufs.o)(.data+0x134): undefined reference to
|> `filebuf virtual table'
|> collect2: ld returned 1 exit status
|>
|> The same thing has happened with the egcs release 1.0.3a. I'm a bit
|> confused because this happens for me for all versions of egcs on
|> sparclinux, yet it seems a big enough problem that it should be
|> either working or at least documented somewhere.
You are mixing object files that are compiled with -fvtable-thunks with
ones that are compiled without it.
|> Looking at this library with nm produces:
|>
|> # nm /usr/lib/libstdc++.a | grep filebuf | grep vt
|> U __vt_7filebuf
|> U _vt.7filebuf
|> 00000000 R __vt_7filebuf
|> #
Please try
nm /usr/lib/libstdc++.a | grep -e : -e 'vt.*filebuf'
so that the names of the offending object files are displayed.
--
Andreas Schwab "And now for something
schwab@issan.informatik.uni-dortmund.de completely different"
schwab@gnu.org