make installworld fails; can't find crt1.o

I am following '24.7 Rebuilding “world”' from the FreeBSD handbook step-by-step. The only thing that I'm doing differently is that I am not booting into single user mode (for some reason, my keyboard does not work in single user mode, don't know why, figure it's a problem for another day)

Every time I try to make installworld, I get the following error:
Code:
--------------------------------------------------------------
>>> Installing everything
--------------------------------------------------------------
cd /usr/src; make -f Makefile.inc1 install
===> share/info (install)
===> lib (install)
===> lib/csu/amd64 (install)
install -o root -g wheel -m 444  crt1.o crti.o crtn.o Scrt1.o gcrt1.o /usr/lib
install: crt1.o: No such file or directory
*** Error code 71

Stop in /usr/src/lib/csu/amd64.
*** Error code 1

Stop in /usr/src/lib.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.

locate crt1.o gives me this:
Code:
/usr/lib/Scrt1.o
/usr/lib/crt1.o
/usr/lib/gcrt1.o
/usr/lib32/Scrt1.o
/usr/lib32/crt1.o
/usr/lib32/gcrt1.o
/usr/obj/lib32/usr/src/lib/csu/i386-elf/Scrt1.o
/usr/obj/lib32/usr/src/lib/csu/i386-elf/crt1.o
/usr/obj/lib32/usr/src/lib/csu/i386-elf/gcrt1.o
/usr/obj/usr/src/lib/csu/amd64/Scrt1.o
/usr/obj/usr/src/lib/csu/amd64/crt1.o
/usr/obj/usr/src/lib/csu/amd64/gcrt1.o
/usr/obj/usr/src/lib32/usr/lib32/Scrt1.o
/usr/obj/usr/src/lib32/usr/lib32/crt1.o
/usr/obj/usr/src/lib32/usr/lib32/gcrt1.o
/usr/obj/usr/src/tmp/usr/lib/Scrt1.o
/usr/obj/usr/src/tmp/usr/lib/crt1.o
/usr/obj/usr/src/tmp/usr/lib/gcrt1.o

The 8.1-RELEASE-p2 kernel builds and loads just fine. Anyone have any ideas?
 
Did I mention that I forgot to do "make clean" ? Am trying it now, but rebuilding world takes time. If it is successful, I will mark thread "solved."
 
OK, it seems that omitting to "make clean" was indeed the problem. Since my searches have uncovered several others with this same problem, perhaps inserting that step in the Handbook might not be a bad idea. I know "make clean" is obvious for most but ....

Admin, please mark thread as "solved."
 
Woland said:
Did I mention that I forgot to do "make clean" ? Am trying it now, but rebuilding world takes time. If it is successful, I will mark thread "solved."

A step you missed was
# rm -rf /usr/obj

See http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html#CLEANING-USR-OBJ.

This should be faster than make clean and (I've always assumed) it accomplishes the same thing. Unbenchmarked, but I've never bothered with 'make clean' and it's never *^$E0897&*^$&^$#&*
 
Thanks! "make clean" only takes a couple seconds on my (not spectacularly fast) machine, but yeah, still not quite as fast as rm.
 
Last edited by a moderator:
Wow, this is an old thread. I now regularly build with -DNO_CLEAN and only delete /usr/obj when required. That usually speeds up buildworld a lot.
 
Back
Top