Date: Wed, 12 May 1999 23:57:30 +0100 From: Mark Ovens <marko@uk.radan.com> To: Doug White <dwhite@resnet.uoregon.edu> Cc: FreeBSD-questions <questions@FreeBSD.ORG> Subject: Re: gcc differences between aout & ELF Message-ID: <19990512235730.B258@marder-1> In-Reply-To: <Pine.BSF.4.03.9905121137220.23756-100000@resnet.uoregon.edu>; from Doug White on Wed, May 12, 1999 at 11:38:32AM -0700 References: <19990506213653.B255@marder-1> <Pine.BSF.4.03.9905121137220.23756-100000@resnet.uoregon.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 12, 1999 at 11:38:32AM -0700, Doug White wrote: > What FreeBSD version are you on? > 3.1-R, from the CDs > On Thu, 6 May 1999, Mark Ovens wrote: > > > The problem is that symbols defined in libstdc++ are being redefined > > in libgcc. This is the sort of output I'm getting (the linker is > > run from a script, not a Makefile): > > > > linking PCOMPILE for OPL/autopcc > > /usr/local/lib/gcc-lib/i386-unknown-freebsd3.0/2.8.1/libgcc.a(exception.o): In function `bad_cast type_info function': > > > > /tmp/usr/ports/lang/gcc28/work/gcc-2.8.1/./cp/exception.cc(.text+0x0): multiple definition of `terminate(void)' > > > > /usr/lib/libstdc++.a(exceptioni.o)(.text+0x128): first defined here > > > > /usr/libexec/elf/ld: Warning: size of symbol `terminate__Fv' changed from 65 to 12 in exception.o > > > > and: > > > > /usr/marko/libopt/libutc.a(utc_string.o): In function `UTC_String::operator<<(short const &)': > > utc_string.o(.text+0x13d5): undefined reference to `ios virtual table' > > utc_string.o(.text+0x1427): undefined reference to `ostream::ios virtual table' > > utc_string.o(.text+0x1431): undefined reference to `ostrstream::ios virtual table' > > This was a bug introduced into -current for a short while, then reverted > when it broke all C++ libraries. > I've fixed the first set of errors (functions in libstdc++ being redefined in libgcc). In another thread (about egcs) there was a fix for this by renaming libstdc++ and making a symlink to libgcc. Another fix I found was to remove exceptioni.o from libstdc++ using ``ar -d libstdc++.a exceptioni.o''. The second set of errors (undefined references to ios virtual table) were fixed by compiling with ``-fno-inline''. However, this flag introduced a new error: undefined reference to `ostream & operator<<<int>(ostream &, smanip<int> const &) which occurs now in 3 files (once each). It seems to be caused by the use of ``setprecision(n)''. This is the function: FOO_BAR& FOO_BAR::operator<<( const double &d ) { char buf[200]; ostrstream stream(buf, 200); stream << setprecision(15) << d << '\0'; *this += buf; return *this; } Any ideas? > > Does any of the above tell you anything? and, more importantly, > > can you suggest a fix? > > 'make clean'? > What exactly does that do? Well, thanks again for all your help. I'm nearly there now :-) > Doug White > Internet: dwhite@resnet.uoregon.edu | FreeBSD: The Power to Serve > http://gladstone.uoregon.edu/~dwhite | www.freebsd.org > > -- FreeBSD - The Power To Serve http://www.freebsd.org My Webpage http://www.users.globalnet.co.uk/~markov _______________________________________________________________ Mark Ovens, CNC Apps Engineer, Radan Computational Ltd. Bath UK CAD/CAM solutions for Sheetmetal Working Industry mailto:marko@uk.radan.com http://www.radan.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990512235730.B258>