Bug 39386 - Problems with modversions.h
Problems with modversions.h
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-05-07 10:31 EDT by alynch
Modified: 2007-04-18 12:33 EDT (History)
0 users

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


Attachments (Terms of Use)

  None (edit)
Description alynch 2001-05-07 10:31:10 EDT
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 10:35:53 EDT
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 16:51:35 EDT
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 16:52:38 EDT
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.