On Wednesday 18 March 2009 20:05:27 Michael P. Soulier wrote:
> > Sometimes, glibc is all fsck'ed up. Like sys-libs/glibc-2.9_p20081201-r1.
> > It looks great, till you start firefox and find that it doesn't run
> > anymore...
>
> So, how would I know, in general, whether it's safe to upgrade when it
> appears in my emerge output? Just ask here? My BSD box has a
> /usr/ports/UPDATING file that I check before upgrading ports for any
> notices...

Well, this is gentoo and we don't need no stinking Changelogs on gentoo :-)

Seriously, you are running a stable arch. All known issues should be resolved 
by the time glibc hits stable. You can always askhere, or look at b.g.o for 
any outstanding issues
>
> > No, glibc might need updated kernel headers. The compiler uses them when
> > building glibc - the headers tell the compiler what data structures,
> > functions etc look like so that the glibc it builds can talk to whatever
> > kernel you choose to run later.
>
> So will it use /usr/src/linux by default? If so then I'm ok...

No, it goes nowhere near that directory. It uses /usr/include/linux

From your responses it seems like you haven't figured out yet how the whole 
compile/link/header thing works, so here's the (quickish) version:

If an application uses a library that is already built and located elsewhere, 
the compiler needs to know what the data structures and functions in that 
library look like. This information is in the library's source code, but to 
make life for everyone infinitely easier, it is by convention separated out 
into so-called header files. These files don't contain any executable source 
code, just the definitions of things implemented by the library and publicly 
available. The benefit is that to compile something, you only need the (small) 
header files, not the full collection of (large) source code. Even on gentoo 
we have this - when you emerge wget, it most certainly uses something provided 
by glibc, yet the glibc source code is not available at emerge time - but the 
glibc headers are.

These headers can technically be placed anywhere. The convention is to put 
them in /usr/include and to tell your compiler to look there for headers.

glibc in turn also needs headers for things it uses, and amongst others this 
is the kernel headers in /usr/include/linux/. This doesn't have to be the same 
headers for the kernel you are running, it just has to be compatible headers. 
To prove this, just reboot and choose a different kernel. Everything works, 
but glibc could not possibly have been built against both kernel's sources.

-- 
alan dot mckinnon at gmail dot com

Reply via email to