LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices



Reply
 
Search this Thread
Old 01-15-2009, 01:23 PM   #1
max_cherry
LQ Newbie
 
Registered: Oct 2008
Location: Sussex, UK
Distribution: fedora
Posts: 6

Rep: Reputation: 0
RHEL4 Kernel -devel/headers packages ...missing directories


I am playing with a vanilla installation of RHEL4 and have noticed that the traditional build space /usr/src/kernels/<version> providing the source tree for recompiling the kernel does not exist. The symlink to the folder exists as expected in /lib/modules/<version>/build/ but it is red and broken.
I have also seen that the -devel package is not installed. Is module compilation administered via the kernel-headers package, which is installed, and provides headers at /usr/include/? I am not exactly sure what the difference in purpose is between the -devel source tree, and these headers in /usr/include...
Have redhat not installed the -devel package on purpose so that only subscription clients can install, which would limit the ability to provide support for devices needing a recompile...
Would installing the srpm kernel package(s) create the apparant missing directories?
Cheers
 
Old 01-15-2009, 01:47 PM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 15,099

Rep: Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719
Quote:
Originally Posted by max_cherry View Post
I am playing with a vanilla installation of RHEL4 and have noticed that the traditional build space /usr/src/kernels/<version> providing the source tree for recompiling the kernel does not exist. The symlink to the folder exists as expected in /lib/modules/<version>/build/ but it is red and broken.
I have also seen that the -devel package is not installed. Is module compilation administered via the kernel-headers package, which is installed, and provides headers at /usr/include/? I am not exactly sure what the difference in purpose is between the -devel source tree, and these headers in /usr/include...
Have redhat not installed the -devel package on purpose so that only subscription clients can install, which would limit the ability to provide support for devices needing a recompile...
Would installing the srpm kernel package(s) create the apparant missing directories?
Cheers
No, as a rule the kernel development libraries are separately, since not everyone wants or needs them. Generic development stuff (C, Perl, etc.), can get installed, but the kernel headers go into a different location, not /usr/include.

The kernel source should be on your RHEL installation media. Pop it in, and do a "find <path to cdrom> -name kernel*". Install it with "rpm -i <full path and file name to kernel devel package.rpm file>"
 
Old 01-15-2009, 06:05 PM   #3
max_cherry
LQ Newbie
 
Registered: Oct 2008
Location: Sussex, UK
Distribution: fedora
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TB0ne View Post
No, as a rule the kernel development libraries are separately, since not everyone wants or needs them. Generic development stuff (C, Perl, etc.), can get installed, but the kernel headers go into a different location, not /usr/include.

The kernel source should be on your RHEL installation media. Pop it in, and do a "find <path to cdrom> -name kernel*". Install it with "rpm -i <full path and file name to kernel devel package.rpm file>"
Yes of course thanks, I am being really thick there, the devel package is in the installation rpms... I was just expecting it to have been installed by default...
I do still have this kernel-headers package installed however, for which a -ql of the package lists this whole bunch of files/directories installed below /usr/include/ I am not sure of the difference between the source tree files (devel package - /usr/src/kernel...) and these kernel-header files... Perhaps the source tree is for recompiling the kernel (gconfig etc) and the headers (/usr/include) are for compiling modules to place in /lib/modules/kernel...
To further complicate matters I have read that it is possible to compile modules by the custom makefile route on redhat, and using what are also referred to as kernel header files which should be in /lib/modules/version/build/, which does exist on my installation, but is empty. I am going to install the devel package and see what happens...
 
Old 01-15-2009, 10:09 PM   #4
max_cherry
LQ Newbie
 
Registered: Oct 2008
Location: Sussex, UK
Distribution: fedora
Posts: 6

Original Poster
Rep: Reputation: 0
Yes, installing the rpm-devel package has created the source tree at /usr/src/kernels/... so my question now for any kind soul is what is the purpose of the kernel-headers package with its files at /usr/include/?
and its RHEL5, not RHEL4...
 
Old 01-15-2009, 10:53 PM   #5
max_cherry
LQ Newbie
 
Registered: Oct 2008
Location: Sussex, UK
Distribution: fedora
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by max_cherry View Post
Yes, installing the rpm-devel package has created the source tree at /usr/src/kernels/... so my question now for any kind soul is what is the purpose of the kernel-headers package with its files at /usr/include/?
and its RHEL5, not RHEL4...
Got it...
"The kernel-headers package contains the C header files for this Linux
kernel. You may need this package to build a program from source.
Unlike previous Red Hat kernels, you do not need to install this package
to install the kernel-source package. You may only install one
kernel-headers package and it may be from any kernel (preferrably the
newest availabel kernel, even if you are running an older kernel).
When building kernel modules, be sure that they are not using the
headers from this package, but are using the headers from the appropriate
kernel source tree (the kernel-source package). When building programs,
be sure they are using these header files and not the headers from a
particular kernel's tree."
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic removal of kernel headers package when kernel packages are removed bgoodr Debian 3 12-30-2008 09:14 PM
Kernel-devel, kernel-headers mickeyboa Mandriva 4 03-02-2007 12:44 AM
Am I missing some stuff in /build/ ? Kernel Headers?!?!? yttrium88 Linux - Newbie 1 10-28-2006 09:40 PM
Missing Kernel Headers utku Debian 16 02-09-2005 03:20 AM
devel packeges install. but all my source headers are missing !!! qwijibow Linux - Software 3 05-26-2004 01:21 AM


All times are GMT -5. The time now is 11:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration