[Top][All Lists]

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

bug#36882: Qemu 4.2.0 build for x86_64-linux fails

From: Ludovic Courtès
Subject: bug#36882: Qemu 4.2.0 build for x86_64-linux fails
Date: Mon, 24 Feb 2020 15:25:20 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)


Mathieu Othacehe <address@hidden> 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:
>  -> -iquote 
>  -> -I goes here
>  -> CPATH goes here
>  -> -isystem goes here
>  -> C_INCLUDE_PATH goes here
>  -> Hardcoded includes (gcc + glibc) goes here
> -> -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

On ‘core-updates’, I see:

--8<---------------cut here---------------start------------->8---
$ git log | head -3
commit 5afcb5caa53615c0a432e0c1781155398d747218
Author: Ludovic Courtès <address@hidden>
Date:   Sat Feb 22 21:39:27 2020 +0100
$ ./pre-inst-env guix environment -C -e '(@@ (gnu packages commencement) 
[env]$ gcc -v -x c -E /dev/null
Using built-in specs.
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'
 -E -quiet -v /dev/null -mtune=generic -march=x86-64
ignoring duplicate directory 
ignoring nonexistent directory "/no-gcc-local-prefix/include"
ignoring nonexistent directory 
#include "..." search starts here:
#include <...> search starts here:
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"
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


Incidentally, do we have problems building anything other than QEMU?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]