# Why don't the kernel headers match the kernel sources?

## jorgepeixoto

Hi. I want to understand

1) Why are the kernel sources and kernel headers separate packages?

2) Whey don't their versions match?

At present, the latest stable (on x86) gentoo-sources is 2.6.25-r7, while the latest stable (on x86) linux-headers is 2.6.23-r3

This has practical applications. If I have a piece of hardware that isn't supported by the latest stable kernel and I want to try a more recent kernel, should I try a more recent linux-headers too?

----------

## IvanMajhen

Glibc depends on kernel headers.

When you compile kernel it uses headers from kernel source.

----------

## jorgepeixoto

Wouldn't it make sense for glibc to use exactly the same headers as the kernel?

And, if I upgrade the kernel in hope to get support for a piece of hardware, should I upgrade the linux-headers too?

----------

## eccerr0r

I think the main reason is someone (more than one) (person on a slow link) probably complained why emerging linux-headers pulled in a 40MB file (namely, the full kernel source tree) when only a few MB are really needed.

Just speculating, also provides some version stability, so a zillion things don't get dependency outdated whenever a kernel release is made...

----------

## gentoo_ram

It's the way it currently is because Linus himself requested it!

http://www.uwsg.iu.edu/hypermail/linux/kernel/0007.3/0587.html

----------

