From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id yLvfGQhVB2SaGQEASxT56A (envelope-from ) for ; Tue, 07 Mar 2023 16:15:20 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id cKDfGQhVB2Rz/wAA9RJhRA (envelope-from ) for ; Tue, 07 Mar 2023 16:15:20 +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 1262B3A4CB for ; Tue, 7 Mar 2023 16:15:19 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZZ1y-0003B6-3b; Tue, 07 Mar 2023 10:15:10 -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 1pZZ1q-0002x0-Pm for guix-patches@gnu.org; Tue, 07 Mar 2023 10:15: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 1pZZ1q-0008OC-6u for guix-patches@gnu.org; Tue, 07 Mar 2023 10:15:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pZZ1p-0006tP-Uf for guix-patches@gnu.org; Tue, 07 Mar 2023 10:15:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60847] [PATCH] Enable cross-compilation for the pyproject-build-system. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 07 Mar 2023 15:15: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: 60847@debbugs.gnu.org Received: via spool by 60847-submit@debbugs.gnu.org id=B60847.167820208126456 (code B ref 60847); Tue, 07 Mar 2023 15:15:01 +0000 Received: (at 60847) by debbugs.gnu.org; 7 Mar 2023 15:14:41 +0000 Received: from localhost ([127.0.0.1]:46933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZZ1V-0006se-H1 for submit@debbugs.gnu.org; Tue, 07 Mar 2023 10:14:41 -0500 Received: from mira.cbaines.net ([212.71.252.8]:42348) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZZ1T-0006sU-8m for 60847@debbugs.gnu.org; Tue, 07 Mar 2023 10:14:40 -0500 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:54d1:d5d4:280e:f699]) by mira.cbaines.net (Postfix) with ESMTPSA id EB50716DD4; Tue, 7 Mar 2023 15:14:37 +0000 (GMT) Received: from felis (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id eb1011ff; Tue, 7 Mar 2023 15:14:37 +0000 (UTC) References: <20230123133217.318-1-maxim.cournoyer@gmail.com> <20230123133217.318-2-maxim.cournoyer@gmail.com> <87zg8p7qvw.fsf_-_@gnu.org> <87jzzsy7qt.fsf@gmail.com> User-agent: mu4e 1.8.13; emacs 28.2 From: Christopher Baines Date: Tue, 07 Mar 2023 15:05:47 +0000 In-reply-to: <87jzzsy7qt.fsf@gmail.com> Message-ID: <87jzzsr3tx.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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=1678202120; 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: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; bh=BCcjZDVyB6aFvNaZgB5GDp/A7PCAP+ZCrlqP0Z4ZHls=; b=VB3ivDkG9Z6HWmO0M2A2LpgBOdQHMXb0tCpOHWkdcRO25tb5nhiKhNDxk5vAKyQs5s8ybY UfTPrTGemaSBjxqjR6yNLfyoACoCqsywbcovfZCbl8tLV7BMiNoHxZxnF9eQm93ENYPSK5 xPeeB7cSOFdzV+7q2Dmh2EbMQvsb0LOwV7Cs7IsUHnNB/as+H89A4CjCkYTSEu+S5MIf4y 2hpJ0P8BgTBz4g03TfQVjIwfl5Ujt4y1qNcNggik+3VFw4xrhTvLiAbYSTHUMwTtGOt3y8 CaxSoAMtVxbfZ28WQe5WDYqTm4WpTioElz0j74UGmNWZPTDbztcY1aiUCKb0rA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678202120; a=rsa-sha256; cv=none; b=TUW9JCNurj7ugSeL9HatHrFR2+sjmAzJzg9jZ6JmYr+VZC9Zru2g1Sw3Jr/mw3SSpOIoL/ 7SPI2YKMU91FBKcBm1jhx6KlfWiXfcTPNpFU8RtGDiVgM7ZaFfKsU9JdRGPlZI16amRLu5 sciMf1MSNxhedUxlMuAP5upXjlF5ZozYGWxmGo8WTJN4PQWHMdsjAOONnliqg/XVCKAptQ /zcNRSarzX4Ww/C0vp+yVQFe/7SsMd/Xz2r5hzxBGNC0Vt/+M8dHcOr/tYJjCiGOK8llO5 DeB9OT5PKu62YMrQprTOQgVYtr1fu+CD+dnjr5bAnbiB0q0m83uPqpx9xiU3MQ== Authentication-Results: aspmx1.migadu.com; dkim=none; 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=none X-Migadu-Spam-Score: -3.81 X-Spam-Score: -3.81 X-Migadu-Queue-Id: 1262B3A4CB X-Migadu-Scanner: scn1.migadu.com X-TUID: KbwbC5JMonIS --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Maxim Cournoyer writes: > Hi Ludo! > > 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 > 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. > > In light of this, it seems OK to test the water with a not so > significant build system (only a handful of package relies on > pyproject-build-system thus far). When all the build systems will have > been migrated to the new way (a too big undertaking to be done in one > shot), this kludge can be removed. > > 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 :-). I think it would be clearer to see other potential ways forward if the end goal was more clearly articulated. Guessing at that here from the changes proposed to guix/packages.scm, once all build systems are adjusted, cross derivations will be produced for all bags, regardless of whether there's a target. That doesn't make much sense to me. One explaination is that the current naming is confusing when thinking about this goal, so maybe bag->cross-derivation happens to do what you want it to do in all circumstances, even when target is #f? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmQHVNpfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9Xd0JhAAuSbus21DgEoJu/nQUiNKRyTenkCjOrlz Ea6YVd2RXZbtwZJI5dTGHqTa4S50959uDYx+TSAejB3hUMoj5cMm9gdp1/JQ6MdG FWndCf5SI6C53L2GwN9g6Cfx9gfeMLcvlu5+CHR8V/GRxtMRBLuqwVRgB5xCm1Uk n91eKUjv7GNmzLBH5KW7WLxIvG3a0tzegMdHFnrHKTWA5VuRkCv/ebDULjDmUcz1 SnF/j7SWMAJZgbv5EMqG+7+PRhkpas9j42ETLSw0uCbv+0xRguJ514V0sh4UbsD3 i1ZuOeEzFJqoncx1fiWyvGXy3FyL1h2zyeB9mKU1M2Los9OJvQ+8M1Wrh4L/IDK4 RGDRWLTkAzxkztXtQBM053wzCVBAqCpZ62afbvoPsiyCVkvO1qNn8cV54l01bVPQ pK6RPLsQXTPete9f2P1qxAm7i7ynqcq8/+Naz8vxwDf24A1U88PKgyyGq9MqtMZe X9qGF0CdsbBnu8+L24gaNLF0mpEZLyxqgv8SM1wR5jnG0x+jGyht5OiL7JKFrAmX SFC9alYBxAOvJTh/hLcS2DMiQuI6dih3CUVpGPn4Aj1WSQtmnM4opaqevlfREu05 v/l0ptwdR/Gdvv2/3nC/ADGGZeOqXvuRSyrz0isYoyaGI9aoUJmfRs5nz2kPNf0h 1/c33pzron4= =TM8f -----END PGP SIGNATURE----- --=-=-=--