Re: How is CONFIG_MODVERSIONS and MODVERSIONS related?

From: Peter 'Luna' Runestig (peter+linux-kernel@runestig.com)
Date: Sun May 07 2000 - 05:50:55 EST


Keith Owens wrote:
> Of course I read it. First you said that you did not understand why
> linux/modversions.h is included. Then you said that your real problem
> was an inability to compile pcmcia. But the code you complained about
> in modules.h has been there for years and works perfectly for everybody
> else. So modules.h is not your real problem, it is either incorrect
> parameters to gcc or missing symlinks. Either way, you provided
> insufficent data to solve your real problem. modules.h is correct.

First, I don't complain about anything, I'm just confused and wanted
some help. It's a beautiful spring weekend here in Sweden and everyone's
happy :-)

My main question in my initial post was based on two assumptions I made,
which might as well be wrong:
1. If I don't have CONFIG_MODVERSIONS defined, the file
"linux/modversions.h" isn't created.
2. The two macros CONFIG_MODVERSIONS and MODVERSIONS are related, ie if
CONFIG_MODVERSIONS is defined, so is MODVERSIONS and vice versa.

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.

BTW, I'm using kernel 2.2.15, gcc 2.95.2 and glibc 2.1.3.

Anyway, this is the situation with pcmcia-cs-3.1.14:

[luna@r2 pcmcia-cs-3.1.14]$ make all
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

include/pcmcia/k_compat.h:96:
#if (LINUX_VERSION_CODE > VERSION(2,1,16))
#define AUTOCONF_INCLUDED
#define EXPORT_SYMTAB
#define register_symtab(x)
#endif
#ifdef CONFIG_MODVERSIONS
#define MODVERSIONS 1
#include <linux/modversions.h>
#endif
#include <linux/module.h>

Cheers,
Peter

-- 
Peter "Luna" Runestig (fd. Altberg), Sweden
<peter+linux-kernel@runestig.com>
PGP Key ID: 0xD07BBE13
Fingerprint: 7B5C 1F48 2997 C061 DE4B  42EA CB99 A35C D07B BE13

Gubben Movitz ler och nickar, / men från Charons mörka sund dödens blund / i dina blickar / bådar snart din sista stund. Carl Michael Bellman, Fredmans epistel nr 34

- 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