NetBSD Problem Report #33832

From root@brodiefamily.org  Mon Jun 26 16:30:09 2006
Return-Path: <root@brodiefamily.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id C40BB63B848
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 26 Jun 2006 16:30:08 +0000 (UTC)
Message-Id: <20060626143051.1D8CA6AD8@nomad.brodiefamily.org>
Date: Mon, 26 Jun 2006 10:30:51 -0400 (EDT)
From: damon@brodiefamily.org
Reply-To: damon@brodiefamily.org
To: gnats-bugs@NetBSD.org
Subject: x86_64 kernel build broken
X-Send-Pr-Version: 3.95

>Number:         33832
>Category:       kern
>Synopsis:       Kernel compile fails on audio.c
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    jmcneill
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 26 16:35:00 +0000 2006
>Closed-Date:    Tue Jun 27 02:07:47 +0000 2006
>Last-Modified:  Tue Jun 27 04:55:00 +0000 2006
>Originator:     Damon Brodie
>Release:        NetBSD 3.99.20
>Organization:

>Environment:


System: NetBSD nomad.brodiefamily.org 3.99.20 NetBSD 3.99.20 (NOMAD) #4: Wed May 17 09:39:54 EDT 2006 damon@nomad.brodiefamily.org:/usr/obj/sys/arch/amd64/compile/NOMAD amd64
Architecture: x86_64
Machine: amd64
>Description:

With up to date sources my kernel compile breaks.  This has been broken for approximately a week now:


#   compile  NOMAD/audio.o
/usr/tools/bin/x86_64--netbsd-gcc -mcmodel=kernel -mno-red-zone -ffreestanding -fno-zero-initialized-in-bss -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-sign-compare -Wno-pointer-sign -Wno-attributes -fno-strict-aliasing -Damd64 -Dx86_64 -I. -I/usr/src/sys/../common/include -I/usr/src/sys/arch -I/usr/src/sys -nostdinc -DLKM -DMAXUSERS=128 -D_KERNEL -D_KERNEL_OPT -I/usr/src/sys/lib/libkern/../../../common/lib/libc/quad -I/usr/src/sys/lib/libkern/../../../common/lib/libc/string -I/usr/src/sys/lib/libkern/../../../common/lib/libc/arch/x86_64/string -I/usr/src/sys/dist/ipf -c /usr/src/sys/dev/audio.c
cc1: warnings being treated as errors
/usr/src/sys/dev/audio.c:3743: warning: no previous prototype for 'audio_powerhook'
/usr/src/sys/dev/audio.c: In function 'audio_powerhook':
/usr/src/sys/dev/audio.c:3748: error: dereferencing pointer to incomplete type
/usr/src/sys/dev/audio.c:3752: error: dereferencing pointer to incomplete type
/usr/src/sys/dev/audio.c:3753: error: dereferencing pointer to incomplete type
/usr/src/sys/dev/audio.c:3754: error: dereferencing pointer to incomplete type
/usr/src/sys/dev/audio.c:3755: error: dereferencing pointer to incomplete type
/usr/src/sys/dev/audio.c:3758: error: dereferencing pointer to incomplete type
/usr/src/sys/dev/audio.c:3759: warning: implicit declaration of function 'audiostartp'
/usr/src/sys/dev/audio.c:3760: error: dereferencing pointer to incomplete type
/usr/src/sys/dev/audio.c:3761: warning: implicit declaration of function 'audiostartr'

*** Failed target:  audio.o
*** Failed command: echo '# ' "compile NOMAD/audio.o"; echo /usr/tools/bin/x86_64--netbsd-gcc -mcmodel=kernel -mno-red-zone -ffreestanding -fno-zero-initialized-in-bss -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-sign-compare -Wno-pointer-sign -Wno-attributes -fno-strict-aliasing -Damd64 -Dx86_64 -I. -I/usr/src/sys/../common/include -I/usr/src/sys/arch -I/usr/src/sys -nostdinc -DLKM -DMAXUSERS=128 -D_KERNEL -D_KERNEL_OPT -I/usr/src/sys/lib/libkern/../../../common/lib/libc/quad -I/usr/src/sys/lib/libkern/../../../common/lib/libc/string -I/usr/src/sys/lib/libkern/../../../common/lib/libc/arch/x86_64/string -I/usr/src/sys/dist/ipf -c /usr/src/sys/dev/audio.c; /usr/tools/bin/x86_64--netbsd-gcc -mcmodel=kernel -mno-red-zone -ffreestanding -fno-zero-initialized-in-bss -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prot
 otypes -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-sign-compare -Wno-pointer-sign -Wno-attributes -fno-strict-aliasing -Damd64 -Dx86_64 -I. -I/usr/src/sys/../common/include -I/usr/src/sys/arch -I/usr/src/sys -nostdinc -DLKM -DMAXUSERS=128 -D_KERNEL -D_KERNEL_OPT -I/usr/src/sys/lib/libkern/../../../common/lib/libc/quad -I/usr/src/sys/lib/libkern/../../../common/lib/libc/string -I/usr/src/sys/lib/libkern/../../../common/lib/libc/arch/x86_64/string -I/usr/src/sys/dist/ipf -c /usr/src/sys/dev/audio.c
