From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) Description of problem: /usr/include/linux/modversions.h contains this: #error Modules should never use kernel-headers system headers, #error but headers from an appropriate kernel-source Even after the kernel-source packages have been installed. with kernel-smp and kernel. How reproducible: Always Steps to Reproduce: 1.Install the kernel sources, kernel-smp, and kernel. 2.Try to compile a program that needs modversions.h, and is using /usr/include/linux/ as its include path. 3. Actual Results: GCC will report a fatal error on lines 1 and 2 of /usr/include/linux/modversions.h, and output this: #error Modules should never use kernel-headers system headers, #error but headers from an appropriate kernel-source Expected Results: Compilation should have properly completed. Additional info:
Was fixed on test system by moving /usr/include/linux to /usr/include/old.linux, and symlinking /usr/include/linux to /usr/src/linux- 2.4.2/include/linux/ .
Userspace programs should NEVER EVER include modversions.h Likewise, kernelmodules should NEVER EVER include the glibc headerfiles from /usr/include. Kernelmodules can find the headers of the currently running kernel in /lib/modules/`uname -r`/build/include
Oh, and symlinking /usr/include to something else WILL break your system. /usr/include contains the headers glibc is compiled against, if you change those you MUST recompile glibc.