From owner-freebsd-current Mon Aug 7 22:15:28 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id WAA24323 for current-outgoing; Mon, 7 Aug 1995 22:15:28 -0700 Received: from silvia.HIP.Berkeley.EDU (silvia.HIP.Berkeley.EDU [136.152.64.181]) by freefall.cdrom.com (8.6.11/8.6.6) with ESMTP id WAA24312 for ; Mon, 7 Aug 1995 22:15:17 -0700 Received: (from asami@localhost) by silvia.HIP.Berkeley.EDU (8.6.11/8.6.9) id WAA05145; Mon, 7 Aug 1995 22:14:53 GMT Date: Mon, 7 Aug 1995 22:14:53 GMT Message-Id: <199508072214.WAA05145@silvia.HIP.Berkeley.EDU> To: current@freebsd.org Subject: "ld: /usr/lib/crt0.o: Undefined error: 0" problem solved From: asami@cs.berkeley.edu (Satoshi Asami) Sender: current-owner@freebsd.org Precedence: bulk The solution was NOT TO CLOSE STDIN when you run make world, as hard as it is to believe. I decided to try a make world on a 2.0.5R system (constructed on my second disk from the CDROM) with a -stable /usr/src. When I got the same error as -current, which doesn't share a bit of / or /usr with the -stable tree, I knew it was something incredibly outrageous. So I remembered that I started using the "<&-" trick last week, and changed the command line from (date; make world; date) > /usr/obj/make.00 2>&1 <&- & to (date; make world; date) > /usr/obj/make.00 2>&1 > cc -o hexrand hexrand.c >> cc -o hexrand hexrand.c <&- ld: /usr/lib/crt0.o: Undefined error: 0 ======= P.P.S. Relevant part from the make log: -------------------------------------------------------------- Rebuilding tools needed to build the libraries -------------------------------------------------------------- cd /y/b/src/gnu/usr.bin/ld && make depend all install cleandir obj : ===> rtld rm -f .depend files="/y/b/src/gnu/usr.bin/ld/rtld/../i386/mdprologue.S"; if [ "$files" != "" ]; then mkdep -a -I/y/b/src/gnu/usr.bin/ld/rtld/.. -I/y/b/src/gnu/usr.bin/ld/rtld -I/y/b/src/gnu/usr.bin/ld/rtld/../i386 -DRTLD $files; fi files="/y/b/src/gnu/usr.bin/ld/rtld/rtld.c /y/b/src/gnu/usr.bin/ld/rtld/malloc.c /y/b/src/gnu/usr.bin/ld/rtld/../shlib.c /y/b/src/gnu/usr.bin/ld/rtld/../etc.c /y/b/src/gnu/usr.bin/ld/rtld/../i386/md.c"; if [ "$files" != "" ]; then mkdep -a -I/y/b/src/gnu/usr.bin/ld/rtld/.. -I/y/b/src/gnu/usr.bin/ld/rtld -I/y/b/src/gnu/usr.bin/ld/rtld/../i386 -DRTLD $files; fi files=" "; if [ "$files" != " " ]; then mkdep -a -I/y/b/src/gnu/usr.bin/ld/rtld/.. -I/y/b/src/gnu/usr.bin/ld/rtld -I/y/b/src/gnu/usr.bin/ld/rtld/../i386 -DRTLD $files; fi cc -O2 -m486 -pipe -I/y/b/src/gnu/usr.bin/ld -I/y/b/src/gnu/usr.bin/ld/i386 -c /y/b/src/gnu/usr.bin/ld/ld.c cc -O2 -m486 -pipe -I/y/b/src/gnu/usr.bin/ld -I/y/b/src/gnu/usr.bin/ld/i386 -c /y/b/src/gnu/usr.bin/ld/symbol.c cc -O2 -m486 -pipe -I/y/b/src/gnu/usr.bin/ld -I/y/b/src/gnu/usr.bin/ld/i386 -c /y/b/src/gnu/usr.bin/ld/lib.c cc -O2 -m486 -pipe -I/y/b/src/gnu/usr.bin/ld -I/y/b/src/gnu/usr.bin/ld/i386 -c /y/b/src/gnu/usr.bin/ld/shlib.c cc -O2 -m486 -pipe -I/y/b/src/gnu/usr.bin/ld -I/y/b/src/gnu/usr.bin/ld/i386 -c /y/b/src/gnu/usr.bin/ld/warnings.c cc -O2 -m486 -pipe -I/y/b/src/gnu/usr.bin/ld -I/y/b/src/gnu/usr.bin/ld/i386 -c /y/b/src/gnu/usr.bin/ld/etc.c cc -O2 -m486 -pipe -I/y/b/src/gnu/usr.bin/ld -I/y/b/src/gnu/usr.bin/ld/i386 -c /y/b/src/gnu/usr.bin/ld/rrs.c cc -O2 -m486 -pipe -I/y/b/src/gnu/usr.bin/ld -I/y/b/src/gnu/usr.bin/ld/i386 -c /y/b/src/gnu/usr.bin/ld/xbits.c cc -O2 -m486 -pipe -I/y/b/src/gnu/usr.bin/ld -I/y/b/src/gnu/usr.bin/ld/i386 -c /y/b/src/gnu/usr.bin/ld/i386/md.c cc -O2 -m486 -pipe -I/y/b/src/gnu/usr.bin/ld -I/y/b/src/gnu/usr.bin/ld/i386 -Xlinker -Bstatic -o ld ld.o symbol.o lib.o shlib.o warnings.o etc.o rrs.o xbits.o md.o -lgnumalloc ld: /usr/lib/crt0.o: Undefined error: 0 *** Error code 1 Stop. *** Error code 1 Stop.