Various module miscompilations in 2.3.27

Oleg Drokin (green@ccssu.crimea.ua)
Fri, 12 Nov 1999 12:01:22 +0200


Hello!

Compilataion of sound blaster modules failed:

gcc -D__KERNEL__ -I/usr/src/linux-2.3.27/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -fno-strength-reduce -DCPU=586 -DMODULE -DMODVERSIONS -include /usr/src/linux-2.3.27/include/linux/modversions.h -DEXPORT_SYMTAB
-c sb_card.c
/usr/src/linux-2.3.27/include/linux/isapnp.h: In function `isapnp_cfg_begin':
In file included from sb_card.c:20:
/usr/src/linux-2.3.27/include/linux/isapnp.h:158: `ENODEV' undeclared (first use this function)
/usr/src/linux-2.3.27/include/linux/isapnp.h:158: (Each undeclared identifier is reported only once
/usr/src/linux-2.3.27/include/linux/isapnp.h:158: for each function it appears in.)
/usr/src/linux-2.3.27/include/linux/isapnp.h: In function `isapnp_cfg_end':
/usr/src/linux-2.3.27/include/linux/isapnp.h:159: `ENODEV' undeclared (first use this function)
make[2]: *** [sb_card.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.3.27/drivers/sound'
make[1]: *** [_modsubdir_sound] Error 2
make[1]: Leaving directory `/usr/src/linux-2.3.27/drivers'
make: *** [_mod_drivers] Error 2

This trivial patch to include/linux/errno.h is required to fix this error:
--- linux/include/linux/isapnp.h.orig Fri Nov 12 11:42:59 1999
+++ linux/include/linux/isapnp.h Fri Nov 12 11:43:06 1999
@@ -23,6 +23,7 @@
#define LINUX_ISAPNP_H

#include <linux/config.h>
+#include <linux/errno.h>

/*
* Configuration registers (TODO: change by specification)

Also I got this when compiling CDROM as module:
make[2]: Entering directory `/usr/src/linux-2.3.27/drivers/cdrom'
gcc -D__KERNEL__ -I/usr/src/linux-2.3.27/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -fno-strength-reduce -DCPU=586 -DMODULE -DMODVERSIONS -include /usr/src/linux-2.3.27/include/linux/modversions.h -DEXPORT_SYMTAB
-c cdrom.c
/usr/src/linux-2.3.27/scripts/pathdown.sh: TOPDIR: parameter null or not set
/usr/src/linux-2.3.27/scripts/pathdown.sh: TOPDIR: parameter null or not set
rm -f $TOPDIR/modules/CDROM_MODULES

Also when compiling sunrpc module I got:
ld -m elf_i386 -r -o sunrpc.o sunrpc_syms.o clnt.o xprt.o sched.o auth.o auth_null.o auth_unix.o svc.o svcsock.o svcauth.o pmap_clnt.o xdr.o sysctl.o stats.o
sysctl.o(.modinfo+0x0): multiple definition of `__module_kernel_version'
sched.o(.modinfo+0x0): first defined here
sysctl.o(.modinfo+0x16): multiple definition of `__module_using_checksums'
sched.o(.modinfo+0x16): first defined here
make[2]: *** [sunrpc.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.3.27/net/sunrpc'
make[1]: *** [_modsubdir_sunrpc] Error 2
make[1]: Leaving directory `/usr/src/linux-2.3.27/net'
make: *** [_mod_net] Error 2

Bye,
Oleg

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/