[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Relocated Header Directories



On 08/21/2017 09:06 AM, Kushal Kumaran wrote:
> Dutch Ingraham <stoa@gmx.us> writes:
>
>> Hi everyone -
>>
>> It seems Debian has moved some header directories, like /usr/include/bits (and
>> sys, and asm, etc.) from /usr/include/ to, e.g., /usr/include/i386-linux-gnu/bits/
>> (arch-specific).
>>
>> My first question is:  Why?
>>
> This is so that headers that are architecture independent are separated
> from headers with are architecture dependent.  Specifically, that they
> are available at different paths.  This lets you install the headers
> (and libraries) for different architectures simultaneously, which is
> essential for debian's multiarch support.
Thanks for the response.  Since both you and Tomas are saying the same
thing,
maybe I'm not understanding something.  For example, Fedora (and Gentoo,
etc. )
also installs glibc for both 32- and 64-bit on the same machine, but
they have not
relocated these header files.  So are you saying this was just Debian's
method
of solving the multi-arch issue, and other distributions solved in some
other way?
>
>> My second question is: How does this work?  There are no symlinks, yet a file
>> like /usr/include/signal.h, has the standard "#include <bits/sigset.h>", yet
>> that path does not exist with the change noted above.  So how is this file
>> included?
>>
>> Any enlightenment is appreciated.
> There are several directories configured for searching header files.
> The command "gcc -xc -E -v - < /dev/null" will print those paths out.
> For my system, the directories are:
>
>  /usr/lib/gcc/x86_64-linux-gnu/6/include
>  /usr/local/include
>  /usr/lib/gcc/x86_64-linux-gnu/6/include-fixed
>  /usr/include/x86_64-linux-gnu
>  /usr/include
>
> The list will be different for you because you appear to be running
> i386.
I'm not seeing some of these paths in vanilla gcc.  Does this mean
Debian patched
gcc as well to add the "Debian" path of /usr/include/x86_64-linux-gnu/ ?

Thanks again to you and Tomas for your responses.


Reply to: