From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id CFjTMCrJeGIBPAAAbAwnHQ (envelope-from ) for ; Mon, 09 May 2022 09:56:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8KjbMCrJeGKxNwAA9RJhRA (envelope-from ) for ; Mon, 09 May 2022 09:56:26 +0200 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 3FDC8B136 for ; Mon, 9 May 2022 09:56:26 +0200 (CEST) Received: from localhost ([::1]:41900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nnyFk-0002Za-Sn for larch@yhetil.org; Mon, 09 May 2022 03:56:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnyFO-0002YB-QF for guix-patches@gnu.org; Mon, 09 May 2022 03:56:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33798) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nnyFO-0004SZ-A8 for guix-patches@gnu.org; Mon, 09 May 2022 03:56:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nnyFO-0005yv-6C for guix-patches@gnu.org; Mon, 09 May 2022 03:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55248] [PATCH v3 8/9] gnu: chez-scheme-for-racket: Fix supported systems. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 May 2022 07:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55248 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Liliana Marie Prikler , 55248@debbugs.gnu.org Cc: Maxime Devos , Liliana Marie Prikler Received: via spool by 55248-submit@debbugs.gnu.org id=B55248.165208292422944 (code B ref 55248); Mon, 09 May 2022 07:56:02 +0000 Received: (at 55248) by debbugs.gnu.org; 9 May 2022 07:55:24 +0000 Received: from localhost ([127.0.0.1]:55928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnyEm-0005y0-Dy for submit@debbugs.gnu.org; Mon, 09 May 2022 03:55:24 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:37531) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnyEk-0005xn-T1 for 55248@debbugs.gnu.org; Mon, 09 May 2022 03:55:23 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 8A03B5C00F2; Mon, 9 May 2022 03:55:16 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 09 May 2022 03:55:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= philipmcgrath.com; h=cc:cc:content-transfer-encoding :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; t=1652082916; x=1652169316; bh=wWhPYsUrx8 167fGdENcpTKYudPSntvWJSuTgs6xpPwU=; b=ggL0uSCmt1uJ0+END/BWiX7Ial 1j3/lzbIF8vBOUffd9/1R84CjOrE36KJ4NI00R/YqA+rlSO31rCeHEAeV1GKlUM8 qvlZhXPffLtYa/f74scdRl0U93ytRnl4Y2VrKD28jWEAnIL2YQJDdVXDLnFUwvhX J66owe52/Oc8KXCNdVMvDAt7v/y7Fa8k1WtVNP6I4LevFTx37G2XSasVh9UWeGjE /ZJ7q7MRImqpUskNjO5yoCz6EsOMGdOcsajjCsGzFQ5dbPcTKJut8Voj7Nlk/RP8 jI5bI8KstxYXUG+Y97BdxtvVzIw/vQh7HPw+sUCFD1nPGiLTYYTR7C38Wd2Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=fm1; t=1652082916; x=1652169316; bh=wWhPYsUrx8167 fGdENcpTKYudPSntvWJSuTgs6xpPwU=; b=h79UwJigD0XFnz0gP2o1ZrE/VsPNa GiY5UHpYUdLg2ii3hkE6JJpee0MV+z5FEfCY5vBPzftxjCl3vxEpqOInsMMBkXUe yhyVMFbEEkCQgXBQsoPYkDT0Zy7BXi2XljQDaqnPEeVju8xI7UB7r1PVzahfARJt nLjSII8yIzYziJKIJtbSi0pbLeDz7RkN+8MGwWudUmY6KMd1TbrWGblOqKto39wq Zj/0olYJrJ2eSHk33Bm+XXTVPujCqo5tTf1+pGFCgu0P0XZptxWD5wCgBt2CZOXi bTW/BZ37qtf6MTgtqLXJPMlDQlRHbXi89jDsSgNCY2D3OPjYqdwLaoijg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeekgdduvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpefrhhhi lhhiphcuofgtifhrrghthhcuoehphhhilhhiphesphhhihhlihhpmhgtghhrrghthhdrtg homheqnecuggftrfgrthhtvghrnhepueejgeeltdeugfdvgfdtjefhhedtledtieffvdet ieegieetfedvgefffeelgeetnecuffhomhgrihhnpeguihhstghouhhrshgvrdhgrhhouh hpnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphhh ihhlihhpsehphhhilhhiphhmtghgrhgrthhhrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 9 May 2022 03:55:16 -0400 (EDT) Message-ID: <7e8f385e-d2b5-6f38-fe4b-030748519574@philipmcgrath.com> Date: Mon, 9 May 2022 03:55:15 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Content-Language: en-US References: <1328772b3ccb2d3909f8bca6fe14659e04434e3e.1652075689.git.philip@philipmcgrath.com> <1e7cf69aa12c81effaf2eb1ceff0997faca1cab2.camel@ist.tugraz.at> From: Philip McGrath In-Reply-To: <1e7cf69aa12c81effaf2eb1ceff0997faca1cab2.camel@ist.tugraz.at> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652082986; 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=wWhPYsUrx8167fGdENcpTKYudPSntvWJSuTgs6xpPwU=; b=ts9+TGq6RJ0Li84biSGfRo4XYTlc0rhIk7iUeZvygT80C9Phg2cCarEHoVMRcaEMJigRVF 4H0LiVDl1pqQHQ7RqsV0wuwz8Y/y5tAsh4YlLABlYUPIa3HyDEakfpte04+6F2B8bTVosc 19YlmSzZChTvheyIX1VLraLJ1dcB9uOPeqJ6xBEworXX2fWyylZWgsLCFb0aXQePp4u36Y DrOF86QNyR8kdZVIbgTEAEBkq00loReLFfbaAFqlyqZwSCWmr36mlDMV/9xL6JT9lM9eJr XA7UqpxRyVfqmqCFW5ebPx0hhCTmLelq4xRzz1Zbyb0zErK9bJbPXCRAl6BMxg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652082986; a=rsa-sha256; cv=none; b=RRf3gm8ennev0aWg7oebQmInfkQ2rFQs9XdlvahDwGk6PjugRZZ+qbH4FnqthlTwHuYB57 lGMmOd4u4x1xXDEXQ3TLg+6/96IFcLtTkvXdOvpVqwGMFzNJsxUbeDiWiKw+aL6ENax+Qf zKFKO7+e8vfaVN2fBwe1Ca/iCSy9aXeH3r9CEdudbyP3AYTa1kqKjCyFeDx8dvoLD7Ba+z mGAH0VT/7QLNoPyCNs8nwjrx19peco1WbyaqGUu3OXXZs+BC1LtTvHHyGykeMjWY47+gTm c27rOLZFR6q4LmWFluv9AqQyz8uzJlJCerVymdPRObKtwQO1jwejAfE95o1N1g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=fm1 header.b=ggL0uSCm; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=h79UwJig; 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: 1.20 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=fm1 header.b=ggL0uSCm; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=h79UwJig; 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: 3FDC8B136 X-Spam-Score: 1.20 X-Migadu-Scanner: scn0.migadu.com X-TUID: dEkzYF9DSaT/ Hi, On 5/9/22 02:34, Liliana Marie Prikler wrote: > Am Montag, dem 09.05.2022 um 02:02 -0400 schrieb Philip McGrath: >> Once the issues in are >> resolved, 'chez-scheme-for-racket' and 'racket-vm-cs' will be able to >> run even on systems for which native code generation is not >> supported. It's not clear what behavior would be useful from 'nix- >> system->chez-machine': since the current implementation is flawed and >> easy to misuse, we remove it for now, replacing the remaining uses >> with 'racket-cs-native-supported-system?'. > I think you're again making a wrong assumption here. nix-system->chez- > scheme has purposes outside of solving supported-system. > Concretely, there are no other uses in Guix. I do not know a robust, correct way to use 'nix-system->chez-machine'---certainly not without it growing many additional features, like maybe computing endianness for pbarch backends when we are able to build them. For example, if we continued using it as we did in 'stex', you couldn't build a package graph for nonthreaded Chez simply by applying a package transformation to remove '--threads' from its '#:configure-flags', because that would change the machine type without updating the uses of 'nix-system->chez-machine'. >> +(define* (racket-cs-native-supported-system? #:optional >> +                                             (system >> +                                              (or (%current-target- >> system) >> +                                                  (%current- >> system)))) >> +  "Can Racket's variant of Chez Scheme generate native code for >> SYSTEM? >> +Otherwise, SYSTEM can use only the ``portable bytecode'' backends." >> +  (let ((chez-arch (target-chez-arch system)) >> +        (chez-os (target-chez-os system))) >> +    (and (and=> (assoc-ref %chez-features-table chez-os) >> +                ;; NOT assoc-ref: supported even if cdr is #f >> +                (cut assoc chez-arch <>)) >> +         #t))) > I think this should rather be explicit in %chez-features-table. You > can prefix features that only work inside racket with 'racket-. Then, > this can be solved with memq just as with chez-scheme's supported- > systems in 7/9. > I don't understand this. The presence of an entry in '%chez-features-table' explicitly means that 'chez-scheme-for-racket' can generate native code. The idea is that the "portable bytecode" backends should work, including thread support, on any system with a reasonably capable C compiler. There are no other "features" that vary among systems for 'chez-scheme-for-racket'. It doesn't rely on pre-built bootfiles for bootstrapping. Since the initial fork at the beginning of 2017, when support for new systems has been added, native threads have been supported immediately. Racket regularly merges all changes from upstream Chez (which has not added any supported systems during that time---not even the systems added already in Racket's variant). These conditions are documented in the comments on '%chez-features-table'. If they ever ceased to hold, it would mean that the relationship between 'chez-scheme-for-racket' and upstream 'chez-scheme' had changed significantly, and we would probably need to reevaluate more broadly which variant to use where. -Philip