Solved Raspberry Pi2 11-STABLE kernel build fails

trev

Aspiring Daemon

Reaction score: 133
Messages: 705

Build machine: FreeBSD rpi2.org 11.0-STABLE FreeBSD 11.0-STABLE #0 r318134: Wed May 10 23:01:57 UTC 2017 root@releng2.nyi.freebsd.org:/usr/obj/arm.armv6/usr/src/sys/RPI2 arm

svn source version r321000

Once buildworld finished overnight successfully I thought I was home and hosed... then the kernelbuild failed, so definitely hosed but not home :)

Error:

Code:
cc -target armv6-gnueabihf-freebsd11.1 --sysroot=/usr/obj/home/src/tmp -B/usr/obj/home \
/src/tmp/usr/bin -c -O -pipe  -g -nostdinc  -I. -I/home/src/sys -I/home/src/sys/contrib/libfdt \
-I/home/src/sys/gnu/dts/include -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include \
opt_global.h -march=armv7a -funwind-tables -MD  -MF.depend.kern_exec.o -MTkern_exec.o \
-ffreestanding -fwrapv -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  -mfpu=none  -std=iso9899:1999 \
-Werror  /home/src/sys/kern/kern_exec.c\

/home/src/sys/kern/kern_exec.c:1353:19: error: implicit declaration of function
      'atomic_readandclear_ptr' is invalid in C99
            [-Werror,-Wimplicit-function-declaration]
            argkva = (void *)atomic_readandclear_ptr(
                                             ^
/home/src/sys/kern/kern_exec.c:1353:19: error: this function declaration is not
        a prototype [-Werror,-Wstrict-prototypes]
2 errors generated.
*** Error code 1

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

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

Stop.
make: stopped in /home/src
Any ideas?
 
OP
OP
T

trev

Aspiring Daemon

Reaction score: 133
Messages: 705

This commit appears to have added the offending code:

Code:
------------------------------------------------------------------------
r320797 | markj | 2017-07-08 11:56:48 +1000 (Sat, 08 Jul 2017) | 3 lines

MFC r311346, r311352, r313756:
Add an allocator for KVA for execve arguments.
------------------------------------------------------------------------
 
OP
OP
T

trev

Aspiring Daemon

Reaction score: 133
Messages: 705

Solved by the effluxion of time (subsequent commits).
 
Top