# buildkernel fails



## gpatrick (Jul 4, 2016)

Installed from the 10.3-STABLE image and updated source.  `buildworld`succeeded but `buildkernel` fails.  Note that 11-CURRENT also fails.

My custom kernel only has

```
cpu  HAMMER
ident  CUSTOM

options  VIMAGE
options  NULLFS
```

This is where it fails (`make buildkernel KERNCONF=CUSTOM`)

```
CC='cc ' mkdep -f .depend -a  -nostdinc -D_KERNEL -DKLD_MODULE -DHAVE_KERNEL_OPTION_HEADERS -I. -I@ -I@/contrib/altq -I/usr/obj/usr/src/sys/CUSTOM -std=iso9899:1999  -include /usr/obj/usr/src/sys/CUSTOM/opt_global.h /usr/src/sys/modules/ipdivert/../../netinet/ip_divert.c
/usr/src/sys/modules/ipdivert/../../netinet/ip_divert.c:37:2: error: "IPDIVERT requires INET"
#error "IPDIVERT requires INET"
^
--- depend_subdir_ipfilter ---
===> ipfilter (depend)
--- depend_subdir_ipdivert ---
1 error generated.
mkdep: compile failed
*** [.depend] Error code 1

make[4]: stopped in /usr/src/sys/modules/ipdivert
1 error

make[4]: stopped in /usr/src/sys/modules/ipdivert
*** [depend_subdir_ipdivert] Error code 2

make[3]: stopped in /usr/src/sys/modules
--- depend_subdir_ipfilter ---
A failure has been detected in another branch of the parallel make

make[4]: stopped in /usr/src/sys/modules/ipfilter
*** [depend_subdir_ipfilter] Error code 2

make[3]: stopped in /usr/src/sys/modules
--- depend_subdir_if_ndis ---
A failure has been detected in another branch of the parallel make

make[4]: stopped in /usr/src/sys/modules/if_ndis
*** [depend_subdir_if_ndis] Error code 2

make[3]: stopped in /usr/src/sys/modules
--- depend_subdir_igb ---
A failure has been detected in another branch of the parallel make

make[4]: stopped in /usr/src/sys/modules/igb
*** [depend_subdir_igb] Error code 2

make[3]: stopped in /usr/src/sys/modules
4 errors

make[3]: stopped in /usr/src/sys/modules
*** [modules-depend] Error code 2

make[2]: stopped in /usr/obj/usr/src/sys/CUSTOM
1 error

make[2]: stopped in /usr/obj/usr/src/sys/CUSTOM
*** [buildkernel] Error code 2

make[1]: stopped in /usr/src
1 error

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

make: stopped in /usr/src
1 error

make: stopped in /usr/src
root@host12:/usr/src # exit

Script done on Mon Jul  4 21:04:34 2016
```


----------



## getopt (Jul 4, 2016)

If your custom kernel configuration file is the delta to i.e. GENERIC, you need as first line

```
include GENERIC
```


----------

