Bug 39386 - Problems with modversions.h
Summary: Problems with modversions.h
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel   
(Show other bugs)
Version: 7.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2001-05-07 14:31 UTC by alynch
Modified: 2007-04-18 16:33 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-05-07 14:35:58 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description alynch 2001-05-07 14:31:10 UTC
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:

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.

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:

Comment 1 alynch 2001-05-07 14:35:53 UTC
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/ .

Comment 2 Arjan van de Ven 2001-05-07 20:51:35 UTC
Userspace programs should NEVER EVER include modversions.h
Likewise, kernelmodules should NEVER EVER include the glibc headerfiles from

Kernelmodules can find the headers of the currently running kernel in
/lib/modules/`uname -r`/build/include

Comment 3 Arjan van de Ven 2001-05-07 20:52:38 UTC
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.

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