# Error compile kernel FREEBSD-11.0 p11.



## ardiansyah (Jul 18, 2017)

Compiled on Hyper-v and VMWare Workstation FREEBSD-11.0-STABLE x64

```
# uname -a
FreeBSD  11.0-STABLE FreeBSD 11.0-STABLE #0 r313108: Fri Feb  3 01:46:57 UTC 2017     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

#cp GENERIC MY
#make buildkernel KERNCONF=MY


cc  -c -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 -MD  -MF.depend.ppb_1284.o -MTppb_1284.o -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  -mno-aes -mno-avx  -std=iso9899:1999 -Werror  /usr/src/sys/dev/ppbus/ppb_1284.c
/usr/src/sys/dev/ppbus/ppb_1284.c:296:46: error: implicit conversion from 'int' to 'char' changes
      value from 144 to -112 [-Werror,-Wconstant-conversion]
        if ((error = do_peripheral_wait(bus, SELECT | nBUSY, 0))) {
                     ~~~~~~~~~~~~~~~~~~      ~~~~~~~^~~~~~~
/usr/src/sys/dev/ppbus/ppb_1284.c:785:48: error: implicit conversion from 'int' to 'char' changes
      value from 240 to -16 [-Werror,-Wconstant-conversion]
                if (do_1284_wait(bus, nACK | SELECT | PERROR | nBUSY,
                    ~~~~~~~~~~~~      ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/usr/src/sys/dev/ppbus/ppb_1284.c:786:29: error: implicit conversion from 'int' to 'char' changes
      value from 240 to -16 [-Werror,-Wconstant-conversion]
                                        nACK | SELECT | PERROR | nBUSY)) {
                                        ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/usr/src/sys/dev/ppbus/ppb_1284.c:841:37: error: implicit conversion from 'int' to 'char' changes
      value from 200 to -56 [-Werror,-Wconstant-conversion]
        if (do_1284_wait(bus, nACK | nBUSY | nFAULT, nFAULT)) {
            ~~~~~~~~~~~~      ~~~~~~~~~~~~~^~~~~~~~
4 errors generated.
*** Error code 1

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

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

Stop.
make: stopped in /usr/src
```


----------



## SirDice (Jul 18, 2017)

Did you do a buildworld first? And is there anything in /etc/make.conf?


----------



## ardiansyah (Jul 18, 2017)

no, i didn't do buildworld and there is no file name make.conf in etc dir.


----------



## SirDice (Jul 18, 2017)

Did you run `make buildkernel` from /usr/src/?


----------



## ardiansyah (Jul 18, 2017)

yes 
make buildkernel KERNCONF=MY


----------



## SirDice (Jul 18, 2017)

Do this first, to rule out anything wrong:

```
cd /usr/src
make clean
make buildworld
make buildkernel KERNCONF=MY
```


----------



## ardiansyah (Jul 18, 2017)

How long this buildworld takes time?? 

have been 3 hours build not finish yet


----------



## Minbari (Jul 18, 2017)

The compile process depend on the hardware you have. Did you use flags?  For eg: if you have 4 core processor that have 8 threads you can use them all:* make -j8  buildworld* to speed the build process, otherwise the build time can be very long.


----------



## ardiansyah (Jul 18, 2017)

if i rerun the buildworld, is the build will continued from the lastime ??


----------



## Minbari (Jul 18, 2017)

It should without a problem.


----------



## SirDice (Jul 18, 2017)

It doesn't. Not by default anyway. It will basically just start over. And yes, buildworld will take some time to complete. It takes about 2-3 hours on my Core i5 home server. But you're going to need it anyway, you typically don't update 'only' the kernel, you update the whole system (a.k.a. world). This is especially true for -STABLE.


----------



## ardiansyah (Jul 18, 2017)

done it, build world and kernel in 45 minute.

how i delete all the tmp file from build world and build kernel?. it uses 8GB .


----------



## SirDice (Jul 18, 2017)

A `make clean` should remove it. But note that you'll need to buildworld again if you want to installworld after you cleaned up. So it may be worthwhile to keep it. I typically keep the results of the last buildworld until I update as I also use it to build jails and create a release(7). Before an update run I'll start with a `make clean` to make sure I start with a clean slate.


----------



## ardiansyah (Jul 18, 2017)

i done make installkernel KERNCONF=MY and reboot

is there any more step ??


----------



## ShelLuser (Jul 18, 2017)

Also don't forget about /usr/obj.


----------



## SirDice (Jul 18, 2017)

ardiansyah said:


> is there any more step ??


Several actually. See build(7).

The standard way to update a -STABLE contains at least the following steps:

```
svnlite update /usr/src
cd /usr/src
make clean
make buildworld
make buildkernel
make installkernel
make installworld
mergemaster
make delete-old
make delete-old-libs
```


----------



## ardiansyah (Jul 18, 2017)

thank you Master for all of your help


----------

