On Mon, Aug 21, 2017 at 09:55:18PM +0200, to...@tuxteam.de wrote: > On Mon, Aug 21, 2017 at 02:12:05PM -0500, Dutch Ingraham wrote: > > On 08/21/2017 09:06 AM, Kushal Kumaran wrote: > > > Dutch Ingraham <s...@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? > > Exactly. In RH, the "default" is under /usr/lib, /usr/include, in Debian, > there's for every installed architecture /usr/*/$ARCH. This provides an > uniform structure, independent of the "default" arch. The change is a bit > more difficult, but the result is cleaner, as far as I understand.
Excellent! Thanks. > > This eases co-installing cross compilers for other architectures too, > > > >> 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/ ? > > I think it is a configuration option when building gcc and friends. OK - this answers my questions - thanks again! > > Cheers > -- tomás >