Bug 39386

Summary: Problems with modversions.h
Product: [Retired] Red Hat Linux Reporter: alynch
Component: kernelAssignee: Arjan van de Ven <arjanv>
Status: CLOSED NOTABUG QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-05-07 14:35:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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:
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:

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
/usr/include.

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.