From Bugzilla Helper: User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.2-2 i686) Description of problem: Using the kernel source shipped with RH 7.1, I had to add a #include to include/linux/module.h in order to compile drivers/sound/soundcore.c. Dunno if this is the optimal solution. I'm surprised a file called "rhconfig.h" has to exist -- I would hope that all distributions would share identical kernel source. Below are the first few lines of module.h, showing the #include added: /* * Dynamic loading of modules into the kernel. * * Rewritten by Richard Henderson <rth> Dec 1996 */ #ifndef _LINUX_MODULE_H #define _LINUX_MODULE_H /* new addition */ #include <linux/rhconfig.h> /* end new addition */ #include <linux/config.h> #include <linux/spinlock.h> #include <linux/list.h> Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. in /usr/src/linux, choose sound support as a module 2. run "make clean; make dep; make; make modules" 3. notice that soundcore.c failed to compile Actual Results: make[2]: Entering directory `/usr/src/linux-2.4.2/drivers/sound' gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -Wno-unused -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include /usr/src/linux/include/linux/modversions.h -DEXPORT_SYMTAB -c sound_core.c In file included from sound_core.c:38: /usr/src/linux/include/linux/module.h:173: nondigits in number and not hexadecimal /usr/src/linux/include/linux/module.h:173: nondigits in number and not hexadecimal /usr/src/linux/include/linux/module.h:173: nondigits in number and not hexadecimal /usr/src/linux/include/linux/module.h:173: nondigits in number and not hexadecimal /usr/src/linux/include/linux/module.h:173: parse error before `62dada05' /usr/src/linux/include/linux/module.h:173: `inter_module_register_R_ver_str' declared as function returning a function Expected Results: no error messages Additional info: Here's the cpp output showing why rhconfig.h has to be included before line 173 of module.h. (rhconfig.h does get included on line 256 of module.h, by way of version.h.) # 173 "/usr/src/linux/include/linux/module.h" extern void inter_module_register_R_ver_str(62dada05)(const char *, struct module *, const void *);
Including "rhconfig.h" into "module.h" may solve only this particular problem. But some modules include "modversions.h" and not "module.h" and compiler generates simiar error. Better workaround is to place "#include <linux/rhconfig.h>" into "modsetver.h". Other solutions are: * redesign of "make dep" so, that it will include "rhconfig.h" into "modversions.h" * redesign of "make dep" so, that it will append version "number" to exported symbils in another way (more straight and clear!).