LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (http://www.linuxquestions.org/questions/red-hat-31/)
-   -   RHEL4 Kernel -devel/headers packages ...missing directories (http://www.linuxquestions.org/questions/red-hat-31/rhel4-kernel-devel-headers-packages-missing-directories-697552/)

max_cherry 01-15-2009 01:23 PM

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

TB0ne 01-15-2009 01:47 PM

Quote:

Originally Posted by max_cherry (Post 3410047)
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>"

max_cherry 01-15-2009 06:05 PM

Quote:

Originally Posted by TB0ne (Post 3410080)
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...

max_cherry 01-15-2009 10:09 PM

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

max_cherry 01-15-2009 10:53 PM

Quote:

Originally Posted by max_cherry (Post 3410553)
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."


All times are GMT -5. The time now is 07:54 AM.