From owner-freebsd-questions Wed May 12 15:58:43 1999 Delivered-To: freebsd-questions@freebsd.org Received: from finch-post-12.mail.demon.net (finch-post-12.mail.demon.net [194.217.242.41]) by hub.freebsd.org (Postfix) with ESMTP id B90BC15146 for ; Wed, 12 May 1999 15:58:32 -0700 (PDT) (envelope-from marko@uk.radan.com) Received: from [158.152.75.22] (helo=uk.radan.com) by finch-post-12.mail.demon.net with smtp (Exim 2.12 #1) id 10hhxK-0007HE-0C; Wed, 12 May 1999 22:58:26 +0000 Organisation: Radan Computational Ltd., Bath, UK. Phone: +44-1225-320320 Fax: +44-1225-320311 Received: from marder-1. (rasnt-1 [193.114.228.211]) by uk.radan.com (8.6.10/8.6.10) with ESMTP id XAA00337; Wed, 12 May 1999 23:57:57 +0100 Received: (from marko@localhost) by marder-1. (8.9.2/8.8.8) id XAA02646; Wed, 12 May 1999 23:57:31 +0100 (BST) (envelope-from marko) Date: Wed, 12 May 1999 23:57:30 +0100 From: Mark Ovens To: Doug White Cc: FreeBSD-questions Subject: Re: gcc differences between aout & ELF Message-ID: <19990512235730.B258@marder-1> References: <19990506213653.B255@marder-1> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.3i In-Reply-To: ; from Doug White on Wed, May 12, 1999 at 11:38:32AM -0700 Organization: Total lack of Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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<<(ostream &, smanip 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