From: "Ludovic Courtès" <ludo@gnu.org>
To: Mathieu Othacehe <m.othacehe@gmail.com>
Cc: 36882@debbugs.gnu.org
Subject: bug#36882: Qemu 4.2.0 build for x86_64-linux fails
Date: Mon, 24 Feb 2020 15:25:20 +0100 [thread overview]
Message-ID: <87tv3gm59r.fsf@gnu.org> (raw)
In-Reply-To: <87ftf0nx7n.fsf@gmail.com> (Mathieu Othacehe's message of "Mon, 24 Feb 2020 10:36:28 +0100")
Hi,
Mathieu Othacehe <m.othacehe@gmail.com> skribis:
>> So is it expected that C_INCLUDE_PATH comes before the hard-coded GCC
>> include directory? How can we work around that?
>
> Turns out, the best source of documentation here is
> gcc/incpath.c. Here's a summary of my understanding.
>
> Header search list:
>
> * QUOTE
> -> -iquote
> * BRACKET
> -> -I goes here
> -> CPATH goes here
> * SYSTEM
> -> -isystem goes here
> -> C_INCLUDE_PATH goes here
> -> Hardcoded includes (gcc + glibc) goes here
> * AFTER
> -> -idirafter goes here.
>
> Duplicates inside SYSTEM are deleted, the first occurence is kept. So as
> long as we have glibc in C_INCLUDE_PATH it will trigger deletion of
> glibc in hardcoded includes and AFTER section.
>
> So I can see only two solutions here.
>
> 1. Go back to using CPATH (sad!), because when there is duplication
> between BRACKET and SYSTEM, the include from SYSTEM is kept (why it
> works on master).
>
> 2. Find a way to remove glibc from C_INCLUDE_PATH, but I have no clue
> how to do this properly. Maybe using some kind of filter on
> search-path-specifications.
I’d rather go for #2. To do that, we could modify the ‘set-paths’ phase
to manually remove glibc from C_INCLUDE_PATH (fragile), or we could
modify GCC (perhaps removing the ‘remove_duplicates’ call for SYSTEM).
Either way, this wouldn’t work well with ‘guix environment’, where glibc
ends up in /gnu/store/…-profile, so it does not appear as duplicate to
GCC.
On ‘core-updates’, I see:
--8<---------------cut here---------------start------------->8---
$ git log | head -3
commit 5afcb5caa53615c0a432e0c1781155398d747218
Author: Ludovic Courtès <ludo@gnu.org>
Date: Sat Feb 22 21:39:27 2020 +0100
$ ./pre-inst-env guix environment -C -e '(@@ (gnu packages commencement) coreutils-final)'
[env]$ gcc -v -x c -E /dev/null
Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-unknown-linux-gnu
Configured with:
Thread model: posix
gcc version 7.5.0 (GCC)
COLLECT_GCC_OPTIONS='-v' '-E' '-mtune=generic' '-march=x86-64'
/gnu/store/0pjrnr8vhp94ykvarysd9wg7hcvfqkl5-gcc-7.5.0/libexec/gcc/x86_64-unknown-linux-gnu/7.5.0/cc1 -E -quiet -v /dev/null -mtune=generic -march=x86-64
ignoring duplicate directory "/gnu/store/k9l4v4530p1a69j8qs0aijbmn8lwak20-profile/include"
ignoring nonexistent directory "/no-gcc-local-prefix/include"
ignoring nonexistent directory "/gnu/store/adrw71v03nawqwyblxc0mdhcc41j5vnn-gcc-7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0/../../../../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/gnu/store/k9l4v4530p1a69j8qs0aijbmn8lwak20-profile/include
/gnu/store/adrw71v03nawqwyblxc0mdhcc41j5vnn-gcc-7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0/include
/gnu/store/adrw71v03nawqwyblxc0mdhcc41j5vnn-gcc-7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0/include-fixed
/gnu/store/ccjj5wg0qkjs1zfjr98nhb8cpr434izw-glibc-2.31/include
End of search list.
# 1 "/dev/null"
# 1 "<built-in>"
# 1 "<command-line>"
# 31 "<command-line>"
# 1 "/gnu/store/k9l4v4530p1a69j8qs0aijbmn8lwak20-profile/include/stdc-predef.h" 1 3
# 32 "<command-line>" 2
# 1 "/dev/null"
COMPILER_PATH=/gnu/store/0pjrnr8vhp94ykvarysd9wg7hcvfqkl5-gcc-7.5.0/libexec/gcc/x86_64-unknown-linux-gnu/7.5.0/:/gnu/store/0pjrnr8vhp94ykvarysd9wg7hcvfqkl5-gcc-7.5.0/libexec/gcc/x86_64-unknown-linux-gnu/7.5.0/:/gnu/store/0pjrnr8vhp94ykvarysd9wg7hcvfqkl5-gcc-7.5.0/libexec/gcc/x86_64-unknown-linux-gnu/:/gnu/store/adrw71v03nawqwyblxc0mdhcc41j5vnn-gcc-7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0/:/gnu/store/adrw71v03nawqwyblxc0mdhcc41j5vnn-gcc-7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/
LIBRARY_PATH=/gnu/store/k9l4v4530p1a69j8qs0aijbmn8lwak20-profile/lib/:/gnu/store/k9l4v4530p1a69j8qs0aijbmn8lwak20-profile/lib/:/gnu/store/adrw71v03nawqwyblxc0mdhcc41j5vnn-gcc-7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0/:/gnu/store/adrw71v03nawqwyblxc0mdhcc41j5vnn-gcc-7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0/../../../:/gnu/store/ccjj5wg0qkjs1zfjr98nhb8cpr434izw-glibc-2.31/lib
COLLECT_GCC_OPTIONS='-v' '-E' '-mtune=generic' '-march=x86-64'
--8<---------------cut here---------------end--------------->8---
Looking at ‘cppdefault.c’ in GCC, I don’t see where glibc-2.31/include
comes from; it seems that ‘INCLUDE_DEFAULTS’ is undefined on glibc
systems.
Thoughts?
Incidentally, do we have problems building anything other than QEMU?
Thanks,
Ludo’.
next prev parent reply other threads:[~2020-02-24 14:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-31 20:03 bug#36882: QEMU 4 fails to build for x86_64-linux Leo Famulari
2019-08-01 14:14 ` Marius Bakke
2019-08-23 12:58 ` Ludovic Courtès
2020-02-21 11:09 ` bug#36882: Qemu 4.2.0 build for x86_64-linux fails Mathieu Othacehe
2020-02-21 20:29 ` Ludovic Courtès
2020-02-22 19:13 ` Mathieu Othacehe
2020-02-23 11:32 ` Ludovic Courtès
2020-02-24 9:36 ` Mathieu Othacehe
2020-02-24 14:25 ` Ludovic Courtès [this message]
2020-02-25 14:34 ` Mathieu Othacehe
2020-02-25 14:46 ` Mathieu Othacehe
2020-02-26 20:55 ` Ludovic Courtès
2020-03-02 22:01 ` Marius Bakke
2020-03-03 7:39 ` Mathieu Othacehe
2020-03-03 11:55 ` Mathieu Othacehe
2020-03-03 20:26 ` Marius Bakke
2020-03-03 20:37 ` Marius Bakke
2020-03-03 21:09 ` Jan (janneke) Nieuwenhuizen
2020-03-04 8:16 ` Mathieu Othacehe
2020-03-05 16:36 ` Ludovic Courtès
2020-03-05 16:42 ` Marius Bakke
2020-03-06 7:25 ` Mathieu Othacehe
2020-02-26 21:12 ` Marius Bakke
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=87tv3gm59r.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=36882@debbugs.gnu.org \
--cc=m.othacehe@gmail.com \
/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).