Bug 39386 - Problems with modversions.h
Summary: Problems with modversions.h
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
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:
Clone Of:
Environment:
Last Closed: 2001-05-07 14:35:58 UTC
Embargoed:


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


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