error while build glibc using kernel headers

Justin P. Mattock justinmattock@gmail.com
Fri Dec 11 07:24:00 GMT 2009


On 12/10/09 22:29, 蔡述宪 wrote:
>>
>> ahh. I've never tried that before.
>> In this case not sure. you might run
>> into other issue with other *.h
>> from libselinux etc..(but could be wrong)
>>
>> Im thinking if using that option libc looks
>> for all *.h in that certain location i.g.
>> if you don't set --prefix=/usr everything
>> defaults to /usr/local/*
>>
>> Justin P. Mattock
>>
> I think "--prefix=/usr" specifies  the place glibc will be installed,
> but not where to look for header files during build.
> "--with-headers=/usr/src/linux/include" does this.
> Following is some instruction from INSTALL:
>
> --with-headers=DIRECTORY'
>      Look for kernel header files in DIRECTORY, not `/usr/include'.
>      Glibc needs information from the kernel's private header files.
>      Glibc will normally look in `/usr/include' for them, but if you
>      specify this option, it will look in DIRECTORY instead.
>
>      This option is primarily of use on a system where the headers in
>      `/usr/include' come from an older version of glibc.  Conflicts can
>      occasionally happen in this case.  Note that Linux libc5 qualifies
>      as an older version of glibc.  You can also use this option if you
>      want to compile glibc with a newer set of kernel headers than the
>      ones found in `/usr/include'.
>
>
> Have u tried to build glibc with explicitly specified kernel headers?
>

yeah so if you don't use --prefix=/usr
then your header files are going somewhere
else right?
in this case you would need to specify with
--with-headers

In any case I try to keep things simple
by defining --prefix=/usr.

as for the last question, no.
probably more of a pain if anything
i.g. given the app/lib you might need
to adjust the Makefile to point
in the right direction. for libc
--with-headers seems to be it, but if you use
--with-headers=/opt/
then libc shoots right to there for everything
(could be wrong though)instead of looking at
/opt/
and
/usr/include/
to do it's building.

Justin P. Mattock




More information about the Libc-help mailing list