Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jan 2021 17:47:51 -0800
From:      Michael Dexter <editor@callfortesting.org>
To:        freebsd-current@freebsd.org
Subject:   FreeBSD 13.0 Build Option Sweep
Message-ID:  <ce3e2449-f302-8776-e669-92c2c73f5744@callfortesting.org>

next in thread | raw e-mail | index | archive | help
Hello all,

I have been experimenting with FreeBSD build options on and off since 
FreeBSD 4.8/5.0 for use with minimum jails and later virtual machines.

If you have ever tried to build "without all" and working your way back 
up, you have probably found this to be a very frustrating adventure in 
make-related failures after hours of compilation and, on the darkest 
days, concurrent deletion bugs which would give a different error every 
time you run a build.

Fortunately, with the help of people like Ed Maste, Bryan Drewery, 
Bjoern Zeeb, Kyle Evans, and others, we have been gradually knocking 
broken build options off of the lists generated by the 
tools/tools/build_option_survey that PHK wrote long ago.

An annotated list of working and failing build options in FreeBSD 
13.0-ALPHA1 can be found here:

https://callfortesting.org/results/bos-FreeBSD-13A1/

Two have been fixed and PRs exist for the majority of them with some 
possible fixes for those who know the code best to consider. One broken 
option is a recent regression while one pair, 
WITHOUT_LIBTHR/WITHOUT_LIBPTHREAD is quite stale and is a candidate for 
significant attention or possibly removal.

If you are wondering, as of 13.0-ALPHA1, the following KERNCONF and 
generated /usr/src.conf are the minimum to build FreeBSD and build it in 
a bhyve VM from a UFS-formatted disk image:

cpu             HAMMER
ident           LESSBSD
makeoptions     MODULES_OVERRIDE="virtio"
options         SCHED_ULE
device          pci
device          loop
device          ether
device          uart
device          atpic
device          ahci
device          scbus
options         GEOM_PART_GPT
options         FFS

sh /usr/src/tools/tools/build_option_survey/listallopts.sh \
	| grep -v WITH_ | sed 's/$/=YES/' | \
         grep -v WITHOUT_AUTO_OBJ | \
         grep -v WITHOUT_UNIFIED_OBJDIR | \
         grep -v WITHOUT_CRYPT | \
         grep -v WITHOUT_DYNAMICROOT | \
         grep -v WITHOUT_LIBCPLUSPLUS | \
         grep -v WITHOUT_INSTALLLIB | \
         grep -v WITHOUT_LIBTHR | \
         grep -v WITHOUT_LIBPTHREAD | \
         grep -v WITHOUT_BOOT | \
         grep -v WITHOUT_LOADER_LUA | \
         grep -v WITHOUT_LOCALES | \
         grep -v WITHOUT_ZONEINFO | \
         grep -v WITHOUT_VI \
         > /etc/src.conf

Explanation/Status:

WITHOUT_AUTO_OBJ and WITHOUT_UNIFIED_OBJDIR belong in src-env.conf and 
kindly instantly warn you of this and terminate the build.

WITHOUT_DYNAMICROOT and WITHOUT_LIBCPLUSPLUS are fixed in CURRENT.

WITHOUT_INSTALLLIB and WITHOUT_LIBCPLUSPLUS should be easy to fix and 
candidate syntax is in the PRs linked in the above link.

WITHOUT_CRYPT has regressed in recent months.

WITHOUT_LIBTHR and WITHOUT_LIBPTHREAD are challenges.

WITHOUT_BOOT onward are optional to build but are needed to boot the VM, 
see a console, set the time zone, and optionally edit files.

The resulting kernel is 5M in size and the world and kernel are 90M. 
Basic networking adds another 1M.

The build times on an EPYC 7402p are:
buildworld 1m43.34s Warm ARC: 1m33.73s
buildkernel 9.35s
installworld 18.75s
installkernel 0.32s
Total: 3m23.44s

Boot time: About three seconds

I sincerely hope that all build options worked at some point and, given 
how much progress has been made, FreeBSD 13.0 can also support all 
options, or at a minimum, abort the build early as appropriate as the 
src-env.conf ones do.

Think of the Developers! Spare them continued frustration with these.

We can do this. I am happy to test any patches on multiple platforms. I 
am also happy to send individuals my minimum VM script and fortunately, 
it is out-of-date with every build option fix.

All the best,

Michael



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ce3e2449-f302-8776-e669-92c2c73f5744>