NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/40513: kernel does not compile with LKM
>Number: 40513
>Category: kern
>Synopsis: kernel does not compile with LKM
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jan 29 13:10:00 +0000 2009
>Originator: Masanori Kanaoka
>Release: NetBSD 5.99.7 i386
>Organization:
none
>Environment:
NetBSD lab.k.vnop.net 5.99.7 NetBSD 5.99.7 (LAB) #0: Tue Jan 20 22:28:57 JST
2009 root%lab.k.vnop.net@localhost:/usr/obj/sys/arch/i386/compile/LAB i386
>Description:
kernel does not compile with old config(include options LKM).
# compile LAB/if_lmc.o
/usr/src/tooldir.NetBSD-5.99.7-i386/bin/i386--netbsdelf-gcc -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
-Wextra -Wno-unused-parameter -Werror -march=i486 -mtune=pentiumpro -Di386 -I.
-I/usr/src/sys/../common/include -I/usr/src/sys/arch -I/usr/src/sys -nostdinc
-DLKM -DMODULAR -DMAXUSERS=64 -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/external/isc/atheros_hal/dist
-I/usr/src/sys/external/isc/atheros_hal/ic -I/usr/src/sys/dist/ipf -c
/usr/src/sys/dev/pci/if_lmc.c
/usr/src/sys/dev/pci/if_lmc.c:7221: error: expected declaration specifiers or
'...' before string constant
/usr/src/sys/dev/pci/if_lmc.c:7221: error: expected declaration specifiers or
'...' before 'cfdrivers'
/usr/src/sys/dev/pci/if_lmc.c:7221: error: expected declaration specifiers or
'...' before 'cfattachs'
/usr/src/sys/dev/pci/if_lmc.c:7221: error: expected declaration specifiers or
'...' before 'cfdatas'
cc1: warnings being treated as errors
/usr/src/sys/dev/pci/if_lmc.c:7221: warning: data definition has no type or
storage class
/usr/src/sys/dev/pci/if_lmc.c:7221: warning: type defaults to 'int' in
declaration of 'MOD_DRV'
/usr/src/sys/dev/pci/if_lmc.c:7221: warning: function declaration isn't a
prototype
/usr/src/sys/dev/pci/if_lmc.c:7223: warning: 'struct lkm_table' declared inside
parameter list
/usr/src/sys/dev/pci/if_lmc.c:7223: warning: its scope is only this definition
or declaration, which is probably not what you want
/usr/src/sys/dev/pci/if_lmc.c:7224: warning: no previous prototype for
'if_lmc_lkmentry'
/usr/src/sys/dev/pci/if_lmc.c: In function 'if_lmc_lkmentry':
/usr/src/sys/dev/pci/if_lmc.c:7224: warning: implicit declaration of function
'LKM_DISPATCH'
/usr/src/sys/dev/pci/if_lmc.c:7224: error: 'lkm_nofunc' undeclared (first use
in this function)
/usr/src/sys/dev/pci/if_lmc.c:7224: error: (Each undeclared identifier is
reported only once
/usr/src/sys/dev/pci/if_lmc.c:7224: error: for each function it appears in.)
*** [if_lmc.o] Error code 1
>How-To-Repeat:
# cd /usr/src
# ./build.sh tools
# ./build.sh kernel=MYCONFIG(include option LKM)
>Fix:
1. remove "option LKM" form config file.
or
2. a little patch fot sys/dev/pci/if_lmc.c
Index: sys/dev/pci/if_lmc.c
===================================================================
RCS file: /ftp/cvs/src/sys/dev/pci/if_lmc.c,v
retrieving revision 1.45
diff -u -r1.45 if_lmc.c
--- sys/dev/pci/if_lmc.c 12 Nov 2008 12:36:12 -0000 1.45
+++ sys/dev/pci/if_lmc.c 29 Jan 2009 12:54:35 -0000
@@ -7202,7 +7202,7 @@
CFATTACH_DECL(lmc, sizeof(softc_t), /* lmc_ca */
nbsd_match, nbsd_attach, nbsd_detach, NULL);
-# if defined(LKM)
+# if defined(_MODULE)
static struct cfattach *cfattach[] = { &lmc_ca, NULL };
static const struct cfattachlkminit cfattachs[] =
@@ -7223,7 +7223,7 @@
int if_lmc_lkmentry(struct lkm_table *lkmtp, int cmd, int ver)
{ LKM_DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc); }
-# endif /* LKM */
+# endif /* _MODULE */
#endif /* __NetBSD__ */
Home |
Main Index |
Thread Index |
Old Index