Bug 20210 - Mangled kernel headers and external modules
Mangled kernel headers and external modules
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Michael K. Johnson
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2000-11-02 08:54 EST by rsousa
Modified: 2007-04-18 12:29 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-12-14 22:08:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description rsousa 2000-11-02 08:54:50 EST
This is not a new problem but recently it started to affect me more. It
concerns the way redhat
(and others) decided to organize the kernel headers to match the running

By chanching files with information needed to properly compile modules
external to the kernel
tree you are making it very hard to support your distributions. What I
propose is that the 
headers a  user sees (by including them) are exactly the same he would
expect in the official 
kernel tree with a similar configuration. Solutions to the problem:

1. Have different kernel-headers packages one for each kernel image package
which install the files to different /usr/src/linux-version directories.
The version name would be the same as for the kernel (2.2.17-smp-i686).
Links are created at boot or install time to match the kernel and the

2. The kernel image package also contains the respective kernel-headers so
that they are always in sync. The rest as above.

3. The kernel-headers package installs all the possible versions of the
files needed to support different kernel versions (autoconf, config,
version, modversion,...) with the different version names (up-i386,
up-i586, smp-i486,...). Each of these headers is an exact copy of the ones
in an official kernel tree after being configured (make config dep) with
the configuration file you used to compile the kernel. Now at boot time, or
as a post-install script for the kernel image packages, a bunch of links is
made in linux/include/linux so that version.h, config.h, autoconf.h,
modversions.h point to the currect version. This way external modules
makefiles only have to support the official kernel tree and not n
distributions x m versions.
Comment 1 Arjan van de Ven 2000-11-02 09:20:47 EST
Linus has spoken on this issue, and the consensus was that, the headers of the
currently running kernel would be accessible from
/lib/modules/`uname -r`/build/include

RH7 also uses this convention, and I wonder what more you would need.

Comment 2 rsousa 2000-11-03 15:40:24 EST
Yes, that solution would do. I still have some questions though:
Is this done for 2.2 kernels also?
Which redhat 7.0 packages contain the headers files for each of the kernel image
Comment 3 Arjan van de Ven 2001-01-15 13:34:22 EST
The kernel-source package  should install this all.

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