Bug 20210 - Mangled kernel headers and external modules
Summary: Mangled kernel headers and external modules
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel   
(Show other bugs)
Version: 7.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Michael K. Johnson
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2000-11-02 13:54 UTC by rsousa
Modified: 2007-04-18 16:29 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-12-15 03:08:07 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 rsousa 2000-11-02 13:54:50 UTC
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 14:20:47 UTC
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 20:40:24 UTC
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 18:34:22 UTC
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.