From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id Ctf4Lxlex2B0LgAAgWs5BA (envelope-from ) for ; Mon, 14 Jun 2021 15:48:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id iCoJKxlex2DkUQAAB5/wlQ (envelope-from ) for ; Mon, 14 Jun 2021 13:48:09 +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 87D75311AE for ; Mon, 14 Jun 2021 15:48:09 +0200 (CEST) Received: from localhost ([::1]:41364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsmwi-0002GQ-Iq for larch@yhetil.org; Mon, 14 Jun 2021 09:48:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsmwc-0002DW-Ma for guix-patches@gnu.org; Mon, 14 Jun 2021 09:48:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33843) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lsmwc-00021K-EX for guix-patches@gnu.org; Mon, 14 Jun 2021 09:48:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lsmwc-0000Qr-8v for guix-patches@gnu.org; Mon, 14 Jun 2021 09:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48729] [PATCH v2 05/47] gnu: Add go-github-com-keybase-go-ps. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 14 Jun 2021 13:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48729 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Raghav Gururajan , 48729@debbugs.gnu.org Cc: jgart@disroot.org Received: via spool by 48729-submit@debbugs.gnu.org id=B48729.16236784631517 (code B ref 48729); Mon, 14 Jun 2021 13:48:02 +0000 Received: (at 48729) by debbugs.gnu.org; 14 Jun 2021 13:47:43 +0000 Received: from localhost ([127.0.0.1]:45389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsmwI-0000Nq-KQ for submit@debbugs.gnu.org; Mon, 14 Jun 2021 09:47:42 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:33578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsmwH-0000Md-1t for 48729@debbugs.gnu.org; Mon, 14 Jun 2021 09:47:42 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by michel.telenet-ops.be with bizsmtp id H1nf2500K0mfAB4061nfrc; Mon, 14 Jun 2021 15:47:39 +0200 Message-ID: <4247c42748d39d1009c1493ec953a89106ea7800.camel@telenet.be> From: Maxime Devos In-Reply-To: References: <20210603095814.21158-1-rg@raghavgururajan.name> <20210603095814.21158-5-rg@raghavgururajan.name> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-liXLZZiZUCcPPmglWjI8" Date: Sat, 12 Jun 2021 18:21:53 +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=1623678459; bh=OcMozxmE1QRsiblLaVOkTnciFhZrmdYWNz4FKheN7QM=; h=Subject:From:To:Cc:In-Reply-To:References:Date; b=pd2TmZEV51Qj9mW3FD0pP9jRKsr2IVjPtlj+NKBJn1IslWPewnTjgoAiFCinfKt6K wFJRNzKYd3u0VLU39flWxhfLg9ILAbJe0i6+xY7GpJ0ZL43QKRzpDhQgVN9nWNdV2f qWZfaNG87hkANTpWWXBnEWyeaBp235NVLCzMU+cpBtb/jKdS07/jbSRr146iektIer 4GdZsLgEPbHVo29fJXJOebSezlL9efBqUsTkdEU1mHAMnl84//7Xt7fbVxLoHaCkOJ wHhmLJbY0OunBvAyfK8ngDgPGqDHIMrkuUriyWl/vbhiP0nylKjbeeqnDKc7T9hV+H blHkQFTIu1E2Q== 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 X-Migadu-Spam-Score: -4.00 Authentication-Results: aspmx1.migadu.com; none X-Migadu-Queue-Id: 87D75311AE X-Spam-Score: -4.00 X-Migadu-Scanner: scn0.migadu.com X-TUID: QLZ+nipmsXxn --=-liXLZZiZUCcPPmglWjI8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Raghav Gururajan schreef op vr 11-06-2021 om 00:17 [-0400]: > Hi Maxime! >=20 > > When cross-compiling, coreutils is not in 'inputs', but in 'native-inpu= ts', right? > > So this would lead to a build error when cross-compiling. > > (assoc-ref inputs "coreutils") would return #f, thus you'd get an excep= tion > >=20 > > ice-9/boot-9.scm:1685:16: In procedure raise-exception: > > In procedure string-append: Wrong type (expecting string): #f >=20 > I am confused. It is used only during check phase (which is build-time),= =20 > so when cross-compiling, the arch for build machine is used for=20 > native-inputs right? The Go build system doesn't support cross-compilation currently. So, for explanation, let's assume gnu-build-system instead. The issue is that, when cross-compiling, 'inputs' consists solely of the packages listed in the 'inputs' field of the package definition (When compiling natively, 'native-inputs' is merged into 'inputs'.) As "coreutils" is not in "inputs", it follows that that (assoc-ref inputs "= coreutils") returns #f. Thus, when (string-append (assoc-ref inputs "coreutils") "/bin/= sleep") is executed, it raises an exception, as string-append expects strings only. Now, about: > I am confused. It is used only during check phase (which is build-time),= =20 > so when cross-compiling, [...] The [...]/bin/sleep binary is only used during the check phase (and therefo= re ignored when cross-compiling), yes, but the (string-append [...]) is _alway= s_ executed! > so when cross-compiling, the arch for build machine is used for native-in= puts, > right? Yes. > I wonder how other native-inputs like gettext etc doesn't give this error= . There's very little code doing (assoc-ref inputs "gettext"), (assoc-ref native-inputs "gettext") or (assoc-ref native-inputs "gettext") in Guix. The only case I found: # cargo-build-system (when (assoc-ref inputs "gettext") (setenv "GETTEXT_SYSTEM" (assoc-ref inputs "gettext"))) So, I'm not sure what you're referring to. Simply including gettext in native-inputs doesn't cause an error. It it trying to (string-append (assoc-ref inputs "gettext") "stuff") that raises an error when 'gettext' is not in 'inputs' or 'native-inputs' when c= ompiling natively, or when 'gettext' is not in 'inputs' when cross-compiling, as in these cases, (assoc-ref inputs "gettext") returns #f. Greetings, Maxime. --=-liXLZZiZUCcPPmglWjI8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYMTfERccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7uMFAP9bcZzdGN1P64hXxfnAbfhppTCZ jOsd2ogJFCDGqUHY+QD+NkiF3VVYlzGg7/Rn/XiKPUOJn/yM7Tqkf0j3hnTCmQU= =gS7d -----END PGP SIGNATURE----- --=-liXLZZiZUCcPPmglWjI8--