From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id +EDiNDHxCmRRJwEASxT56A (envelope-from ) for ; Fri, 10 Mar 2023 09:58:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id IB7ENDHxCmRvCQAA9RJhRA (envelope-from ) for ; Fri, 10 Mar 2023 09:58:25 +0100 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 2AD3C8C2C for ; Fri, 10 Mar 2023 09:58:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1paYZg-00030u-6E; Fri, 10 Mar 2023 03:58:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1paYZe-00030i-NR for guix-patches@gnu.org; Fri, 10 Mar 2023 03:58:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1paYZe-0008HQ-3w for guix-patches@gnu.org; Fri, 10 Mar 2023 03:58:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1paYZe-0008CK-0E for guix-patches@gnu.org; Fri, 10 Mar 2023 03:58:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60847] [PATCH] Enable cross-compilation for the pyproject-build-system. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 10 Mar 2023 08:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60847 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: Josselin Poiret , Christopher Baines , Simon Tournier , Mathieu Othacehe , 60847@debbugs.gnu.org, Tobias Geerinckx-Rice , Lars-Dominik Braun , Ricardo Wurmus , jgart Received: via spool by 60847-submit@debbugs.gnu.org id=B60847.167843864831472 (code B ref 60847); Fri, 10 Mar 2023 08:58:01 +0000 Received: (at 60847) by debbugs.gnu.org; 10 Mar 2023 08:57:28 +0000 Received: from localhost ([127.0.0.1]:53672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paYZ6-0008BY-2S for submit@debbugs.gnu.org; Fri, 10 Mar 2023 03:57:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paYZ2-0008BK-VV for 60847@debbugs.gnu.org; Fri, 10 Mar 2023 03:57:26 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1paYYu-0008AZ-Hp; Fri, 10 Mar 2023 03:57:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=vR30GafK2pSxXf5t6cu8yJnzXmtJNCGgjheUBMxVMEo=; b=D0TAbsCO0lRBGoODyOUY nPYKqss9Dj+th6kgN4jClH3/T5XxyrUvK+dmO20kIb2Gm+OAD+FlUnnM9Dludggxdhd+sTX6WabaU 4ywCQu7F74N87xLyTuLe9bxTBr3G/ncxTRuDTZ26m1dezi61iBXRVug/sRuvKep9dluUEXPbE82pf JGIYy/JPlj/HVJJjFKc04TE2Sp/eXMHs0nm7kw1Te95VBVFwq9GHvna1i1VybYv+i0XxMGS4m4JOE uT54yGs+dxMM/Ur56u7Uo1sUyOOwBD/+pD+1Og8MRCTg+zBnbl3t3JaW2kaGTs3aim687HnRNAY3H fdhYBo1du1i2fw==; Received: from [193.50.110.253] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1paYYt-0004is-3c; Fri, 10 Mar 2023 03:57:16 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20230123133217.318-1-maxim.cournoyer@gmail.com> <20230123133217.318-2-maxim.cournoyer@gmail.com> <87zg8p7qvw.fsf_-_@gnu.org> <87jzzsy7qt.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: =?UTF-8?Q?D=C3=A9cadi?= 20 =?UTF-8?Q?Vent=C3=B4se?= an 231 de la =?UTF-8?Q?R=C3=A9volution,?= jour du Cordeau X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 10 Mar 2023 09:57:11 +0100 In-Reply-To: <87jzzsy7qt.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 07 Mar 2023 09:08:10 -0500") Message-ID: <87o7p19e6w.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678438705; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: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=vR30GafK2pSxXf5t6cu8yJnzXmtJNCGgjheUBMxVMEo=; b=Uv2RgCahn2T0bc6vsgccyIiWgwGgGjVsOFBQwb0N8RCX2EiqZEPS6UTX1JN/x4U6rsn9zG UevSsR08VNolWY7Bz1d9QM3D2a1F6LfuYhy/zGG3nlppHFcMRo8UYIdkTAg1E5vzgw/Gk3 uVhWdY9DZSeRIWbzqIQj5hr59CjnZ2TpTW5VH41DjJPqTlweQkUv682vKkwykyN2KkmQGk B5SgQ0BqgH3dPBtoZgbi8P3ChRlRqNAVrUXwn/IAbZrOb4nBBmWkKzG1g/aLRDoIq/SS6m OCpeSli5bO0BQOtvNbj3FxxgqoIMOBwr/4P5utV9pgRdhR0Ge3zsaXhs70G+Jg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=D0TAbsCO; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678438705; a=rsa-sha256; cv=none; b=epA6NJjmPTDzVuf4IIt81UrvrRyQPs0IUphTEZVpW2NL13uFgzqFCn4+s+pWpm02hccs/X x0nCEk2pLwNT0PoJEvqGOco8Wd4kmRwX8VmTn2OFbhWwl8lgXxeXzrTi9vqt57pXWY1eqH 1weqafepBUH4jDwPj+6SzPeJEbrq/tdGZqHpRfyoIifhlFDeP2TF9YglfFnADvBUXoDBb1 OqcJDhRSyLGQmHMrCHE3qC41V6DqjXhhe7Q2zSAUd7gQq3fvSzm1SJSH+zvNRKSQYiCtQd AXerNACdhZhYJl15StSNLiU7Yjl6JfQgrgy0LTD2or+DHEsbRFVU+jcJqJQ3UA== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=D0TAbsCO; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-Migadu-Spam-Score: -2.59 X-Spam-Score: -2.59 X-Migadu-Queue-Id: 2AD3C8C2C X-Migadu-Scanner: scn1.migadu.com X-TUID: MEuXiwdH0EjK Hi Maxim, Maxim Cournoyer skribis: > Ludovic Court=C3=A8s writes: > >> Hello, >> >> Maxim Cournoyer skribis: >> >>> +++ b/guix/packages.scm >>> @@ -1864,28 +1864,30 @@ (define* (bag->derivation bag #:optional contex= t) >> >> [=E2=80=A6] >> >>> + (let ((builder-name (procedure-name (bag-build bag)))) >>> + (if (or (bag-target bag) >>> + (eq? 'pyproject-build builder-name)) >>> + (bag->cross-derivation bag) >> >> This one part is a showstopper to me, for two reasons: >> >> 1. We cannot rely on =E2=80=98procedure-name=E2=80=99 (it=E2=80=99s a = debugging aid and it=E2=80=99s >> not guaranteed to return something useful). >> >> 2. Special-casing build systems here is not okay: the bag and build >> system abstractions exist to maintain separation of concerns. >> >> I understand there=E2=80=99s an actual bug to fix and the desire to fix = a more >> common issue, but I think this one approach is not the way forward. >> >> I hope that makes sense! > > I agree this is not "pretty", but it would be a "temporary" kludge until To make sure there=E2=80=99s no misunderstanding, I think that=E2=80=99s no= t okay even as a =E2=80=9Ctemporary kludge=E2=80=9D (I=E2=80=99m not against temporary = kludges in general, I=E2=80=99ve done my share of that ;-), but this would be way too brittle.) > all the build systems can be migrated (and the package adjusted for) the > "new" way, which is: native-inputs and inputs always co-exist, whether > the build is a native one or a cross one. Again, I=E2=80=99m not sure about the =E2=80=9Cnew way=E2=80=9D. I=E2=80= =99m sorry I lack the bandwidth to review this quickly, especially a wide-ranging change like inputs/native-inputs. (Just yesterday I was fixing cross-compilation issues on =E2=80=98core-upda= tes=E2=80=99; that gives a lot of insight as to how native-inputs/inputs play out in practice.) [...] > Otherwise, could you offer a concrete suggestion as the way forward? I > appreciate the "that's not the way", but stopping short of suggesting a > better alternative leaves me wanting more :-). Yup, I=E2=80=99m sorry I don=E2=80=99t have any suggestions! Perhaps one s= uggestion would be: start the native-inputs/inputs change on a new branch, for all the build systems (or at least the main ones), and then try to build the =E2=80=98core=E2=80=99 subset (which includes cross-compilation) to get an = idea of the kind of code simplification opportunities as well as issues that arise. I feel like it=E2=80=99s hard to anticipate the impact of such a change wit= hout actually trying. Thanks, Ludo=E2=80=99.