unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: Carl Dong <contact@carldong.me>
Cc: 37801@debbugs.gnu.org
Subject: bug#37801: Possible insight into issue #30756 #include_next bug
Date: Fri, 18 Oct 2019 02:03:44 +0200	[thread overview]
Message-ID: <20191018020344.78cbee48@scratchpost.org> (raw)
In-Reply-To: <xvTREYeVjwuadLzEDhqSwFNXRPLuxR08Q98lclES3tkQH13Drwv9EzhWNkXbR3XZN-Tc7KCLed7yhdThX8y09kfvqRorSSayyCrW8LkSoyc=@carldong.me>

[-- Attachment #1: Type: text/plain, Size: 2434 bytes --]

Hi Carl,

On Thu, 17 Oct 2019 21:56:44 +0000
Carl Dong <contact@carldong.me> wrote:

> Note that the reason mingw-w64-x86_64-6.0.0/include is in this list at all is
> because of the 'fix-env phase I added, which plucked it from CPATH and plopped
> it into CROSS_CPATH.

Yeah, I did the same in sunxi-tools--which was also broken after the core-updates
merge, but had been working fine before.
It's using an x86_64->ARM cross compiler.
But just changing it to CROSS_CPATH works, there.

> 3. Does this reveal something more fundamentally wrong with how we build our
> search paths in the first place that should be addressed

I think so.  I can't figure out why Guix is not just setting up CROSS_CPATH
on its own in the first place.
gnu/packages/cross-base.scm DOES have a search-path specification for CROSS_CPATH.

Notes:

* CPATH is something like "-I", but CPATH applies after all command-line "-I"s.
* C_INCLUDE_PATH, CPLUS_INCLUDE_PATH and OBJC_INCLUDE_PATH are something like
"-isystem", but they apply after all command-line "-isystem"s.

Note that an empty (colon-separated) element in those environment variables
means "current working directory".

https://gcc.gnu.org/onlinedocs/gcc-6.2.0/gcc/Directory-Options.html :

>If a standard system include directory, or a directory specified with
>-isystem, is also specified with -I, the -I option is ignored. The
>directory is still searched but as a system directory at its normal
>position in the system include chain. This is to ensure that GCC's
>procedure to fix buggy system headers and the ordering for the
>include_next directive are not inadvertently changed. If you really
>need to change the search order for system directories, use the
>-nostdinc and/or -isystem options. 

https://gcc.gnu.org/onlinedocs/cpp/Invocation.html#Invocation :

>The lookup order is as follows:
> For the quote form of the include directive, the directory of the current file is searched first.
> For the quote form of the include directive, the directories specified by -iquote options are searched in LTR order.
> Directories specified with -I options are scanned in left-to-right order.
> Directories specified with -isystem options are scanned in left-to-right order.
> Standard system directories are scanned[, except if -nostdinc[++] is specified].
> Directories specified with -idirafter options are scanned in left-to-right order. 

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-10-18  0:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17 21:56 bug#37801: Possible insight into issue #30756 #include_next bug Carl Dong
2019-10-18  0:03 ` Danny Milosavljevic [this message]
2019-10-18 14:02   ` Carl Dong
2019-10-19 12:53     ` Danny Milosavljevic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191018020344.78cbee48@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=37801@debbugs.gnu.org \
    --cc=contact@carldong.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).