From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QA0gEGQ18GDKHwEAgWs5BA (envelope-from ) for ; Thu, 15 Jul 2021 15:17:24 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id kNrvCWQ18GAUZwAAbx9fmQ (envelope-from ) for ; Thu, 15 Jul 2021 13:17:24 +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 CF44EE274 for ; Thu, 15 Jul 2021 15:17:23 +0200 (CEST) Received: from localhost ([::1]:36868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m41Ew-00065p-CX for larch@yhetil.org; Thu, 15 Jul 2021 09:17:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40108) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m41Ee-000604-Nn for guix-patches@gnu.org; Thu, 15 Jul 2021 09:17:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35541) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m41Ec-0008Gd-7B for guix-patches@gnu.org; Thu, 15 Jul 2021 09:17:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m41Ec-0007Sy-0V for guix-patches@gnu.org; Thu, 15 Jul 2021 09:17:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49565] [PATCH] gnu: glibc-headers-mesboot: Use %build-inputs in setenv phase Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 15 Jul 2021 13:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49565 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Thiago Jung Bauermann , 49565@debbugs.gnu.org Received: via spool by 49565-submit@debbugs.gnu.org id=B49565.162635498128649 (code B ref 49565); Thu, 15 Jul 2021 13:17:01 +0000 Received: (at 49565) by debbugs.gnu.org; 15 Jul 2021 13:16:21 +0000 Received: from localhost ([127.0.0.1]:47087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m41Dx-0007S1-FK for submit@debbugs.gnu.org; Thu, 15 Jul 2021 09:16:21 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:40672) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m41Dt-0007Rq-FR for 49565@debbugs.gnu.org; Thu, 15 Jul 2021 09:16:20 -0400 Received: from [172.20.10.4] ([188.188.245.134]) by michel.telenet-ops.be with bizsmtp id VRGE2500d2uiemL06RGFRC; Thu, 15 Jul 2021 15:16:15 +0200 Message-ID: <0eac02a304064759c0bbe37f91ece93ebd6f0994.camel@telenet.be> From: Maxime Devos In-Reply-To: <20210715004613.763843-1-bauermann@kolabnow.com> References: <20210715004613.763843-1-bauermann@kolabnow.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-gbOQxoFoeVLzjZRCFSb/" Date: Thu, 15 Jul 2021 14:58:54 +0200 MIME-Version: 1.0 User-Agent: Evolution 3.34.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626354975; bh=iNh4zI+BmDJJskkuP5iO9IHXSDTjIPEf6567X2SjUW0=; h=Subject:From:To:In-Reply-To:References:Date; b=c2nBcH4etKc2+1WewTk4ydzEqcKIPgCHz6Iw/DBze6DsHLv5m9oh7cV1twqbMiszy Z2DLWATeyBZEs5qM51anIGN094pH8v0GVSdSua+/6yLcA/SFQfalrCaJ0uR/qRt6Wu aCtbQLmiaDp1g2xTu3h2b08veaOKc4w3aC8sHc+QYvku4CV/WRWtYdmPZR20fvJbJS dxxmEEAmBrC1oFwq4Mh0weupp3gHm1hR4gEtS3c1qckmXYfP+u5fxT393NPUCpL4yf hGEpwcYIMpea3zuskL+NH0opJKMb/aH65vweE93LmF6pSUCkQlefP1JPMJtOjIMrkZ NuEzJ7oJ0glMQ== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1626355043; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=iNh4zI+BmDJJskkuP5iO9IHXSDTjIPEf6567X2SjUW0=; b=bIySd++5ywVh1bKjqrlGY+G25KgaWk2Smn02TsYYeGFVCosueJdqT7ylOmvD8eKELouPa1 pla05QR/tYj3KPsxmVG11AHWiAUSaHRnjW2GNYYWyUi6H1nN81ZhVHaojc/DfycW/dpJ/s y1kZN9N8t6LD3zIUglj8v130CT2dNxFrwikUHpzPJTkRNSOF07ln8WK+RZZCpKuUX91+Pq iym17DXS7BDsirzt7b0ofm7kZPOoO479s6M5oJc+D6IspP6BqE9sO6/AeGy2isyeIEdfUz dJrI1WQfOZ16pl61AXTCbYWEu2jhvpgVe9mpEXWkQehFrK9q9lqODdsDMVVJEw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626355043; a=rsa-sha256; cv=none; b=HzToMRzuw+zLKSt075T6lBb8XNCgefM3eVpqjuhIWRmhIJw63tHPyh073vdRkoekUmoEhd vhR1n0z8+adf7nTLWq1Ej+yfrKdIxBHdZj6+wcJHbhkZvw/t+xXQBhv5hdBTC5cPuBSxqb wxlH5878WCZAmxetACuKwSsnf9184B3HFnQkd83l9CnYIvk1EhhNxTnq+MTS+5jj7t06eB OpU+el0H89MEFeW/kvyIOWpOgYgQNWx1Ndtw4Ph7DIQ/L646ex926V7wjg9oMfZpqZMmU+ 47dy81yodF6RckCWlyLmA761d5imgzPpVw3zd6BQ2pK2+5fl9hnvx0Gtat5L2A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=c2nBcH4e; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -3.40 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=c2nBcH4e; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: CF44EE274 X-Spam-Score: -3.40 X-Migadu-Scanner: scn0.migadu.com X-TUID: jPmgM+D9HIn+ --=-gbOQxoFoeVLzjZRCFSb/ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Thiago Jung Bauermann via Guix-patches via schreef op wo 14-07-2021 om 21:4= 6 [-0300]: > When cross-building from x86-64-linux to powerpc64le-linux, > (assoc-ref inputs "libc") returns #f so get it from %build-inputs > instead. >=20 > For consistency, do the same for the other inputs as well. >=20 > * gnu/packages/commencement.scm (glibc-headers-mesboot)[arguments]: Get > packages from =E2=80=98%build-inputs=E2=80=99 rather than =E2=80=98inputs= =E2=80=99. > --- > gnu/packages/commencement.scm | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) >=20 > When running >=20 > ``` > $ ./pre-inst-env guix build \ > --target=3Dpowerpc64le-linux-gnu.gcc \ > gcc-toolchain@11 > ``` To be clear: are you trying to cross-compile GCC (that will be run on powerpc64le and produce binaries for powerpc64le) or are you trying to build a cross-compiler (that will be run on x86_64 and produce binaries for powerpc64le)? This command does the former. > on current core-updates branch (commit 8456581375cf), I get the > following error during the build of glibc-mesboot-2.16: Why is 'glibc-mesboot-2.16' being cross-compiled here? Mesboot currently only supported i686-linux and x86_64-linux and not powerpc64le-linux (at least the version currently in Guix). > I deduced that this is because `(assoc-ref inputs "libc")` is returning #= f. > And indeed, changing the code to look in %build-inputs instead fixes the > issue. I also noticed that most other places which look for a "libc" > package do so in %build-inputs rather than in inputs. >=20 > Just changing the line for "libc" is enough to fix the build but for > consistency, also change the other variables as well. Normally, looking up inputs in 'inputs' is the right thing, but 'libc' is special. Looking at 'standard-cross-packages', it seems like when cross-compiling, "libc" is renamed to "cross-libc", for no apparent reason. Maybe it can be renamed back to "libc"? That could simplify some code, e.g. in qtbase-5: (let ((glibc (assoc-ref inputs ,(if (%current-target-system) "cross-libc" "libc")))) would become: (let ((glibc (assoc-ref inputs "cross-libc"))) If I search with git grep '"cross-libc" "libc", I find 5 such examples. Are you sure your usage of (assoc-ref %build-inputs "libc") is correct here= ? As "libc" currently doesn't exist in 'inputs', that means "libc" is searche= d for in 'native-inputs', which is probably not what you want, given that you are cross-compiling? > diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.sc= m > index fb028390a260..ab22bca2fb8f 100644 > --- a/gnu/packages/commencement.scm > +++ b/gnu/packages/commencement.scm > @@ -2133,10 +2133,10 @@ ac_cv_c_float_format=3D'IEEE (little-endian)' > (invoke "tar" "xvf" source) > (chdir (string-append "glibc-" ,version)))) > (replace 'setenv > - (lambda* (#:key inputs #:allow-other-keys) > - (let* ((headers (assoc-ref inputs "headers")) > - (libc (assoc-ref inputs "libc")) > - (gcc (assoc-ref inputs "gcc")) > + (lambda _ > + (let* ((headers (assoc-ref %build-inputs "headers")) > + (libc (assoc-ref %build-inputs "libc")) > + (gcc (assoc-ref %build-inputs "gcc")) > (cppflags (string-append > " -I " (getcwd) "/nptl/sysdeps/pthread/= bits" > " -D BOOTSTRAP_GLIBC=3D1")) Greetings, Maxime. --=-gbOQxoFoeVLzjZRCFSb/ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYPAxAxccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qq3AP9bXiSrd5Ol1luc0lvY7W9hS60b XwETgGCdXtR3Mf+PwAEA3WfZIN9bTo8ZHstsURxDAKJU7ifoiHq+oqZUZGXrdg4= =HDQb -----END PGP SIGNATURE----- --=-gbOQxoFoeVLzjZRCFSb/--