From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id iHWgLwDKrl+aOgAA0tVLHw (envelope-from ) for ; Fri, 13 Nov 2020 18:01:36 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id iGZ8KwDKrl9VRQAA1q6Kng (envelope-from ) for ; Fri, 13 Nov 2020 18:01:36 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 27EEB940876 for ; Fri, 13 Nov 2020 18:01:36 +0000 (UTC) Received: from localhost ([::1]:58244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kddO4-000274-S3 for larch@yhetil.org; Fri, 13 Nov 2020 13:01:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39922) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kddNe-00024m-CR for bug-guix@gnu.org; Fri, 13 Nov 2020 13:01:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37757) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kddNe-0001yY-16 for bug-guix@gnu.org; Fri, 13 Nov 2020 13:01:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kddNd-0001hR-QW for bug-guix@gnu.org; Fri, 13 Nov 2020 13:01:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#43579: g++ does not provide std::fegetround Resent-From: Miguel =?UTF-8?Q?=C3=81ngel?= Arruga Vivas Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 13 Nov 2020 18:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43579 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 43579-submit@debbugs.gnu.org id=B43579.16052904226477 (code B ref 43579); Fri, 13 Nov 2020 18:01:01 +0000 Received: (at 43579) by debbugs.gnu.org; 13 Nov 2020 18:00:22 +0000 Received: from localhost ([127.0.0.1]:49303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kddN0-0001gP-A0 for submit@debbugs.gnu.org; Fri, 13 Nov 2020 13:00:22 -0500 Received: from mail-wm1-f47.google.com ([209.85.128.47]:35137) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kddMv-0001g3-S1 for 43579@debbugs.gnu.org; Fri, 13 Nov 2020 13:00:21 -0500 Received: by mail-wm1-f47.google.com with SMTP id w24so9532419wmi.0 for <43579@debbugs.gnu.org>; Fri, 13 Nov 2020 10:00:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=vPCjAxiZWMaXT1if/w/8QrmdEAmRyIhA9bJH5TR9yPE=; b=iUTakX0GI/Ee9kRSY8goOvBsFOtlnlTHh8BpunUjlOZe0+3y4mpcqLY8EM58WTkLjd lQdzo/qbnlsIDWsYUic0FaPfT1uyzQU11QFh6XTEqaJq0wHWwus2Mm9YpuLH9ekkQXrU EOWgEsnPeGakxcRK0kiyMbnduy8rAsDtO9JTYm9GuYnn8XoWTkoFPw+Q8FdUL2dpNCyB qt5ClRamrO4y0tlL2OjVathfdjh/pCpLON+vHvRCyacm0JD7yHOwkKFDMEdjHqh1Vd2j VXg7Juaa0JVWbZ027xy0RCinTOgmCfs4nq5CD3SPNt+ejFDadM7T5sGBn6MVxC40vPt8 APTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=vPCjAxiZWMaXT1if/w/8QrmdEAmRyIhA9bJH5TR9yPE=; b=pfsmWsZoOBY1hg97HLvVK+lMM2lb3pmdj1pmd6Mu4aX6SxPiH0NK+aFqqNHwlBWNq7 CnYumelLyJpikXzoLwO5owiPtbJslPLBCgclc7lGTT4VnYp+txIKvtNxEBM1i4anekif 71LcXRYyhI6C5fMSI4V3CMX+Wf79wAPP9AhtgMUJs5vlvfw9R3NA19TsCY5pLNL5wcCB rmt1VNWAfoBXYHdH0TCOMnaDWh9rViHIuaaUmPzIkglgD+9NRYJ0qroQMf28aS8hvz0i az7MkBmv5Mr8zSGQb/kzuBpmQDTC/ECyr0PXV4kv1zFJrJgq7uIVDGglRVLE+fDs+zFD JdfQ== X-Gm-Message-State: AOAM532GjvCiu0XLrgH3IvPMr6S9bjjGWYRc4/sNGlBZ/v9hTAiHFdnO cGNuKDIc9/WRgI7zZ8T1Irc= X-Google-Smtp-Source: ABdhPJzvTzsf7+xUVT3r09HWadzuDBP1fPg/TfsB4kC9ao7xJehpGSe99ggmpyKi8x+DAwEkhqRzkw== X-Received: by 2002:a1c:b346:: with SMTP id c67mr3696463wmf.60.1605290410997; Fri, 13 Nov 2020 10:00:10 -0800 (PST) Received: from unfall (20.134.94.90.dynamic.jazztel.es. [90.94.134.20]) by smtp.gmail.com with ESMTPSA id b14sm12312951wrx.35.2020.11.13.10.00.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Nov 2020 10:00:09 -0800 (PST) From: Miguel =?UTF-8?Q?=C3=81ngel?= Arruga Vivas References: <20200923162121.GA28654@jurong> <87wo0arulv.fsf@gnu.org> <87o8llxsew.fsf@debian> <20201002180621.GA4862@jurong> <87362vhbkl.fsf@gnu.org> Date: Fri, 13 Nov 2020 18:59:53 +0100 In-Reply-To: <87362vhbkl.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sat, 03 Oct 2020 12:02:18 +0200") Message-ID: <87r1oxyw6e.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -0.8 (/) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 43579@debbugs.gnu.org, Maxim Cournoyer Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=iUTakX0G; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -2.01 X-TUID: qUZXlRzvR3Uv --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi! Ludovic Court=C3=A8s writes: >[...] > It=E2=80=99s the same story as . >[...] > So this is again #include_next not picking the right due to > search path ordering issues and/or duplicate entries. > > Thoughts anyone? > > I think we need a proper fix but the feedback we got from GCC folks last > time didn=E2=80=99t give me much insight as to what we should do. AFAIR, the issue comes from using XXX_INCLUDE_PATH instead of CPATH because it includes gcc predefined paths: 1. The order matters. 2. The internal order may need duplicated paths. 3. Even providing the right duplicated paths through these variables may not be supported may not work, it's an implementation detail after all. This was changed because we wanted to avoid warnings on installed libraries which could be raised to errors with -Werror. I personally don't like that approach, as the included headers are being compiled in that moment so I think the -Werror should apply too, but indeed I understand the reasons behind the compatibility with FHS. The problem comes to generalizing this approach: there should be inputs that must not enter the realm of these variables, mainly gcc and libc, libc:static, libstdc++, and so on. The attached WIP-patch would be a rough approach to that, but it will take some time until I recompile the world to really test it. Also this isn't the best approach as the manifests shouldn't include these neither, but I still don't find where and how to mark these inputs cleanly. WDYT? Any idea is welcome. :-) Happy hacking! Miguel --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-build-system-gnu-Remove-libc-libstdc-and-gcc-from-in.patch Content-Transfer-Encoding: quoted-printable Content-Description: wip-gcc.patch From=20ad2e859589ccbd5e9310a921355ef5e7f4926d80 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Miguel=3D20=3DC3=3D81ngel=3D20Arruga=3D20Vivas?=3D Date: Fri, 13 Nov 2020 18:27:03 +0100 Subject: [PATCH] build-system/gnu: Remove libc, libstdc++ and gcc from incl= ude paths. * guix/build/gnu-build-system.scm (set-paths)[include-input?] [include-var?]: New predicates. [inputs->directories, native-inputs->directories]: Extract code from ... [input-directories, native-input-directories]: ... here. [include-directories, native-include-directories]: New variables. : Select between input-directories, native-input-directories or include-directories, native-include-directories depending on the environment variable to set. =2D-- guix/build/gnu-build-system.scm | 45 ++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.= scm index 2e7dff2034..2f8da33066 100644 =2D-- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -72,18 +72,35 @@ See https://reproducible-builds.org/specs/source-date-e= poch/." (define* (set-paths #:key target inputs native-inputs (search-paths '()) (native-search-paths '()) #:allow-other-keys) =2D (define input-directories =2D (match inputs + (define (include-input? input) + (let ((compiler-internals '("libc" "libc:static" "libstdc++" "gcc"))) + (match input + ((name . _) + (not (member name compiler-internals)))))) + + (define (inputs->directories obj) + (match obj (((_ . dir) ...) dir))) =20 =2D (define native-input-directories =2D (match native-inputs + (define (native-inputs->directories obj) + (match obj (((_ . dir) ...) dir) (#f ; not cross compiling '()))) =20 + (define input-directories (inputs->directories inputs)) + (define native-input-directories (native-inputs->directories native-inpu= ts)) + + (define (include-var? var) + (string-suffix? var "_INCLUDE_PATH")) + (define include-directories + (inputs->directories (filter include-input? inputs))) + (define native-include-directories + (native-inputs->directories (filter include-input? native-inputs))) + + ;; Tell 'ld-wrapper' to disallow non-store libraries. (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "no") =20 @@ -98,10 +115,12 @@ See https://reproducible-builds.org/specs/source-date-= epoch/." (for-each (match-lambda ((env-var (files ...) separator type pattern) (set-path-environment-variable env-var files =2D input-directories =2D #:separator separator =2D #:type type =2D #:pattern pattern))) + (if (include-var? env-var) + include-directories + input-directories) + #:separator separator + #:type type + #:pattern pattern))) search-paths) =20 (when native-search-paths @@ -109,10 +128,12 @@ See https://reproducible-builds.org/specs/source-date= -epoch/." (for-each (match-lambda ((env-var (files ...) separator type pattern) (set-path-environment-variable env-var files =2D native-input-directories =2D #:separator separator =2D #:type type =2D #:pattern pattern))) + (if (include-var? env-var) + native-include-directories + native-input-directories) + #:separator separator + #:type type + #:pattern pattern))) native-search-paths)) =20 #t) =2D-=20 2.29.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAEBCgAdFiEEiIeExBRZrMuD5+hMY0xuiXn6vsIFAl+uyZsACgkQY0xuiXn6 vsIT4QwAoOo38cqqc/DETdqpDr3eka+sZOFL5FaOLtEz+Gd9lOgFiizQJ2qQZttw Iy8S0Ki0Atal/cOp3P9HHdWQB+BxP7ru3rQWjb7dS1ualUR1/t7zW/ygNYnYH6fS fLO3YLVlmfLcnjLqPk34yv9Y/ec/4qcLQC9gQnv4Bb2gBM2FG6nzXuNJcgJhBFQm /C7IEzIw8A7ykeEA/JE3UpO2dQkv00wu+yxoxBBnD7FPoe4z6ehvDtUnOJgN5qqn kM32swCrJU1P68qxd82m7gKeDKi+sgoEJDbABsqp4TepPvOHdT9JbXuvoXD7jOxj VQJ7TACUkbjEEYag9B7NPXYyhtEcPQK+8h9ahyDqO5ILRgaqmkX6oqZPWxKxipv6 JohIfJHv/RjL9CbpKmMfAMWj0wdFRTwUgHIm4vzf7XqSgm8H/6F1jOctJz52thNp KLeUEzqecGKgXhCZAnTs/fMeYvq8HJU4vi45lalNz8JujLpbLYfRF6GhzPbnOsJF juqQZsQD =q0jA -----END PGP SIGNATURE----- --==-=-=--