From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OGj5KfcpEGIhugAAgWs5BA (envelope-from ) for ; Sat, 19 Feb 2022 00:21:27 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id sOOjIvcpEGLKigAAG6o9tA (envelope-from ) for ; Sat, 19 Feb 2022 00:21:27 +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 177943BDDE for ; Sat, 19 Feb 2022 00:21:26 +0100 (CET) Received: from localhost ([::1]:54476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nLCZ3-0005cf-L7 for larch@yhetil.org; Fri, 18 Feb 2022 18:21:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37884) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nLCYq-0005cJ-PO for guix-patches@gnu.org; Fri, 18 Feb 2022 18:21:12 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34426) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nLCYg-0004vR-PP for guix-patches@gnu.org; Fri, 18 Feb 2022 18:21:12 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nLCYg-0001Mo-F5 for guix-patches@gnu.org; Fri, 18 Feb 2022 18:21:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v2 08/15] gnu: chez-scheme: Explicitly package bootstrap bootfiles. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 18 Feb 2022 23:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Attila Lendvai , Malte Gerdes , zimoun Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.16452264245180 (code B ref 53878); Fri, 18 Feb 2022 23:21:02 +0000 Received: (at 53878) by debbugs.gnu.org; 18 Feb 2022 23:20:24 +0000 Received: from localhost ([127.0.0.1]:56556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLCY3-0001LU-Qb for submit@debbugs.gnu.org; Fri, 18 Feb 2022 18:20:24 -0500 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:35723) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLCY1-0001LE-EK for 53878@debbugs.gnu.org; Fri, 18 Feb 2022 18:20:22 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 58EFC58020B; Fri, 18 Feb 2022 18:20:16 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 18 Feb 2022 18:20:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= philipmcgrath.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; bh=32WbKUEvaju+nV eWes4ib/OJiMnT1GNDOCYg6XVxF2w=; b=e+1UW07ztT9TEd6PWYzx0/FeOqM0kn MfSBJ4Ba60KqNJKYMrLI+dcQxxh8hFgfy2sb88vG7M5k5Ux0OXLdIUGC0jdk4jjA 05dfVTKfQdiq4UXAzkCH0S4wXj2+dfJbtVvTA650rCsBlInPRyl6bukI/UX99Rnv 5LLGbCQIFBodSSJZdekN7hrm1WLr7Q37TxuaFuYFnwwWSVQs/JC4XmiXV7jIhVpk xxojnwZ9Urfi3q5Yd/2NKPERKQgLF8GV0uCHbYFxPmpsfD/eOKizeWI+WE26qHd8 02SIteg7SPR+8pEGaE5Qz+Mmn9r7I90ziqHRiHCOSa1s4+21eWs90A2g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=32WbKUEvaju+nVeWe s4ib/OJiMnT1GNDOCYg6XVxF2w=; b=FTfZYcwloiUednpswVJU7JJ41wvlLlh0i p1LiCwTt+uRt4jyc+Y1XeDpoQ6B2vQGArqpJ6BeZIMumxmEbMqf7g9ubEqIqTB8+ 2bgmNGpiyL7rlV6ynRPx4L6zjxPRjh9XfBjhEhjQj9IfXy7olVxELzjQ6wlVXCY7 ayVlIym/fTdwF7sUFXqRg8vaQFrNw24/3F71TlON4SkVvW6C6JiNVCi08TIRGB97 8XssizUO+UVKUCF8W1fuXMX1ivxhK/+oUV1BxqzYIKbNDmSxbm1jKG/Mwpx/qnkI E1b01EUJvlLDIkQK9hCLdMZ3XoVbK4CMEZ0V2swM1DefuEaB/F1Vw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkedugddtkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfgggtsehgtderredttddvnecuhfhrohhmpefrhhhilhhiphcu ofgtifhrrghthhcuoehphhhilhhiphesphhhihhlihhpmhgtghhrrghthhdrtghomheqne cuggftrfgrthhtvghrnhepleefgeegieehgedtveeiffehkeejtdefudetvdeigfekfeef udfffeejveekveelnecuffhomhgrihhnpehgnhhurdhorhhgpdhgihhtlhgrsgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehphhhi lhhiphesphhhihhlihhpmhgtghhrrghthhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 18 Feb 2022 18:20:15 -0500 (EST) From: Philip McGrath Date: Fri, 18 Feb 2022 18:20:08 -0500 Message-ID: <4034931.zyubqINhsf@bastet> In-Reply-To: <72bb2b48f7c2fae26c60db8c13cff34a0b01347b.camel@ist.tugraz.at> References: <97f8916ae5bd8d8459bdfd507864f2f55cc217a1.camel@ist.tugraz.at> <20220217205048.967383-9-philip@philipmcgrath.com> <72bb2b48f7c2fae26c60db8c13cff34a0b01347b.camel@ist.tugraz.at> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2203087.bQLt5E2yDt"; 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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645226487; 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: dkim-signature; bh=32WbKUEvaju+nVeWes4ib/OJiMnT1GNDOCYg6XVxF2w=; b=E4ZBXmEHuDSbBo5OyIZDX+K12horrTei3vkiEIKNfPiNpAqf9wtRy9a6Fq5MtupGVqnaKF 6MJ166BJo/lFEfeP9eOgFw3o4kw8p83DrJV4igiX5bgothZAkp2uLHIksA7JJRaZ5+b7UF HDNLIXX3OxT8nIFZ8VwahC/qP00QjlgrbvROys6nZtHqi3N6DUBAJgueiUHHCxjTtOC4uO 7mfE2VDBf9Pn5TenIF4XsriCc+VQrl9uC3H6aoQS+pgGlaJvWU7+6SpNztT8D5F+96B+RU 2HHuq72VI7sutes2gpmV65y2id6mCA3BAAPmvfXuue0LSuUacXzu9QgPy00Mdg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645226487; a=rsa-sha256; cv=none; b=pXVEJC5tSRIdlP/dUwXumIKP26JbjrcwJ/2ei/YTfSYQiUoRDRUk61uKnpzD0a3qDhw11i aNV/IpcDv+x5nOoNg5MlFHktkbEKCW5015T3LLBdjiGA6Rjxj1F1yyEJyUs8oc0z0bcpC2 Y9rOFm0qmC3G+YbwtH4AAG+e+YNioTIGllElzs5/as5d0pnVF0Ezwcez9BXedq0zKJeDTW W+AsPIAaSP/16WQJ6A+X6deg3OPiNJVtGronqquN+a/l9QPziL71B1GZgzd56AD4BXJaxC 2+isNaF1Vx8zjwN8MSpymTTjRv/x7OLJ4I4DpzdkvCvkadW1u7OGFLoQ03Z5Ag== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=fm1 header.b=e+1UW07z; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=FTfZYcwl; dmarc=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" X-Migadu-Spam-Score: -3.73 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=fm1 header.b=e+1UW07z; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=FTfZYcwl; dmarc=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" X-Migadu-Queue-Id: 177943BDDE X-Spam-Score: -3.73 X-Migadu-Scanner: scn0.migadu.com X-TUID: h2MnRCno1n08 --nextPart2203087.bQLt5E2yDt Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii"; protected-headers="v1" From: Philip McGrath To: 53878@debbugs.gnu.org, Liliana Marie Prikler Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= , Attila Lendvai , zimoun , Malte Gerdes Subject: Re: [PATCH v2 08/15] gnu: chez-scheme: Explicitly package bootstrap bootfiles. Date: Fri, 18 Feb 2022 18:20:08 -0500 Message-ID: <4034931.zyubqINhsf@bastet> In-Reply-To: <72bb2b48f7c2fae26c60db8c13cff34a0b01347b.camel@ist.tugraz.at> References: <97f8916ae5bd8d8459bdfd507864f2f55cc217a1.camel@ist.tugraz.at> <20220217205048.967383-9-philip@philipmcgrath.com> <72bb2b48f7c2fae26c60db8c13cff34a0b01347b.camel@ist.tugraz.at> Hi, On Friday, February 18, 2022 2:08:46 AM EST Liliana Marie Prikler wrote: > Am Donnerstag, dem 17.02.2022 um 15:50 -0500 schrieb Philip McGrath: > > +(define-public chez-scheme-bootstrap-bootfiles > > + (package > > + (inherit chez-scheme) > > + (name "chez-scheme-bootstrap-bootfiles") > > + (inputs '()) > > + (native-inputs '()) > > + (outputs '("out")) > > + (build-system copy-build-system) > > + ;; TODO: cross compilation > > This TODO might be moved one line up, since you wouldn't be able to do > cross-compilation with just copy-build-system, would you? > Actually, for the bootfiles, I would do cross-compilation with `copy-build- system`: the extra parts of `gnu-build-system` would just have to be deleted anyway. With the definition of `chez-scheme-for-racket-bootstrap-bootfiles` in patch v2 11/15, you could get a kind of cross compilation just by changing: (add-before 'install 'build (lambda* (#:key native-inputs inputs #:allow-other-keys) (invoke (search-input-file (or native-inputs inputs) "/opt/racket-vm/bin/racket") "rktboot/main.rkt"))) to: (add-before 'install 'build (lambda* (#:key native-inputs inputs #:allow-other-keys) (invoke (search-input-file (or native-inputs inputs) "/opt/racket-vm/bin/racket") "rktboot/main.rkt" "--machine" (chez-maching->threaded (chez-machine-for-system)))))) (I don't recommend that: for one thing, it would be about ten times slower than taking Chez Scheme as a native input when cross-compiling. More significantly, the harder questions about cross-compilation are in the Chez Scheme package itself, not the bootfiles. Perhaps we will end up wanting packages like `chez-scheme-bootstrap-bootfiles-ta6le` and `chez-scheme- bootstrap-bootfiles-ti3le`, analogous to e.g. `gcc-cross-sans-libc-arm-none- eabi` and `binutils-cross-x86_64-w64-mingw32`. Or maybe it will make sense to have one package build bootfiles for all supported machine types in separate outputs, and a variant of that for bootstrapping that goes through Racket for just the current machine type. Those are questions for another day.) > > + (arguments > > + (list #:install-plan > > + #~`(("boot/" "lib/chez-scheme-bootfiles")))) > > + (supported-systems > > + ;; Upstream only distributes pre-built bootfiles for > > + ;; arm32le and t?(i3|a6)(le|nt|osx) > > + (filter (lambda (system) > > + (let ((machine (and=> (nix-system->chez-machine > > system) > > + chez-machine->nonthreaded))) > > + (or (equal? "arm32le" machine) > > + (and machine > > + (member (substring machine 0 2) '("i3" > > "a6")) > > + (or-map (cut string-suffix? <> machine) > > + '("le" "nt" "osx")))))) > > + %supported-systems)) > > + (synopsis "Chez Scheme bootfiles (binary seed)") > > + (description > > + "Chez Scheme is a self-hosting compiler: building it requires > > +``bootfiles'' containing the Scheme-implemented portions compiled > > for the > > +current platform. (Chez can then cross-compile bootfiles for all > > other > > +supported platforms.) > > + > > +This package provides bootstrap bootfiles for upstream Chez Scheme. > > +Currently, it simply packages the binaries checked in to the upsream > > +repository. Hopefully we can eventually adapt Racket's @code{cs- > > bootstrap} to > > +work with upstream Chez Scheme so that we can bootstrap these files > > from > > +source."))) > > + > > Now to explain the difference between my suggestion and what you > implemented. Mine would be to > (define-public (chez-scheme-bootstrap-bootfiles chez-scheme) > ...) > where ... is the code you already have. This would not only work for > other chez-schemes than the one we have packaged, but might also make > it possible to cross module boundaries, i.e. keep chez-scheme in > chez.scm. WDYT? I still don't think I understand. How would this avoid having to override almost everything for both the upstream and Racket variants of the package, as was the case in my attempt in (also at )? I mean, you could put the upstream stuff under the `lambda` for now, but eventually it will also need a build phase and some inputs. I just don't see what the benefit all that would achieve, or what the problem is (if there is one) with this patch. -Philip --nextPart2203087.bQLt5E2yDt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE9GWrrNY3rqwUFVXPygNjjfo/HHoFAmIQKagACgkQygNjjfo/ HHpd7w/+ImKOAIH+enBrQ+ZNf0QBsdt67Dk1enEBHL8iPNvrYIZOEKEnSwbKKTFW d8wxgqWASH2+RWnieSU+ssphCkh4X917fzi9Gcjav1cQwu0uUpPeDM76ME7jTLdg 4wD5v/e/oGPwgtdnzS2xFOLeqAih6WOvJSB/smgPQfVO01PEvS8mz/akxtS8u88G zWKHv5qS2MDQKw87WNGBDwnaP7O51nocWn25pN+aHnsoG7WXw0D4bx4FvI6F7EPZ QzdSHpwLuOFsXUWug3lFCfJcMK7WFWbvMN67kKz8jJ/cCz17J3CjCcpe5Zfpy5SH VxrnL/U9Qd9w4TFIhZGZLS2agdKRBeNZYJ72Q2+MsjcXxO+ZGXA3QQtO7GOqpNnL VLYXJUeIr0AKIc4UPdOIRQewasYZ22eN5hQXsMEIBcHPigAwjW1meOOtWj06c2fu i8UzTu1tvX1tWt30oh1rmZrOJ7W2WkXRmimKBupGp1M7KSi5/Rv+C+7mQkhFY3JH 3u3tUDPq6X0rt3CZ5+1/Zy8Azd1UCtzkZ6n73qmmXh6pKTjtObw9bTau9/J3A7n6 TNicyobKn+pwkfzHzsdxRZDxXMiHOGYtwGDBWuNJnHk76dm+W7GC3bd6T2+2sVSv TZYRmLFTaPD25hMjiy282z1DiFq2fRxBE/bTNIVZz5vEPTzAjmY= =EgUI -----END PGP SIGNATURE----- --nextPart2203087.bQLt5E2yDt--