From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Othacehe Subject: bug#36882: Qemu 4.2.0 build for x86_64-linux fails Date: Mon, 24 Feb 2020 10:36:28 +0100 Message-ID: <87ftf0nx7n.fsf@gmail.com> References: <87k14gnqng.fsf@gmail.com> <87mu9b3crd.fsf@gnu.org> <87a75a5taw.fsf@gmail.com> <87o8tptu7u.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:36556) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6AAg-0007P8-RX for bug-guix@gnu.org; Mon, 24 Feb 2020 04:37:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6AAf-0003Tc-T7 for bug-guix@gnu.org; Mon, 24 Feb 2020 04:37:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46912) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6AAf-0003TV-Pl for bug-guix@gnu.org; Mon, 24 Feb 2020 04:37:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j6AAf-0004CW-Nf for bug-guix@gnu.org; Mon, 24 Feb 2020 04:37:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-reply-to: <87o8tptu7u.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 36882@debbugs.gnu.org Hey, > 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. WDYT? Mathieu