NetBSD Problem Report #39942
From www@NetBSD.org Mon Nov 17 18:11:46 2008
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id DEB6963B8BD
for <gnats-bugs@gnats.netbsd.org>; Mon, 17 Nov 2008 18:11:46 +0000 (UTC)
Message-Id: <20081117181146.A2F9063B874@narn.NetBSD.org>
Date: Mon, 17 Nov 2008 18:11:46 +0000 (UTC)
From: jdbaker@mylinuxisp.com
Reply-To: jdbaker@mylinuxisp.com
To: gnats-bugs@NetBSD.org
Subject: kernel crossbuild fails with "unused variable 'ch0_is_cons'"
X-Send-Pr-Version: www-1.0
>Number: 39942
>Category: port-sparc
>Synopsis: kernel crossbuild fails with "unused variable 'ch0_is_cons'"
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: martin
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 17 18:15:00 +0000 2008
>Closed-Date: Sat Nov 22 12:47:54 +0000 2008
>Last-Modified: Sat Nov 22 12:47:54 +0000 2008
>Originator: John D. Baker
>Release: NetBSD4.0_STABLE, NetBSD 5.0_BETA
>Organization:
>Environment:
Host:
NetBSD drmemory.bozonet.ntc 4.0_STABLE NetBSD 4.0_STABLE (DRMEMORY) #3: Wed Sep 17 06:34:25 CDT 2008 sysop@drmemory.bozonet.ntc:/d0/nbsd/netbsd-4/obj/i386/sys/arch/i386/compile/DRMEMORY i386
Target:
NetBSD artychoke.bozonet.ntc 4.0_STABLE NetBSD 4.0_STABLE (ARTYCHOKE) #9: Fri Oct 10 09:22:29 CDT 2008 sysop@drmemory.bozonet.ntc:/d0/nbsd/netbsd-4/obj/sparc/sys/arch/sparc/compile/ARTYCHOKE sparc
>Description:
Cross-building NetBSD-5.0_BETA/sparc on NetBSD-4.0_STABLE/i386.
Target machine will be serial-console only SUN4M, so unused driver and
attachment points are commented out as follows (this works fine with
NetBSD-4.0_STABLE/sparc):
[...]
#### Serial port configuration
## Zilog 8530 serial chips. Each has two-channels.
## zs0 is ttya and ttyb. zs1 is the keyboard and mouse.
#zs0 at mainbus0 # sun4c
zs0 at obio0 # sun4m
#zs0 at obio0 addr 0xf1000000 level 12 # sun4/200 and sun4/300
#zs0 at obio0 addr 0x01000000 level 12 # sun4/100
#zs0 at bootbus0 # sun4d
zstty0 at zs0 channel 0 # ttya
zstty1 at zs0 channel 1 # ttyb
#zs1 at mainbus0 # sun4c
#zs1 at obio0 # sun4m
#zs1 at obio0 addr 0xf0000000 level 12 # sun4/200 and sun4/300
#zs1 at obio0 addr 0x00000000 level 12 # sun4/100
#zs1 at bootbus0 # sun4d
#kbd0 at zs1 channel 0 # keyboard
#ms0 at zs1 channel 1 # mouse
#zs2 at obio0 addr 0xe0000000 level 12 # sun4/300
#zstty2 at zs2 channel 0 # ttyc
#zstty3 at zs2 channel 1 # ttyd
#zs* at bootbus? # sun4d
#zstty* at zs?
[...]
Which results in the following error:
[...]
# compile ARTYCHOKE/zs.o
/d0/nbsd/netbsd-5/src/../tools/i386/bin/sparc--netbsdelf-gcc -mno-fpu -ffreestanding -fno-zero-initialized-in-bss -O2 -std=gnu99 -fno-strict-aliasing -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-unreachable-code -Wno-sign-compare -Wno-pointer-sign -Wno-attributes -Werror -mcpu=v8 -I. -I/d0/nbsd/netbsd-5/src/sys/../common/include -I/d0/nbsd/netbsd-5/src/sys/arch -I/d0/nbsd/netbsd-5/src/sys -nostdinc -DMAXUSERS=8 -D_KERNEL -D_KERNEL_OPT -I/d0/nbsd/netbsd-5/src/sys/lib/libkern/../../../common/lib/libc/quad -I/d0/nbsd/netbsd-5/src/sys/lib/libkern/../../../common/lib/libc/string -I/d0/nbsd/netbsd-5/src/sys/lib/libkern/../../../common/lib/libc/arch/sparc/string -I/d0/nbsd/netbsd-5/src/sys/dist/pf -c /d0/nbsd/netbsd-5/src/sys/arch/sparc/dev/zs.c
cc1: warnings being treated as errors
/d0/nbsd/netbsd-5/src/sys/arch/sparc/dev/zs.c: In function 'zs_attach':
/d0/nbsd/netbsd-5/src/sys/arch/sparc/dev/zs.c:400: warning: unused variable 'ch0_is_cons'
*** Failed target: zs.o
*** Failed command: echo '# ' "compile ARTYCHOKE/zs.o"; echo /d0/nbsd/netbsd-5/src/../tools/i386/bin/sparc--netbsdelf-gcc -mno-fpu -ffreestanding -fno-zero-initialized-in-bss -O2 -std=gnu99 -fno-strict-aliasing -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-unreachable-code -Wno-sign-compare -Wno-pointer-sign -Wno-attributes -Werror -mcpu=v8 -I. -I/d0/nbsd/netbsd-5/src/sys/../common/include -I/d0/nbsd/netbsd-5/src/sys/arch -I/d0/nbsd/netbsd-5/src/sys -nostdinc -DMAXUSERS=8 -D_KERNEL -D_KERNEL_OPT -I/d0/nbsd/netbsd-5/src/sys/lib/libkern/../../../common/lib/libc/quad -I/d0/nbsd/netbsd-5/src/sys/lib/libkern/../../../common/lib/libc/string -I/d0/nbsd/netbsd-5/src/sys/lib/libkern/../../../common/lib/libc/arch/sparc/string -I/d0/nbsd/netbsd-5/src/sys/dist/pf -c /d0/nbsd/netbsd-5/src/sys/arch/sparc/dev/zs.c; /d0/nbsd/netbsd-5/src/../tools/i386/bin/sparc--netbsdelf-gcc -mno-fp
u -ffreestanding -fno-zero-initialized-in-bss -O2 -std=gnu99 -fno-strict-aliasing -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-unreachable-code -Wno-sign-compare -Wno-pointer-sign -Wno-attributes -Werror -mcpu=v8 -I. -I/d0/nbsd/netbsd-5/src/sys/../common/include -I/d0/nbsd/netbsd-5/src/sys/arch -I/d0/nbsd/netbsd-5/src/sys -nostdinc -DMAXUSERS=8 -D_KERNEL -D_KERNEL_OPT -I/d0/nbsd/netbsd-5/src/sys/lib/libkern/../../../common/lib/libc/quad -I/d0/nbsd/netbsd-5/src/sys/lib/libkern/../../../common/lib/libc/string -I/d0/nbsd/netbsd-5/src/sys/lib/libkern/../../../common/lib/libc/arch/sparc/string -I/d0/nbsd/netbsd-5/src/sys/dist/pf -c /d0/nbsd/netbsd-5/src/sys/arch/sparc/dev/zs.c
*** Error code 1
Stop.
nbmake: stopped in /d0/nbsd/netbsd-5/obj/sparc/sys/arch/sparc/compile/ARTYCHOKE
ERROR: Failed to make all in /d0/nbsd/netbsd-5/src/../obj/sparc/sys/arch/sparc/compile/ARTYCHOKE
*** BUILD ABORTED ***
>How-To-Repeat:
Configure serial drivers as shown above. Specifically, enable:
zs1 at obio # or any attachment point
and disable:
kbd0 at zs1 channel 0
and attempt to build kernel.
>Fix:
Workaround: enable zs1 and kbd0 devices.
Possibly this patch, to match the use case:
Index: sys/arch/sparc/dev/zs.c
===================================================================
RCS file: /cvsroot/src/sys/arch/sparc/dev/zs.c,v
retrieving revision 1.111
diff -u -r1.111 zs.c
--- sys/arch/sparc/dev/zs.c 13 Jun 2008 13:10:18 -0000 1.111
+++ sys/arch/sparc/dev/zs.c 17 Nov 2008 18:10:39 -0000
@@ -397,7 +397,10 @@
struct zs_chanstate *cs;
int s, channel;
static int didintr, prevpri;
+#if NWSKBD == 0
+#else
int ch0_is_cons = 0;
+#endif
if (zsd == NULL) {
aprint_error(": configuration incomplete\n");
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: port-sparc-maintainer->martin
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Mon, 17 Nov 2008 18:36:55 +0000
Responsible-Changed-Why:
I commited a fix
State-Changed-From-To: open->pending-pullups
State-Changed-By: martin@NetBSD.org
State-Changed-When: Mon, 17 Nov 2008 18:36:55 +0000
State-Changed-Why:
fixed in -current, will request pullup
From: Martin Husemann <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/39942 CVS commit: src/sys/arch/sparc/dev
Date: Mon, 17 Nov 2008 18:32:08 +0000 (UTC)
Module Name: src
Committed By: martin
Date: Mon Nov 17 18:32:08 UTC 2008
Modified Files:
src/sys/arch/sparc/dev: zs.c
Log Message:
PR port-sparc/39942: ifdef ch0_is_cons declaration and all uses consistently
To generate a diff of this commit:
cvs rdiff -r1.111 -r1.112 src/sys/arch/sparc/dev/zs.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Soren Jacobsen <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/39942 CVS commit: [netbsd-5] src/sys/arch/sparc/dev
Date: Tue, 18 Nov 2008 02:34:06 +0000 (UTC)
Module Name: src
Committed By: snj
Date: Tue Nov 18 02:34:06 UTC 2008
Modified Files:
src/sys/arch/sparc/dev [netbsd-5]: zs.c
Log Message:
Pull up following revision(s) (requested by martin in ticket #77):
sys/arch/sparc/dev/zs.c: revision 1.112
PR port-sparc/39942: ifdef ch0_is_cons declaration and all uses
consistently
To generate a diff of this commit:
cvs rdiff -r1.111 -r1.111.6.1 src/sys/arch/sparc/dev/zs.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: pending-pullups->feedback
State-Changed-By: martin@NetBSD.org
State-Changed-When: Tue, 18 Nov 2008 07:58:38 +0000
State-Changed-Why:
solved slightly different - could you update and try again please?
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: port-sparc/39942 (kernel crossbuild fails with "unused variable
'ch0_is_cons'")
Date: Fri, 21 Nov 2008 18:40:23 -0600 (CST)
On Tue, 18 Nov 2008, martin@NetBSD.org wrote:
> solved slightly different - could you update and try again please?
Yes, that takes care of the problem. Thanks.
--
John D. Baker, KN5UKS NetBSD Darwin/MacOS X
jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
BSD -- It just sits there and _works_!
GPG fingerprint: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
State-Changed-From-To: feedback->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Sat, 22 Nov 2008 12:47:54 +0000
State-Changed-Why:
fix confirmed, thanks for the report!
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.