From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#30756: gcc7 doesn't find stdlib.h Date: Fri, 04 May 2018 17:28:26 +0200 Message-ID: <87k1sjsan9.fsf@gnu.org> References: <87fu59zagv.fsf@gnu.org> <5212cd7e-5f52-2826-2f65-9b66af4e73ad@mortis.eu> <87d0ybvbep.fsf@gnu.org> <36478fc2-98e7-0ebd-9048-7193fd240f5c@mortis.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fEcdv-0005QG-KQ for bug-guix@gnu.org; Fri, 04 May 2018 11:29:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fEcdq-0003Im-MD for bug-guix@gnu.org; Fri, 04 May 2018 11:29:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:42004) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fEcdq-0003Ih-IS for bug-guix@gnu.org; Fri, 04 May 2018 11:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fEcdq-0006bB-9d for bug-guix@gnu.org; Fri, 04 May 2018 11:29:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <36478fc2-98e7-0ebd-9048-7193fd240f5c@mortis.eu> (Giel van Schijndel's message of "Fri, 4 May 2018 16:30:08 +0200") 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.org@gnu.org Sender: "bug-Guix" To: Giel van Schijndel Cc: 30756@debbugs.gnu.org Giel van Schijndel skribis: > On 04-05-18 14:43, Ludovic Court=C3=A8s wrote: [...] >> Giel, does the patch below work for you? > > No, just by itself it doesn't. It does add 'CPATH', but doesn't drop > 'C_INCLUDE_PATH' and 'CPLUS_INCLUDE_PATH'. That=E2=80=99s probably because your package still includes gcc@5 as an imp= licit input via =E2=80=98cmake-build-system=E2=80=99. You could use a procedure like this to remove implicit inputs and add your own GCC variant: --8<---------------cut here---------------start------------->8--- (define (package-with-specific-compiler p compiler) "Return P modified to be built with COMPILER." (package (inherit p) (arguments `(#:implicit-inputs? #f ,@(package-arguments p))) (native-inputs `(("compiler" ,compiler) ,@(package-native-inputs p))) (inputs (append (package-inputs p) (alist-delete "gcc" (standard-packages)))))) --8<---------------cut here---------------end--------------->8--- =E2=80=A6 where =E2=80=98standard-packages=E2=80=99 comes from (guix build-= system gnu). > But I can no longer build with warnings treated as error at that point, > because I'm getting a ton of warnings inside headers of dependencies > now. With either of '-Wno-error' or '-w' I can build now. Yeah, that=E2=80=99s a downside (that was the reason why we switched from C= PATH to C_INCLUDE_PATH a while back), but it could be a reasonable workaround for now. > Would it be possible to filter the list of directories added to these > environment variables to exclude those already present in GCC's default > search path? I still don=E2=80=99t fully understand the issue actually. What=E2=80=99s = wrong with having these directories appear several times in the search path? The difficulty here will be that search path environment variables in Guix are populated automatically based on their specifications, so it=E2=80= =99s not all that clear to me where that filtering would happen. Thanks, Ludo=E2=80=99.