Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Nov 1998 09:07:29 +1030
From:      Greg Lehey <grog@lemis.com>
To:        Andrew <andrew@violet.org>, questions@FreeBSD.ORG
Cc:        hackers@FreeBSD.ORG
Subject:   Re: crt1.o [ELF] is broken in 3.0-release?
Message-ID:  <19981130090729.A456@freebie.lemis.com>
In-Reply-To: <19981129135617.A9283@apogee.whack.org>; from Andrew on Sun, Nov 29, 1998 at 01:56:17PM -0800
References:  <19981129135617.A9283@apogee.whack.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday, 29 November 1998 at 13:56:17 -0800, Andrew wrote:
> Hello all,
>
> Running Freebsd 3.0-release, there appears to be a bug in
> /usr/lib/crt1.o which will not allow one to compile an ELF
> gcc-2.8.1 from origional source or even install the port:
>
> 1. the port: (this is a really bogus error, BROKEN_ELF; gcc-2.8.1 compiles
> 	ELF binaries on other platforms)

BROKEN_ELF is trying to tell you something.  In your language, it's
saying ``this is a really bogus error, and we know about it''.

> # make install
> ===>  gcc-2.8.1 is broken for ELF: /usr/lib/aout/crt0.o: file not recognized: File format not recognized.

And in case you didn't notice before, it's telling you again.

> 2. compile from origional source: (this is what I really want to do)
>
> # make LANGUAGES=c
> ...<snip>...
> ./xgcc -B./  -DIN_GCC   -g -I./include   enquire.o -o enquire
> /usr/libexec/elf/ld: cannot open crt0.o: No such file or directory
> *** Error code 1
>
> Stop.
> #
>
> 3. compile from origional source: (after either: a. symlink
> 	/usr/lib/crt0.o /usr/lib/crt1.o -or- b. editing
> 	<build-directory>/specs and replacing all occurences of crt0 -> crt1)
>
> # make LANGUAGES=c
> ...<snip>...
> ./xgcc -B./  -DIN_GCC   -g -I./include   enquire.o -o enquire
> /usr/libexec/elf/ld: warning: cannot find entry symbol start; defaulting to 080483d0
> /usr/lib/crt1.o: In function `_start':
> /usr/lib/crt1.o(.text+0x49): undefined reference to `main'
> enquire.o: In function `overflow':
> /usr/build/gcc/gcc-2.8.1/./enquire.c(.text+0xd): undefined reference to `_signal'
> enquire.o: In function `setmode':
> /usr/build/gcc/gcc-2.8.1/./enquire.c(.text+0x57): undefined reference to `_(short,  (void))'
> ...<snip>...
> /usr/build/gcc/gcc-2.8.1/enquire.c(.text+0xacb4): undefined reference to `_printf'
> enquire.o(.text+0xad05):/usr/build/gcc/gcc-2.8.1/enquire.c: more undefined references to `_printf' follow
> enquire.o: In function `__sputc':
> /usr/include/stdio.h(.text+0xd56d): undefined reference to `___swbuf'
> ./libgcc.a(__main.o): In function `__do_global_ctors':
> /usr/build/gcc/gcc-2.8.1/./libgcc2.c(.text+0x66): undefined reference to `_atexit'
> *** Error code 1

This is probably a problem with the libraries, or possibly with the
symbol naming, as I told you yesterday in a number of mail messages.

There are two ways to address this problem: fix it yourself or wait
for somebody else to fix it.  Telling people what they already know is
not productive.

Greg
--
See complete headers for address, home page and phone numbers
finger grog@lemis.com for PGP public key

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981130090729.A456>