Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Nov 1998 15:51:59 +1030
From:      Greg Lehey <grog@lemis.com>
To:        Andrew <andrew@violet.org>
Cc:        questions@FreeBSD.ORG
Subject:   Re: /usr/lib/crt0.o & freebsd 3.0-release
Message-ID:  <19981129155159.I6182@freebie.lemis.com>
In-Reply-To: <19981128204312.B4353@apogee.whack.org>; from Andrew on Sat, Nov 28, 1998 at 08:43:12PM -0800
References:  <19981128174357.A3586@apogee.whack.org> <19981129123738.V6182@freebie.lemis.com> <19981128193733.A4176@apogee.whack.org> <19981129141749.D6182@freebie.lemis.com> <19981128200127.A4245@apogee.whack.org> <19981129143645.E6182@freebie.lemis.com> <19981128201153.A4353@apogee.whack.org> <19981129144400.G6182@freebie.lemis.com> <19981128204312.B4353@apogee.whack.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday, 28 November 1998 at 20:43:12 -0800, Andrew wrote:
> Greg,
>
> I have found your `solution' rather dissatisfying...
>
> 1. after a failed make LANGUAGES=c in the build directory...
> 	I replaced all occurrences of crt0 with crt1 in
> 	the file you are referring to ./specs
> 	- the file does not exist before the first make -
> 2. the retried make LANGUAGES=c generates the following output
> 	it is the same if I symlink /usr/lib/crt0.o -> /usr/lib/crt1.0

Well, that won't make any difference if you really call it crt1.0.
But I told you this is the wrong approach.  That way more headaches
lie.

> <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'

What's dissatisfying about that?  You're now finding your crt1.o, and
you're on to the next bug.  It looks as if your specs aren't finding
the correct libraries.

You're just seeing the hard way that porting software isn't always
easy.  That's why the FreeBSD project created the Ports Collection.
You basically have two choices:

1.  Install the port for gcc 2.8.1:

    cd /usr
    tar xvzf /cdrom/ports/ports.tgz ports/lang/gcc28
    cd ports/lang/gcc28
    make install

    It goes without a hitch, at least on my machine.

2.  Carry on the way you're going.  You may find my book ``Porting
    UNIX Software'' helpful
    (http://www.ora.com/catalog/port/noframes.html).  When you're
    done, you can compare your patches with the patches from the port
    in (1) above.

It's your choice.  You'll definitely learn more by taking the second
alternative.

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-questions" in the body of the message



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