From owner-freebsd-questions Sat Nov 28 21:22:56 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA24282 for freebsd-questions-outgoing; Sat, 28 Nov 1998 21:22:56 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA24277 for ; Sat, 28 Nov 1998 21:22:52 -0800 (PST) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id PAA04955; Sun, 29 Nov 1998 15:52:40 +1030 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.1/8.9.0) id PAA19711; Sun, 29 Nov 1998 15:52:00 +1030 (CST) Message-ID: <19981129155159.I6182@freebie.lemis.com> Date: Sun, 29 Nov 1998 15:51:59 +1030 From: Greg Lehey To: Andrew Cc: questions@FreeBSD.ORG Subject: Re: /usr/lib/crt0.o & freebsd 3.0-release 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: <19981128204312.B4353@apogee.whack.org>; from Andrew on Sat, Nov 28, 1998 at 08:43:12PM -0800 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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. > > > ./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