kernel source, kernel headers, and glibc headers

kernel source, kernel headers, and glibc headers

Post by Yan Seine » Mon, 21 Jan 2002 05:10:40



Could someone plese explain to me the proper way of upgrading a kernel?

I am trying to compile a generic 2.4.17 kernel on a RH 7.2 system.  While
the compile works, I've been told "never just untar kernel source in
/usr/src/" - I don't know why and how kernel headers and glibc headers
all work together.

AFAIK, RH does someting non-standard with header file locations, but I
have no idea what.

Any help would be greatly appreciated.

--Yan

 
 
 

kernel source, kernel headers, and glibc headers

Post by Peter T. Breue » Mon, 21 Jan 2002 06:19:54



> Could someone plese explain to me the proper way of upgrading a kernel?

Read the Kernel HOWTO. All there.

Peter

 
 
 

kernel source, kernel headers, and glibc headers

Post by Paul Kimot » Mon, 21 Jan 2002 06:35:33




> Could someone plese explain to me the proper way of upgrading a kernel?

> I am trying to compile a generic 2.4.17 kernel on a RH 7.2 system.  While
> the compile works, I've been told "never just untar kernel source in
> /usr/src/" - I don't know why and how kernel headers and glibc headers
> all work together.

The kernel README says:

:    Do NOT use the /usr/src/linux area! This area has a (usually
:    incomplete) set of kernel headers that are used by the library header
:    files.  They should match the library, and not get messed up by
:    whatever the kernel-du-jour happens to be.

The C library (glibc) needs certain bits of information from the kernel,
so we have the /usr/include/linux and /usr/include/asm directories, which
(somehow) contain header files from the kernel.

In the old days, /usr/include/{linux,asm} were symbolic links to
/usr/src/linux/include/{linux,asm}.  As the README says, this can lead to a
situation where the information in /usr/include/{linux,asm}/*.h files don't
match the library libc.so.6, which was built earlier.  In certain rare but
annoying cases, newly-built user-space programs might use these deviant
header files and (somehow) fail at runtime.

Nowadays, many distributions avoid this problem by copying the relevant
kernel header files into (regular directories) /usr/include/{linux,asm}.

--
Paul Kimoto
This message was originally posted on Usenet in plain text.  Any images,
hyperlinks, or the like shown here have been added without my consent,
and may be a violation of international copyright law.

 
 
 

1. glibc header files or kernel header files?

I have succesfully installed glibc 2.0.3 on my system. Just recently I have
tried to compile kernel 2.0.30 with it. I also added the pc speaker sound
driver and the newer version of ppp. The kernel compiles fine without the
pc speaker and ppp drivers but with it it fails. The cause appears to be that
the header files installed in /usr/include/sys by glibc conflict with the
header files in linu source tree. Which headers should I use.I tried to
use just the headers from glibc (I copyed all the sys/foo.h over the linux
header files) and the kernel wouldn't compile at all. So which should I use.
Thank you for yur time.

                                                James Simmons
--

2. Netscape colour in KDE

3. RH7.0 kernel-source vs kernel-headers

4. Switching Drives

5. Headers, Headers, whos got the Headers

6. NT 4 + Win95 + Linux?

7. kernel headers, SMP and glibc

8. Visual front end to cron

9. -=No Knoppix kernel headers and source (GPL Violation?)=-

10. Installing Kernel source and headers

11. -=Knoppix kernel headers and source=-

12. Quick question: can i install diffirent kernel headers to my Kernel version?

13. ELF + 1.3.x kernel -> kernel header can't be identified