Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #185666

Re: Relocated Header Directories

From <tomas@tuxteam.de>
Newsgroups linux.debian.user
Subject Re: Relocated Header Directories
Date 2017-08-21 22:00 +0200
Message-ID <uh11F-bc-33@gated-at.bofh.it> (permalink)
References <ugV5V-4XE-49@gated-at.bofh.it> <ugVyX-5o7-39@gated-at.bofh.it> <uh0oV-8mG-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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 <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?

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.

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.

Cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlmbOqYACgkQBcgs9XrR2kaLfgCfQFrgdJMoQILmwppzdtVNRWWx
/14An3zfOdkFainyDcyaCUws9Qfrsmmr
=IGz4
-----END PGP SIGNATURE-----

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Relocated Header Directories Dutch Ingraham <stoa@gmx.us> - 2017-08-21 15:40 +0200
  Re: Relocated Header Directories Kushal Kumaran <kushal@locationd.net> - 2017-08-21 16:10 +0200
    Re: Relocated Header Directories <tomas@tuxteam.de> - 2017-08-21 16:20 +0200
    Re: Relocated Header Directories Dutch Ingraham <stoa@gmx.us> - 2017-08-21 21:20 +0200
      Re: Relocated Header Directories <tomas@tuxteam.de> - 2017-08-21 22:00 +0200
        Re: Relocated Header Directories Dutch Ingraham <stoa@gmx.us> - 2017-08-21 22:10 +0200
      Re: Relocated Header Directories Christian Seiler <christian@iwakd.de> - 2017-08-22 07:10 +0200
        Re: Relocated Header Directories Mario Castelán Castro <marioxcc.MT@yandex.com> - 2017-08-22 16:50 +0200
          Re: Relocated Header Directories Christian Seiler <christian@iwakd.de> - 2017-08-22 17:00 +0200
            Re: Relocated Header Directories Mario Castelán Castro <marioxcc.MT@yandex.com> - 2017-08-22 17:00 +0200
  Re: Relocated Header Directories <tomas@tuxteam.de> - 2017-08-21 16:10 +0200
    Re: Relocated Header Directories Dutch Ingraham <stoa@gmx.us> - 2017-08-21 21:00 +0200

csiph-web