I was building directly in the sys/arch/amd64/compile/GENRIC directory. 
Building with build.sh fixed the issue.

Best,
James

________________________________
From: Martin Husemann <[email protected]>
Sent: Sunday, June 5, 2022 2:13 AM
To: James Browning <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: kern/subr_devsw.c build error

On Sun, Jun 05, 2022 at 04:43:38AM +0000, James Browning wrote:
> Hello,
>
> I am attempting to compile the kernel and getting blocked by the following 
> error:
>
>    ../../../../kern/subr_devsw.c:424:29: error: 'bi' may be used 
> uninitialized in this function [-Werror=maybe-uninitialized]
>    localcount_drain(bdevswref[bi].dr_lc,
>                              ^
> I am using NetBSD 9.2 on an amd64 system, and I'm attempting to build the 
> wifi branch of src-draft. Here is my gcc -v output:

Hey James,

can you explain how you are building the kernel? This might happen due
to using 9.2 toolchain and make rules (like with "make USETOOLS=never"
directly in the kernel build dir) instead of using the matching make rules
from the compiled source tree (like with $TOOLDIR/bin/nbmake-amd64,
or building via build.sh kernel=....).


Martin

Reply via email to