# make installworld fails; can't find crt1.o



## Woland (Dec 21, 2010)

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:

```
--------------------------------------------------------------
>>> 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:

```
/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?


----------



## Woland (Dec 21, 2010)

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."


----------



## Woland (Dec 21, 2010)

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."


----------



## wblock@ (Dec 22, 2010)

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&*^$&^$#&*


----------



## Woland (Dec 22, 2010)

Thanks!  "make clean" only takes a couple seconds on my (not spectacularly fast) machine, but yeah, still not quite as fast as `rm`.


----------



## wblock@ (Nov 21, 2014)

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.


----------

