Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] glibc update
Date: Wed, 18 Mar 2009 18:24:32
Message-Id: 200903182023.07033.alan.mckinnon@gmail.com
In Reply to: Re: [gentoo-user] glibc update by "Michael P. Soulier"
1 On Wednesday 18 March 2009 20:05:27 Michael P. Soulier wrote:
2 > > Sometimes, glibc is all fsck'ed up. Like sys-libs/glibc-2.9_p20081201-r1.
3 > > It looks great, till you start firefox and find that it doesn't run
4 > > anymore...
5 >
6 > So, how would I know, in general, whether it's safe to upgrade when it
7 > appears in my emerge output? Just ask here? My BSD box has a
8 > /usr/ports/UPDATING file that I check before upgrading ports for any
9 > notices...
10
11 Well, this is gentoo and we don't need no stinking Changelogs on gentoo :-)
12
13 Seriously, you are running a stable arch. All known issues should be resolved
14 by the time glibc hits stable. You can always askhere, or look at b.g.o for
15 any outstanding issues
16 >
17 > > No, glibc might need updated kernel headers. The compiler uses them when
18 > > building glibc - the headers tell the compiler what data structures,
19 > > functions etc look like so that the glibc it builds can talk to whatever
20 > > kernel you choose to run later.
21 >
22 > So will it use /usr/src/linux by default? If so then I'm ok...
23
24 No, it goes nowhere near that directory. It uses /usr/include/linux
25
26 From your responses it seems like you haven't figured out yet how the whole
27 compile/link/header thing works, so here's the (quickish) version:
28
29 If an application uses a library that is already built and located elsewhere,
30 the compiler needs to know what the data structures and functions in that
31 library look like. This information is in the library's source code, but to
32 make life for everyone infinitely easier, it is by convention separated out
33 into so-called header files. These files don't contain any executable source
34 code, just the definitions of things implemented by the library and publicly
35 available. The benefit is that to compile something, you only need the (small)
36 header files, not the full collection of (large) source code. Even on gentoo
37 we have this - when you emerge wget, it most certainly uses something provided
38 by glibc, yet the glibc source code is not available at emerge time - but the
39 glibc headers are.
40
41 These headers can technically be placed anywhere. The convention is to put
42 them in /usr/include and to tell your compiler to look there for headers.
43
44 glibc in turn also needs headers for things it uses, and amongst others this
45 is the kernel headers in /usr/include/linux/. This doesn't have to be the same
46 headers for the kernel you are running, it just has to be compatible headers.
47 To prove this, just reboot and choose a different kernel. Everything works,
48 but glibc could not possibly have been built against both kernel's sources.
49
50 --
51 alan dot mckinnon at gmail dot com

Replies

Subject Author
Re: [gentoo-user] glibc update "Michael P. Soulier" <msoulier@×××××××××××××.ca>