NetBSD Problem Report #39055

From asau@inbox.ru  Fri Jun 27 22:53:03 2008
Return-Path: <asau@inbox.ru>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 9998263B880
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 27 Jun 2008 22:53:03 +0000 (UTC)
Message-Id: <87iqvuse78.fsf@inbox.ru>
Date: Sat, 28 Jun 2008 02:30:51 +0400
From: Aleksej Saushev <asau@inbox.ru>
To: gnats-bugs@gnats.NetBSD.org
Subject: Kernel doesn't build with if_ndis

>Number:         39055
>Category:       kern
>Synopsis:       Kernel doesn't build with if_ndis
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 27 22:55:00 +0000 2008
>Closed-Date:    Sun Aug 02 19:01:00 +0000 2009
>Last-Modified:  Sun Aug 02 19:01:00 +0000 2009
>Originator:     
>Release:        NetBSD 4.99.67
>Organization:
>Environment:
System: NetBSD asau.local 4.99.67 NetBSD 4.99.67 (KERN) #0: Wed Jun 25 22:3=
7:46 MSD 2008 asau@asau.local:/usr/obj/sys/arch/i386/compile/KERN i386
Architecture: i386
Machine: i386
>Description:
I'm trying to build kernel with NDIS driver following instructions from ndi=
s(4).
The build fails with following message:

#   compile  obj/if_ndis.o
cc -ffreestanding -fno-zero-initialized-in-bss -march=3Dprescott -O2 -std=
=3Dgnu99 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -W=
missing-prototypes -Wstrict-prototypes -Wswitch -Wshadow -Wcast-qual -Wwrit=
e-strings -Wno-unreachable-code -Wno-sign-compare -Wno-pointer-sign -Wno-at=
tributes -Wextra -Wno-unused-parameter -fno-strict-aliasing -Werror -Wall -=
Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstr=
ict-prototypes -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-unreachab=
le-code -Wno-sign-compare -Wno-pointer-sign -Wno-attributes -Wextra -Wno-un=
used-parameter -Werror -march=3Dprescott -Di386 -I. -I/usr/src/sys/../commo=
n/include -I/usr/src/sys/arch -I/usr/src/sys -nostdinc -DI686_CPU -DCOM_MPL=
OCK -DDEBUG -DCOMPAT_NDIS -DMPACPI -DMAXUSERS=3D64 -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/i386/string -I/usr/src/sys/../common/include -I/usr/=
src/sys/dist/pf -I/usr/src/sys/dist/ipf -c /usr/src/sys/dev/if_ndis/if_ndis=
.c
/usr/src/sys/dev/if_ndis/if_ndis.c: In function 'ndis_setmulti':
/usr/src/sys/dev/if_ndis/if_ndis.c:335: error: 'struct ndis_softc' has no m=
ember named 'ndif_dev'
cc1: warnings being treated as errors
/usr/src/sys/dev/if_ndis/if_ndis.c: In function 'ndis_attach':
/usr/src/sys/dev/if_ndis/if_ndis.c:698: warning: passing argument 1 of 'apr=
int_normal_dev' from incompatible pointer type
/usr/src/sys/dev/if_ndis/if_ndis.c: In function 'ndis_detach':
/usr/src/sys/dev/if_ndis/if_ndis.c:1187: warning: passing argument 1 of 'mu=
tex_destroy' from incompatible pointer type
/usr/src/sys/dev/if_ndis/if_ndis.c: In function 'ndis_ioctl':
/usr/src/sys/dev/if_ndis/if_ndis.c:2602: error: 'cmd' undeclared (first use=
 in this function)
/usr/src/sys/dev/if_ndis/if_ndis.c:2602: error: (Each undeclared identifier=
 is reported only once
/usr/src/sys/dev/if_ndis/if_ndis.c:2602: error: for each function it appear=
s in.)
*** Error code 1

>How-To-Repeat:
Follow instructions from ndis(4), for instance:

/usr/sbin/ndiscvt -O -i DRIVER/bcmwl5.sys -s DRIVER/bcmwl5.inf -o ndis_driv=
er_data.h
config -b /asau/netbsd/wifi/obj -s /usr/src/sys /home/asau/netbsd/wifi/../K=
ERNDIS
cp /home/asau/netbsd/wifi/ndis_driver_data.h /home/asau/netbsd/wifi/obj
cd /home/asau/netbsd/wifi/obj && make depend && make

>Fix:
Please!

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->feedback
State-Changed-By: is@NetBSD.org
State-Changed-When: Fri, 06 Feb 2009 16:10:41 +0000
State-Changed-Why:
This seems to be the same problem described and allegedly fixed in PR 39034.
DOes the patch from 39034 work for you?

    -is


From: Geert Hendrickx <ghen@telenet.be>
To: gnats-admin@netbsd.org
Cc: 
Subject: Re: kern/39055: Kernel doesn't build with if_ndis
Date: Thu, 26 Mar 2009 13:01:08 +0100

 > This seems to be the same problem described and allegedly fixed in PR
 > 39034.  Does the patch from 39034 work for you?


 FWIW, the patch from PR 39034 worked for me to compile a kernel with NDIS
 driver for BCM4315.  Perhaps we should still try to get this into 5.0 ?


 	Geert

State-Changed-From-To: feedback->closed
State-Changed-By: dsl@NetBSD.org
State-Changed-When: Sun, 02 Aug 2009 19:01:00 +0000
State-Changed-Why:
fedback! duplicate of 39034 which contains a patch.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.