Red Hat Bugzilla – Bug 24101
conflicts between kernel/file headers with "make"
Last modified: 2007-04-18 12:30:43 EDT
When executing "make" on my newly installed RedHat 7.0 the following message is received:
gcc_D_KERNEL__ -DMODULE -w -02 -fomit-frame-pointer -I/usr/src/linux/include -c -o serial.a serial.c
In file included from serial.c:131:
/usr/include/linux/modversions.h:1:2: #error Modules should never use kernel-headers system headers,
/usr/include/linux/modversions.h:2:2: #error but headers from an appropriate kernel source
make: *** [serial.a] Error 1
-the Makefile for this module is exacutable in Mandrake 7.1(my previous OS)
-I used the make program from Mandrake in RedHat and the same error occurred
-thus the error is not from the module or the make program
The error message is trying to prevent errors caused from mis-matches between
glibc and kernel headers For the vast majority of programs the error message is
needed to prevent subtle errors.
Judging from the name of your program "serial.c", your program may be one of
of programs that might need to include kernel headers, dunno, can't tell without
more info. You should look carefully for glibc equivalent structures and methods
perform the same task.