NetBSD Problem Report #47690
From www@NetBSD.org Sun Mar 24 21:05:13 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id 53A1663F1BC
for <gnats-bugs@gnats.NetBSD.org>; Sun, 24 Mar 2013 21:05:13 +0000 (UTC)
Message-Id: <20130324210512.20E8D63F1BC@www.NetBSD.org>
Date: Sun, 24 Mar 2013 21:05:12 +0000 (UTC)
From: dhgutteridge@sympatico.ca
Reply-To: dhgutteridge@sympatico.ca
To: gnats-bugs@NetBSD.org
Subject: Kernel compile failure when OHCI_DEBUG is enabled on 6.99.18 (patches included)
X-Send-Pr-Version: www-1.0
>Number: 47690
>Category: kern
>Synopsis: Kernel compile failure when OHCI_DEBUG is enabled on 6.99.18 (patches included)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Mar 24 21:10:00 +0000 2013
>Closed-Date: Sun Mar 24 22:39:26 +0000 2013
>Last-Modified: Sun Mar 24 22:39:26 +0000 2013
>Originator: David H. Gutteridge
>Release: 6.99.18
>Organization:
>Environment:
(Not specific to one architecture.)
>Description:
While trying to compile a HEAD macppc kernel with debugging enabled, I
encountered the following error.
# compile DEBUG/ohci.o
/usr/builds/netbsd-current/src/obj/tooldir.NetBSD-5.2_STABLE-i386/bin/powerpc--netbsd-gcc -pipe -O2 -Wa,-maltivec -mno-strict-align -Wa,-maltivec -msdata=none -msoft-float -ffreestanding -fno-zero-initialized-in-bss -pipe -O2 -DOHCI_DEBUG -fno-strict-aliasing -fno-common -std=gnu99 -Werror -Wreturn-type -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-unreachable-code -Wno-pointer-sign -Wno-attributes -Wno-sign-compare --sysroot=/usr/builds/netbsd-current/src/obj/destdir.macppc -Dmacppc=macppc -I. -I/usr/builds/netbsd-current/src/sys/../common/include -I/usr/builds/netbsd-current/src/sys/arch -I/usr/builds/netbsd-current/src/sys -nostdinc -DDIAGNOSTIC -DDEBUG -DZS_CONSOLE_ABORT -DFORCE_FUNCTION_KEYS -DAXE_DEBUG -DMSGBUFSIZE=1048576 -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -std=gnu99 -I/usr/builds/netbsd-current/src/sys/lib/libkern/../../../common/lib/libc/qua
d -I/usr/builds/netbsd-current/src/sys/lib/libkern/../../../common/lib/libc/string -I/usr/builds/netbsd-current/src/sys/lib/libkern/../../../common/lib/libc/arch/powerpc/string -I/usr/builds/netbsd-current/src/sys/external/bsd/ipf -I/usr/builds/netbsd-current/src/sys/external/isc/atheros_hal/dist -I/usr/builds/netbsd-current/src/sys/external/isc/atheros_hal/ic -c /usr/builds/netbsd-current/src/sys/dev/usb/ohci.c
cc1: warnings being treated as errors
/usr/builds/netbsd-current/src/sys/dev/usb/ohci.c: In function 'ohci_close_pipe':
/usr/builds/netbsd-current/src/sys/dev/usb/ohci.c:2254:3: error: implicit declaration of function 'usbd_dump_pipe'
*** [ohci.o] Error code 1
nbmake: stopped in /usr/builds/netbsd-current/src/sys/arch/macppc/compile/obj/DEBUG
1 error
nbmake: stopped in /usr/builds/netbsd-current/src/sys/arch/macppc/compile/obj/DEBUG
ERROR: Failed to make all in "/usr/builds/netbsd-current/src/sys/arch/macppc/compile/obj/DEBUG"
*** BUILD ABORTED ***
The fix is quite trivial. A check of the source with the very handy
OpenGrok (nxr.netbsd.org) reveals that's apparently the only missing
dependency:
Searched full:usbd_dump_pipe (Results 1 - 4 of 4) sorted by relevancy
/src/sys/dev/usb/ -
usbdivar.h 278 void usbd_dump_pipe(usbd_pipe_handle pipe);
usbdi.c 134 usbd_dump_pipe(usbd_pipe_handle pipe) function
136 printf("usbd_dump_pipe: pipe=%p\n", pipe);
142 printf(" (usbd_dump_pipe:)\n refcnt=%d running=%d aborting=%d\n",
ehci.c 1418 usbd_dump_pipe(pipe);
3209 usbd_dump_pipe(exfer->xfer.pipe);
ohci.c 2254 usbd_dump_pipe(&opipe->pipe);
>How-To-Repeat:
Try compiling a kernel with DEBUG and OHCI_DEBUG enabled.
>Fix:
--- usbdivar.h~ 2013-03-23 18:07:32.000000000 -0400
+++ usbdivar.h 2013-03-23 18:21:06.000000000 -0400
@@ -270,7 +270,7 @@
void usbd_init(void);
void usbd_finish(void);
-#if defined(USB_DEBUG) || defined(EHCI_DEBUG)
+#if defined(USB_DEBUG) || defined(EHCI_DEBUG) || defined(OHCI_DEBUG)
void usbd_dump_iface(struct usbd_interface *iface);
void usbd_dump_device(struct usbd_device *dev);
void usbd_dump_endpoint(struct usbd_endpoint *endp);
--- usbdi.c~ 2013-03-23 15:24:11.000000000 -0400
+++ usbdi.c 2013-03-24 16:31:04.000000000 -0400
@@ -82,7 +82,7 @@
UE_DIR_IN);
}
-#if defined(USB_DEBUG) || defined(EHCI_DEBUG)
+#if defined(USB_DEBUG) || defined(EHCI_DEBUG) || defined(OHCI_DEBUG)
void
usbd_dump_iface(struct usbd_interface *iface)
{
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Sun, 24 Mar 2013 22:39:26 +0000
State-Changed-Why:
Fix applied. Thanks.
>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.