Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jul 2018 14:05:05 +0300
From:      Konstantin Belousov <kib@freebsd.org>
To:        Dries Michiels <driesm.michiels@gmail.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Kernel build fails
Message-ID:  <20180705110505.GF5562@kib.kiev.ua>
In-Reply-To: <006601d4144e$993ad000$cbb07000$@gmail.com>
References:  <006601d4144e$993ad000$cbb07000$@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 05, 2018 at 12:54:50PM +0200, Dries Michiels wrote:
> Hello, 
> 
> 
> Today I wanted to upgrade to newest revision of the 11-stable branch but I
> have the following kernel build error:
> 
>  
> 
> --- kern_kthread.o ---
> 
> cc -target x86_64-unknown-freebsd11.2 --sysroot=/usr/obj/usr/src/tmp
> -B/usr/obj/usr/src/tmp/usr/bin -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.kern_kthread.o
> -MTkern_kthread.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
> -Wno-error-address-of-packed-member  -mno-aes -mno-avx  -std=iso9899:1999
> -Werror  /usr/src/sys/kern/kern_kthread.c
> 
> --- kern_exit.o ---
> 
> ctfconvert -L VERSION -g kern_exit.o
> 
> --- kern_jail.o ---
> 
> /usr/src/sys/kern/kern_jail.c:3943:15: error: unused variable 'p'
> [-Werror,-Wunused-variable]
> 
>         struct proc *p;
> 
>                      ^
> 
> /usr/src/sys/kern/kern_jail.c:3944:16: error: unused variable 'cred'
> [-Werror,-Wunused-variable]
> 
>         struct ucred *cred;
> 
>                       ^
> 
> 2 errors generated.

You have RACCT but not RCTL in the kernel config ?  Try this.

diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c
index b8bcbd49420..457a590cdf5 100644
--- a/sys/kern/kern_jail.c
+++ b/sys/kern/kern_jail.c
@@ -3988,8 +3988,10 @@ prison_racct_attach(struct prison *pr)
 static void
 prison_racct_modify(struct prison *pr)
 {
+#ifdef RCTL
 	struct proc *p;
 	struct ucred *cred;
+#endif
 	struct prison_racct *oldprr;
 
 	ASSERT_RACCT_ENABLED();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180705110505.GF5562>