*** Error code 1

>How-To-Repeat:
Get the latest source on x86_64 and try and compile a kernel.
>Fix:


>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->jmcneill
Responsible-Changed-By: jmcneill@netbsd.org
Responsible-Changed-When: Mon, 26 Jun 2006 17:25:35 +0000
Responsible-Changed-Why:
My fault.


From: "Jared D. McNeill" <jmcneill@invisible.ca>
To: gnats-bugs@NetBSD.org
Cc: netbsd-bugs@netbsd.org, gnats-admin@netbsd.org,
	damon@brodiefamily.org
Subject: Re: kern/33832 (Kernel compile fails on audio.c)
Date: Mon, 26 Jun 2006 17:07:46 -0300 (ADT)

 What compiler are you using? I am unable to reproduce this on i386 
 (cross-building amd64) using gcc4.

 Please validate that you have the following versions of files:
       $NetBSD: audio.c,v 1.207 2006/06/19 10:19:08 jmcneill Exp $
       $NetBSD: audiovar.h,v 1.37 2006/06/19 10:19:08 jmcneill Exp $

 Cheers,
 Jared

From: "Jared D. McNeill" <jmcneill@invisible.ca>
To: Damon Brodie <damon@brodiefamily.org>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/33832 (Kernel compile fails on audio.c)
Date: Mon, 26 Jun 2006 22:32:56 -0300 (ADT)

 On Mon, 26 Jun 2006, Damon Brodie wrote:
 > Hi Jared,
 >
 > I'm have those versions of the files.  I had been using gcc3, but
 > now that -current switched over to gcc4, I suppose I am using it.
 >
 > On a whim I killed my tools and obj directories and rebuilt from
 > scratch and get the same errors...

 Can you give me more details on your build environment? Native amd64? 
 extra COPTS/CPUFLAGS?

 Cheers,
 Jared

From: "Jared D. McNeill" <jmcneill@invisible.ca>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
	damon@brodiefamily.org
Subject: Re: kern/33832 (Kernel compile fails on audio.c)
Date: Mon, 26 Jun 2006 22:52:30 -0300 (ADT)

 Does the following patch resolve your problem?

 Cheers,
 Jared

 Index: audio.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/audio.c,v
 retrieving revision 1.207
 diff -u -r1.207 audio.c
 --- audio.c	19 Jun 2006 10:19:08 -0000	1.207
 +++ audio.c	27 Jun 2006 01:51:28 -0000
 @@ -3738,6 +3738,7 @@

   #endif /* NAUDIO > 0 || (NMIDI > 0 || NMIDIBUS > 0) */

 +#if NAUDIO > 0
   void
   audio_powerhook(int why, void *aux)
   {
 @@ -3764,3 +3765,4 @@

   	return;
   }
 +#endif /* NAUDIO > 0 */

State-Changed-From-To: open->closed
State-Changed-By: jmcneill@netbsd.org
State-Changed-When: Tue, 27 Jun 2006 02:07:47 +0000
State-Changed-Why:
Fixed.


From: "Jared D. McNeill" <jmcneill@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: PR/33832 CVS commit: src/sys/dev
Date: Tue, 27 Jun 2006 02:07:09 +0000 (UTC)

 Module Name:	src
 Committed By:	jmcneill
 Date:		Tue Jun 27 02:07:09 UTC 2006

 Modified Files:
 	src/sys/dev: audio.c

 Log Message:
 Protect audio_powerhook with '#if NAUDIO > 0'. PR kern/33832.


 To generate a diff of this commit:
 cvs rdiff -r1.207 -r1.208 src/sys/dev/audio.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Damon Brodie <damon@brodiefamily.org>
To: "Jared D. McNeill" <jmcneill@invisible.ca>
Cc: gnats-bugs@NetBSD.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org
Subject: Re: kern/33832 (Kernel compile fails on audio.c)
Date: Mon, 26 Jun 2006 22:03:37 -0400

 Hi Jared,

 That worked!

 Thanks,

 Damon

 On Mon, Jun 26, 2006 at 10:52:30PM -0300, Jared D. McNeill wrote:
 > Does the following patch resolve your problem?
 > 
 > Cheers,
 > Jared
 > 
 > Index: audio.c
 > ===================================================================
 > RCS file: /cvsroot/src/sys/dev/audio.c,v
 > retrieving revision 1.207
 > diff -u -r1.207 audio.c
 > --- audio.c	19 Jun 2006 10:19:08 -0000	1.207
 > +++ audio.c	27 Jun 2006 01:51:28 -0000
 > @@ -3738,6 +3738,7 @@
 > 
 >  #endif /* NAUDIO > 0 || (NMIDI > 0 || NMIDIBUS > 0) */
 > 
 > +#if NAUDIO > 0
 >  void
 >  audio_powerhook(int why, void *aux)
 >  {
 > @@ -3764,3 +3765,4 @@
 > 
 >  	return;
 >  }
 > +#endif /* NAUDIO > 0 */

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.