# Upgraded 11.1-RELEASE, kernel build fails



## jef (Aug 8, 2017)

After upgrading from 11.0-RELEASE-p11 to 11.0-RELEASE and dutifully running _install_ three times with the requisite reboots, trying to build the GENERIC kernel fails (as does a custom kernel).

I've been through the three-install hoops twice on this one and I still am running into the same problem. If you have suggestions on what I might be missing, I'd appreciate it. This machine needs a custom kernel to serve its role.

I'm not on AWS, am using ZFS, and am beginning to think that the moon is full.

My recollection is that the kernel builds are pretty much warning free, so the large number of warnings (not replicated here) is bothersome as well.

The error from `make buildkernel KERNCONF=GENERIC` is logged as


```
env NM='nm' NMFLAGS='' sh /usr/src/sys/kern/genassym.sh ia32_genassym.o > ia32_assym.h
cc -target x86_64-unknown-freebsd11.1 --sysroot=/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin -c -x assembler-with-cpp -DLOCORE -O2 -pipe -fno-strict-aliasing  -g -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h  -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer  -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__  -Wmissing-include-dirs -fdiagnostics-show-option  -Wno-unknown-pragmas  -Wno-error-tautological-compare -Wno-error-empty-body  -Wno-error-parentheses-equality -Wno-error-unused-function  -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-error-address-of-packed-member  -mno-aes -mno-avx  -std=iso9899:1999  -Werror /usr/src/sys/amd64/acpica/acpi_wakecode.S
error: unknown warning option '-Werror=shift-negative-value'; did you mean '-Werror=shift-sign-overflow'? [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Werror=address-of-packed-member' [-Werror,-Wunknown-warning-option]
*** Error code 1
```


```
jeff@js:/usr/src$ uname -a
FreeBSD js.<redacted>.com 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

jeff@js:/usr/src$ clang -v
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)
Target: x86_64-unknown-freebsd11.1
Thread model: posix
InstalledDir: /usr/bin

jeff@js:/usr/src$ freebsd-version -ku
11.1-RELEASE
11.1-RELEASE
```


----------



## SirDice (Aug 8, 2017)

There's really not much to gain by running a custom kernel. I would suggest sticking to GENERIC as this creates the least amount of problems with freebsd-update(8).


----------



## jef (Aug 8, 2017)

SirDice said:


> There's really not much to gain by running a custom kernel. I would suggest sticking to GENERIC as this creates the least amount of problems with freebsd-update(8).


I agree and practice that, in general, but VIMAGE needed for this application, which is not present in GENERIC


----------



## SirDice (Aug 8, 2017)

That makes sense. It's not something you can load afterwards either. Is there anything in /etc/make.conf and/or /etc/src.conf?


----------



## jef (Aug 8, 2017)

SirDice said:


> Is there anything in /etc/make.conf and/or /etc/src.conf?


Neither file exists.

It's not the snappiest machine, CPU: Intel(R) Celeron(R) CPU  J1900  @ 1.99GHz (2000.05-MHz K8-class CPU), but I'm trying a `buildworld` before `buildkernel` to see if that resolves it.

As a workaround, I'm firing up VirtualBox with the 11.1 pre-built image and will see if I can build there. I'll also see if I can replicate the failure.


----------



## SirDice (Aug 8, 2017)

It shouldn't be needed but buildworld does set up the build environment properly. Perhaps that's what's causing the errors.


----------



## jef (Aug 8, 2017)

`make buildkernel KERNCONF=VIMAGE-11` works as expected using FreeBSD-11.1-RELEASE-amd64.vmdk under VirtualBox (once src.txz has been extracted).

`make buildworld` still plodding along on the J1900 box.

_Edit: As a note, all of these complies have been single threaded

Edit: After _buildworld _completed, the kernel build for GENERIC is progressing.

Edit: Installing the 10.0-RELEASE vmdk, upgrading to 10.3-RELEASE-pNN, upgrading to 11.0-RELEASE, then upgrading to 11.1-RELEASE (very roughly the chronology of the system involved, as I recall) results in a system that is able to build the kernel, without requiring _buildworld _first. _


----------

