1 |
> |
2 |
> I'm trying to get to the bottom of where the /usr/src/linux symlink |
3 |
> should |
4 |
> point to. All the gentoo instructions say it should be to the sources for |
5 |
> the current kernel, and I've read on the gentoo forums that certain |
6 |
> modules |
7 |
> won't work correctly without that. However, the kernel README |
8 |
> specifically |
9 |
> states that the symlink should point to the headers your libraries link |
10 |
> against, not the current kernel. Should I (strictly speaking) emerge |
11 |
> glibc |
12 |
> after I install a new kernel? |
13 |
|
14 |
No. The kernel headers are rather sensibly maintained by the linux-headers |
15 |
(or linux26-headers) packages in portage, hence packages that are |
16 |
sensitive to the kernel headers, such as glibc, will not be overly |
17 |
concerned with what your "kernel du jour" happens to be. |
18 |
|
19 |
Two exceptions I can think of to that statement are: |
20 |
|
21 |
1) Building NPTL in glibc (that part alone seems to make use of the |
22 |
headers provided by the kernel at /usr/src/linux, at least it did last |
23 |
time I checked) |
24 |
2) Building kernel modules outside of the tree (nvidia-kernel for instance) |
25 |
|
26 |
Therefore, the docs are quite right. Keep /usr/src/linux as a symlink |
27 |
pointing to the sources for your currently running kernel as a general |
28 |
rule. You won't need to update glibc on account of building a new kernel, |
29 |
however I would suggest you rebuild glibc if sys-kernel/linux-headers is |
30 |
upgraded at any point :) |
31 |
|
32 |
The latest stable versions of either package at the time of writing is: |
33 |
|
34 |
* sys-kernel/linux-headers-2.4.21-r1 |
35 |
* sys-kernel/linux26-headers-2.6.8.1 |
36 |
|
37 |
_Never_ build glibc against headers that are newer than a kernel that you |
38 |
intend to build and run (an unlikely event in any case). If you never use |
39 |
2.4, then it is safe to migrate to linux26-headers and rebuild glibc |
40 |
assuming the aforementioned caveat is born in mind. |
41 |
|
42 |
Cheers, |
43 |
|
44 |
--Kerin Francis Millar |