Uff (Povzdech) [ Was Kernel 2.4.18-17.7.x nejde prelozit s glibc-kernheaders-2.4-7.16 ]

Ondrej Sury sury.ondrej na globe.cz
Úterý Říjen 29 15:08:51 CET 2002


"Miroslav BENES" <mbenes na tenez.cz> writes:

>> Nenasel jsem v archivu, co ze jste to presne udelal, takze to upozorneni
>> napisu:
>> 
>> V /usr/include *musi* byt hlavicky jadra se kterym byla glibc kompilovana.
>> 
>> V _ZADNEM_ pripade tam nesmi byt hlavicky aktualniho jadra se kterym glibc
>> kompilovana nebyla.
>
> Mozna se ptam blbe, ale proc ?
>
>
> a) hlavickove soubory jsou stejne - pak je to jedno
>
> b) nejsou stejne - ale pak by kompilovana aplikace mela spis 
> znat interface jadra nad kterym pobezi, ne ?
>
>
>
> A co se tyce glibc, jeji interface je prece v balicku glibc-
> devel, takze vazba na "stare" hlavicky jadra mi nepripada 
> logicka.

Staci takhle?

/usr/share/doc/libc6/README.Debian.gz:

Q1: Why does the Debian libc6-dev package create /usr/include/linux and 
/usr/include/asm directories containing header files from a specific 
kernel, instead of using the "established" convention of making those 
directories into symlinks pointing to the currently installed kernel?

A1: Occasionally, changes in the kernel headers cause problems with
the compilation of libc and of programs that use libc.  To ensure that
users are not affected by these problems, we configure libc to use the
headers from a kernel that is known to work with libc and the programs
that depend on stable kernel headers.
[...]
Q3: My program is trying to use a kernel header that is in libc-dev, and
it is causing problems. (or) Why are the kernel headers not the same for
all architectures in Debian, for a given version of libc-dev?

A3: For starters, you should never use kernel headers directly from user
space programs. You cannot be guaranteed a consistent interface across
different versions of the kernel, much less across architectures (even for
the same version of kernel source).

Kernel headers are included with libc-dev _only_ to support those headers
in libc-dev. They are not there for userspace programs to include. If you
need kernel headers, then use one of the provided kernel-headers-x.x.x
packages provided for each architectures, or include the kernel headers
(or just the parts of the headers) you need directly in your source for
compilation. Only this way can you ensure a consistent state.
[...]

-- 
Ondrej Sury - CIO                   Globe Internet s.r.o. http://globe.cz/
Tel: +420(2)35365000 Fax: +420(2)35365009     Planickova 1, 162 00 Praha 6


Další informace o konferenci Linux