# Rebuilding world fails?



## lnrt (Sep 18, 2014)

Hello,

I'm yet another Linux refugee. I hope to have all servers, desktops and embedded devices converted to FreeBSD by early next year. Now I'm trying to learn the system by experimenting, and reading everything I can get my hands on.

Today I have tried to see how much the base system could be reduced in size, for use in some special low resource devices. I have installed FreeBSD 10.1-BETA1. The reason for using 10.1 is that VT switching for Intel GPUs after 2009 is supported and I need that for the desktops. FreeBSD 10.1 will be stable before everything goes into production, so I decided to start learning from that version.

I followed instructions in the handbook for rebuilding world. This is the content of /etc/src.conf:


```
WITHOUT_ACCT=YES
WITHOUT_APM=YES
WITHOUT_ATF=YES
WITHOUT_ATM=YES
WITHOUT_AUDIT=YES
WITHOUT_AUTHPF=YES
WITHOUT_BLUETOOTH=YES
WITHOUT_BSNMP=YES
WITHOUT_CLANG_FULL=YES
WITHOUT_CTM=YES
WITHOUT_DICT=YES
WITHOUT_EXAMPLES=YES
WITHOUT_FLOPPY=YES
WITHOUT_FORTH=YES
WITHOUT_GAMES=YES
WITHOUT_GDB=YES
WITHOUT_GSSAPI=YES
WITHOUT_HTML=YES
WITHOUT_INET6=YES
WITHOUT_INFO=YES
WITHOUT_IPX=YES
WITHOUT_KDUMP=YES
WITHOUT_KERBEROS=YES
WITHOUT_KERNEL_SYMBOLS=YES
WITHOUT_LIB32=YES
WITHOUT_LPR=YES
WITHOUT_MAIL=YES
WITHOUT_NLS=YES
WITHOUT_NLS_CATALOGS=YES
WITHOUT_PC_SYSINSTALL=YES
WITHOUT_PPP=YES
WITHOUT_QUOTAS=YES
WITHOUT_RCMDS=YES
WITHOUT_SYSINSTALL=YES
WITHOUT_TELNET=YES
WITHOUT_UNBOUND=YES
WITHOUT_WIRELESS=YES
```
After a long time `make buildworld` fails with this error:


```
make[6]: /usr/obj/usr/src/sys/boot/userboot/userboot/.depend, 1356: ignoring stale .depend for /usr/obj/usr/src/tmp/boot/libstand.a
building shared library userboot.so
cc: error: no such file or directory: '/usr/obj/usr/src/tmp/boot/libstand.a'
*** Error code 1

Stop.
make[6]: stopped in /usr/src/sys/boot/userboot/userboot
*** Error code 1

Stop.
make[5]: stopped in /usr/src/sys/boot/userboot
*** Error code 1

Stop.
make[4]: stopped in /usr/src/sys/boot
*** Error code 1

Stop.
make[3]: stopped in /usr/src/sys
*** Error code 1

Stop.
make[2]: stopped in /usr/src
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src
```
Does anyone have a suggestion on what I may be doing wrong?


----------



## wblock@ (Sep 18, 2014)

You've attempted to remove too much.  I don't know exactly what it needs, but would first try removing WITHOUT_CLANG_FULL.  That's the system compiler...


----------



## SirDice (Sep 18, 2014)

You most likely disabled way too much. Try building a full world, at least once. Then, if it builds properly remove things one by one until it breaks. Did you also create a /etc/make.conf?


----------



## lnrt (Sep 20, 2014)

I found out that WITHOUT_FORTH was the problem. This option disable Forth support for bootloaders, and this is required. However, I did also remove WITHOUT_CLANG_FULL as I do not have enough knowledge yet, to decide if it could cause problems in the future.

As a side note, I found out about the NanoBSD script. This is exactly what I need for my embedded devices. I only have to create a configuration file, and then I will be able to build images with just a default FreeBSD installation, very cool.


----------



## lnrt (Sep 20, 2014)

SirDice said:
			
		

> Did you also create a /etc/make.conf?


I did not create a /etc/make.conf as I read on this forum that setting custom CFLAGS etc. are usually a bad idea. However, I may have misunderstood this?


----------



## kpa (Sep 20, 2014)

lnrt said:
			
		

> SirDice said:
> 
> 
> 
> ...



That is true, setting CFLAGS is a bad idea. There are however other settings that should be put into /etc/make.conf, for example KERNCONF if you're using your own custom kernel.


----------

