Bug 20070 - Incorrect /usr/include/linux/version.h
Summary: Incorrect /usr/include/linux/version.h
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 7.0
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Michael K. Johnson
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2000-10-31 01:06 UTC by jgregor
Modified: 2007-03-27 03:37 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2000-10-31 07:35:29 UTC

Attachments (Terms of Use)

Description jgregor 2000-10-31 01:06:01 UTC
I need to compile and install a linux module. I can compile a module, but
when I use insmod to install it, I get the following error message:

root@joshua simple]# insmod hello.o
hello.o: kernel-module version mismatch
	hello.o was compiled for kernel version 2.4.0-0.26
	while this kernel is version 2.2.16-22.

I see that version.h (there are more) is not the same as the compiled
[root@joshua simple]# uname -a
Linux joshua 2.2.16-22 #1 Tue Aug 22 16:49:06 EDT 2000 i686 unknown

This is not a problem with Redhat 6.2, just with 7.0

Comment 1 Arjan van de Ven 2000-10-31 07:35:27 UTC
This is 100% correct behavior. /usr/include/linux contains the glibc headers,
not the kernel headers. You must pass -I/usr/src/linux/include to the kgcc line
with witch you compile your module. (-O2 -D__KERNEL__ are also needed of
course). That this worked for Red Hat 6.2 is pure coincidence (well, almost :) 
because the kernel and glibc headers matched there.

Note You need to log in before you can comment on or make changes to this bug.