Re: How is CONFIG_MODVERSIONS and MODVERSIONS related?

From: Keith Owens (kaos@ocs.com.au)
Date: Sun May 07 2000 - 06:58:13 EST


On Sun, 07 May 2000 12:50:55 +0200,
"Peter 'Luna' Runestig" <peter+linux-kernel@runestig.com> wrote:
>If assumption 1 is correct, 2 must be wrong since "linux/modversions.h"
>is (sometimes) included when MODVERSIONS is _not_ defined. That's what
>I'm confused about.

modversions.h is always included and should always exist. When
CONFIG_MODVERSIONS is not set then modversions.h only contains one
line, saying "#include <linux/modsetver.h>" without any remapping of
kernel symbols to their checksummed equivalents. When
CONFIG_MODVERSIONS is set then modversions.h contains that line plus an
include line for every source that has versions symbols.

>make[1]: Entering directory `/home/luna/pcmcia-cs-3.1.14/modules'
>gcc -MD -O2 -Wall -Wstrict-prototypes -pipe -I../include
>-I/usr/src/linux/include -D__KERNEL__ -DMODULE -c cs.c
>In file included from ../include/pcmcia/k_compat.h:105,
> from cs.c:35:
> /usr/src/linux/include/linux/module.h:19:
>linux/modversions.h: No such file or directory
> make[1]: *** [cs.o] Error 1
> make[1]: Leaving directory
>`/home/luna/pcmcia-cs-3.1.14/modules'
> make: *** [all] Error 2

modules.h is correct, the problem is the missing modversions.h. Either
you did "make mrproper" on your linux source tree (which gets rid of
modversions.h) or you never compiled on that source tree. If you only
installed the kernel headers and did not compile the kernel then your
distribution may not have included modversions.h.

Part of the problem is that pcmcia is compiled outside the kernel, has
dependencies on kernel sources but is not hooked into the kernel
Makefiles. So make does not realise that a file has not been generated
until it is too late. I notice that the current beta for pcmcia-cs has
a workaround for this problem, it generates an empty modversions.h as
required.

Your best option is to build a full kernel to go with pcmcia. Or just
touch /usr/src/linux/include/linux/modversions.h.

-
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/



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:20 EST