From owner-freebsd-stable@freebsd.org Thu Jul 5 11:05:17 2018 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E5511041649 for ; Thu, 5 Jul 2018 11:05:17 +0000 (UTC) (envelope-from kib@freebsd.org) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63EAB76012 for ; Thu, 5 Jul 2018 11:05:16 +0000 (UTC) (envelope-from kib@freebsd.org) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w65B55rc013791 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 5 Jul 2018 14:05:08 +0300 (EEST) (envelope-from kib@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w65B55rc013791 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w65B55RZ013790; Thu, 5 Jul 2018 14:05:05 +0300 (EEST) (envelope-from kib@freebsd.org) X-Authentication-Warning: tom.home: kostik set sender to kib@freebsd.org using -f Date: Thu, 5 Jul 2018 14:05:05 +0300 From: Konstantin Belousov To: Dries Michiels Cc: freebsd-stable@freebsd.org Subject: Re: Kernel build fails Message-ID: <20180705110505.GF5562@kib.kiev.ua> References: <006601d4144e$993ad000$cbb07000$@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <006601d4144e$993ad000$cbb07000$@gmail.com> User-Agent: Mutt/1.10.0 (2018-05-17) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2018 11:05:17 -0000 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();