Date: Thu, 6 May 1999 21:36:53 +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: <19990506213653.B255@marder-1> In-Reply-To: <Pine.BSF.4.03.9905061058240.25986-100000@resnet.uoregon.edu>; from Doug White on Thu, May 06, 1999 at 10:59:37AM -0700 References: <19990505235002.C2189@marder-1> <Pine.BSF.4.03.9905061058240.25986-100000@resnet.uoregon.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 06, 1999 at 10:59:37AM -0700, Doug White wrote: > On Wed, 5 May 1999, Mark Ovens wrote: > > > On Wed, May 05, 1999 at 02:15:41PM -0700, Doug White wrote: > > > > > > Why don't you rebuild the required libraries to ELF? > > > > Why should I have too? This system was installed from scratch, it's > > all ELF (I've file(1)'d all the libs I can find and they're all > > ELF, except the aout compat stuff). > > Because you can't link aout libs into an elf binary. > Thanks for all the help. However you're beginning to confuse me ;-) I realize that you can't link aout libs into an elf binary, but I have ELF *and* aout versions ('cos I installed the compat22 dist): marder-1:/{58}% file /usr/lib/libm.so.2 /usr/lib/libm.so.2: ELF 32-bit LSB shared object, Intel 80386, version 1 (FreeBSD), not stripped marder-1:/{59}% file /usr/lib/compat/aout/libm.so.2.0 /usr/lib/compat/aout/libm.so.2.0: FreeBSD/i386 compact demand paged shared library not stripped So why rebuild them as ELF when ELF versions already exist? The libs created by for my program *are* being rebuilt and are ELF: > > I think I may know what I've screwed up. Before I installed gcc-2.8.1 > > I tried egcs-1.1.1. That gave more errors, so I then installed > > gcc-2.8.1. I've since read some docs at Cygnus' website that mention > > that egcs includes a new libstdc++ (?) whereas gcc-2.8.1 doesn't. > > Also pkg_info -v egcs-1.1.1 mentioned something about moving some > > libs "to avoid conflict with the stock compiler". I've pkg_deleted > > both egcs and gcc and the re-installed gcc. I'm now re-compiling > > my job (it'll take about 1-1/4 hours to compile the ~6000 source > > files) so I'm keeping my fingers crossed that it'll work this time. > > Yeah, stdc++ will muck things up badly. They're still playing with it on > -CURRENT. > :-( Having looked more closely at the output I realize that it's the linker that is erroring, not the compiler (I mistakenly thought that the compiler and linker were a matched pair, i.e. gcc-2.8.1 came with it's own linker, - not so) 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' libutc.a is an archive built during the compile process. Does any of the above tell you anything? and, more importantly, can you suggest a fix? > 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?19990506213653.B255>