gcc -D__KERNEL__ -I/usr/src/linux-2.4.10/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i586
-fno-merge-constants -DMODULE -DMODVERSIONS -include
/usr/src/linux-2.4.10/include/linux/modversions.h -c -o
zftape-compress.o zftape-compress.c
In file included from /usr/src/linux-2.4.10/include/linux/mm.h:4,
from zftape-compress.c:35:
/usr/src/linux-2.4.10/include/linux/sched.h:6: nondigits in number and
not hexadecimal
/usr/src/linux-2.4.10/include/linux/sched.h:6: nondigits in number and
not hexadecimal
/usr/src/linux-2.4.10/include/linux/sched.h:6: parse error before
`7b16c344'
/usr/src/linux-2.4.10/include/linux/sched.h:6: warning: function
declaration isn't a prototype
make[4]: *** [zftape-compress.o] Error 1
make[4]: Leaving directory
`/usr/src/linux-2.4.10/drivers/char/ftape/compressor'
Well, the reason is here:
# 1 "zftape-compress.c"
# 1 "/usr/src/linux-2.4.10/include/linux/modversions.h" 1
# 1 "/usr/src/linux-2.4.10/include/linux/modsetver.h" 1
# 4 "/usr/src/linux-2.4.10/include/linux/modversions.h" 2
...
# 5 "/usr/src/linux-2.4.10/include/linux/sched.h" 2
extern unsigned long event_R_ver_str(7b16c344);
As you see, _ver_str(x) macro is not defined. This macro is used in all
*.ver files:
#define __ver_event _ver_str(7b16c344)
#define event _set_ver(event)
and is defined in rhconfig.h:
#if defined(__module__smp) || defined(__module__BOOTsmp) ||
defined(__module__en
terprise)
#define _ver_str(x) smp_ ## x
#else
#define _ver_str(x) x
#endif
But this file is never included in the above case.
I do not know why it works after make mrproper; may be kernel build does
some nasty tricks with dependencies (at least, regenerated *.ver files
differ from what I get after make mrproper; make depend). But it would
be *very* nice if it is fixed. It is the cause of constant confusion for
users (last time, "I never had to use mrproper on SuSe; why I need it on
Mandrake?").
The obvious fix is to blindly include autoconf.h into modsetver.h. But I
am not sure if it does not break anything else.
-andrej