From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 17 01:02:56 2023 Received: (at submit) by debbugs.gnu.org; 17 Mar 2023 05:02:56 +0000 Received: from localhost ([127.0.0.1]:43440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pd2Ex-0001uh-E5 for submit@debbugs.gnu.org; Fri, 17 Mar 2023 01:02:56 -0400 Received: from lists.gnu.org ([209.51.188.17]:54632) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcxJs-0002Fy-Aa for submit@debbugs.gnu.org; Thu, 16 Mar 2023 19:47:41 -0400 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 1pcxJs-0007u2-4K for guix-patches@gnu.org; Thu, 16 Mar 2023 19:47:40 -0400 Received: from ms-10.1blu.de ([178.254.4.101]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcxJp-0002sc-2R for guix-patches@gnu.org; Thu, 16 Mar 2023 19:47:39 -0400 Received: from [176.199.211.189] (helo=dolos) by ms-10.1blu.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcxJj-0003Fk-LA for guix-patches@gnu.org; Fri, 17 Mar 2023 00:47:31 +0100 From: Tim Johann To: guix-patches@gnu.org Subject: Chez Scheme for Racket build on aarch64 (patch attached) Date: Fri, 17 Mar 2023 00:23:46 +0100 User-agent: mu4e 1.8.13; emacs 29.0.60 Message-ID: <87h6ukntrg.fsf@phrogstar.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Con-Id: 303810 X-Con-U: 0-timjohann X-Originating-IP: 176.199.211.189 Received-SPF: pass client-ip=178.254.4.101; envelope-from=t1m@phrogstar.de; helo=ms-10.1blu.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 17 Mar 2023 01:02:54 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: multipart/alternative; boundary="==-=-=" --==-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Guix Team, tl;dr; The recipe for package 'chez-scheme-for-racket-bootstrap-bootfiles' (a dependency for racket-8.*) needs to use the --machine flag to build on aarc= h64 (and possibly also ppc32, the other non-x86 architectures supported by the Racket fork of Chez Scheme). I therefore suggest the attached patch to make building and using Racket possible on aarch64 Guix. End of tl;dr; A few weeks ago I wanted to use Racket on Guix on aarch64, but was made awa= re, that Racket was not available as a substitute and it did not build. On the other hand, recent versions of Racket were available on Raspberry Pi OS whi= ch is explicitly running on aarch64. The machine I am running Guix on actually i= s a Raspberry Pi 4B. So, I dug deeper to find that the problem is that the package chez-scheme-for-racket-bootstrap-bootfiles fails with the error ,---- | string-append: contract violation | expected: string? | given: #f | argument position: 1st | other arguments...: | ".def" | context...: | /tmp/guix-build-chez-scheme-for-racket-bootstrap-bootfiles-9.9.9-pre-r= elease.14.drv-0/source/racket/src/rktboot/machine-def.rkt:6:0: open-file-wi= th-machine.def-redirect | error: in phase 'build': uncaught exception: | %exception #<&invoke-error program: "/gnu/store/0n4skakcg05bbq9sq7g00j2zm= 25xh4wa-racket-vm-bc-8.8/opt/racket-vm/bin/racket" arguments: ("../rktboot/= main.rkt") exit-status: 1 term-signal: #f stop-signal: #f>=20 | phase `build' failed after 14.3 seconds | command "/gnu/store/0n4skakcg05bbq9sq7g00j2zm25xh4wa-racket-vm-bc-8.8/opt= /racket-vm/bin/racket" "../rktboot/main.rkt" failed with status 1 | builder for `/gnu/store/d04mbj02vzjv0ljcqy2lxs33scz7kjz0-chez-scheme-for-= racket-bootstrap-bootfiles-9.9.9-pre-release.14.drv' failed with exit code 1 | @ build-failed /gnu/store/d04mbj02vzjv0ljcqy2lxs33scz7kjz0-chez-scheme-fo= r-racket-bootstrap-bootfiles-9.9.9-pre-release.14.drv - 1 builder for `/gnu= /store/d04mbj02vzjv0ljcqy2lxs33scz7kjz0-chez-scheme-for-racket-bootstrap-bo= otfiles-9.9.9-pre-release.14.drv' failed with exit code 1 `---- (see, e.g. the build [442314 on ci.guix.gnu.org]). The Racket fork of Chez is natively supported on aarch64, which is supporte= d by comments in module (gnu packages chez), so I went on to find that machine architecture is communicated in the build process by setting the environment variable MACH. I haven't looked to verify this, but it seems that this environment variable is normally set to a guessed value by the zuo build pr= ocess (zuo for 'make' in Mandarin?). The Guix build recipe for chez-scheme-for-racket-bootstrap-bootfiles, thoug= h, is not configuring the whole downloaded racket source package but takes the shortcut of just building ChezScheme in the subdirectory racket/src/ChezScheme using the Racket utility ../rktboot/main.rkt This script would actually accept the flag '--machine' and would set the environment variable MACH to the value of the argument following the flag. The problem is that in the case of aarch64 the recipe would not set the fla= g. In the recipe for chez-scheme-for-racket-bootstrap-bootfiles in module (gnu packages chez), we find the lines ,---- | #~(invoke | (search-input-file (or native-inputs inputs) | "/opt/racket-vm/bin/racket") | "../rktboot/main.rkt" | #$@(if (racket-cs-native-supported-system?) | #~() | (let ((m (nix-system->pbarch-machine-type))) | #~("--machine" #$m))))))))))))) `---- and, since `(racket-cs-native-supported-system?)' returns `tarm64le', the f= irst branch of the if expression is taken, ommitting the flag. I suggest to change the above code to the following: ,---- | #~(invoke | (search-input-file (or native-inputs inputs) | "/opt/racket-vm/bin/racket") | "../rktboot/main.rkt" | #$@(let ((m (or (racket-cs-native-supported-system?) | (nix-system->pbarch-machine-type)))) | #~("--machine" #$m)))))))))))) `---- which sets the flag for natively supported architectures and those supporte= d by portable bytecode. The package (and subsequently Racket) builds on aarch64, the build on x86_64 seems to be unaffected. It is a simple change which would make a huge difference for Guix users who= want to be able to play with Racket on an aarch64 machine. Cheers Tim L=C3=A1 Fh=C3=A9ile P=C3=A1draig sona dhaoibh! [442314 on ci.guix.gnu.org] --==-=-= Content-Type: text/html; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable

Hi Guix Team,

tl;dr;

The recipe for package 'chez-scheme-for-racket-bootstrap-bootfiles' (a
dependency for racket-8.*) needs to use the =E2=80=93machine flag to build = on aarch64
(and possibly also ppc32, the other non-x86 architectures supported by the<= br/> Racket fork of Chez Scheme). I therefore suggest the attached patch to mak= e
building and using Racket possible on aarch64 Guix.

End of tl;dr;

A few weeks ago I wanted to use Racket on Guix on aarch64, but was made awa= re,
that Racket was not available as a substitute and it did not build. On the=
other hand, recent versions of Racket were available on Raspberry Pi OS whi= ch is
explicitly running on aarch64. The machine I am running Guix on actually i= s a
Raspberry Pi 4B.

So, I dug deeper to find that the problem is that the package
chez-scheme-for-racket-bootstrap-bootfiles
fails with the error

  string-append: contract violation
  expected: string?
  given: #f
  argument position: 1st
  other arguments...:
   ".def"
  context...:
   /tmp/guix-build-chez-scheme-for-racket-bootstrap-bootfiles-9.9.9-pre-rel=
ease.14.drv-0/source/racket/src/rktboot/machine-def.rkt:6:0: open-file-with=
-machine.def-redirect
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "/gnu/store/0n4skakcg05bbq9=
sq7g00j2zm25xh4wa-racket-vm-bc-8.8/opt/racket-vm/bin/racket" arguments=
: ("../rktboot/main.rkt") exit-status: 1 term-signal: #f stop-sig=
nal: #f>=20
phase `build' failed after 14.3 seconds
command "/gnu/store/0n4skakcg05bbq9sq7g00j2zm25xh4wa-racket-vm-bc-8.8/=
opt/racket-vm/bin/racket" "../rktboot/main.rkt" failed with =
status 1
builder for `/gnu/store/d04mbj02vzjv0ljcqy2lxs33scz7kjz0-chez-scheme-for-ra=
cket-bootstrap-bootfiles-9.9.9-pre-release.14.drv' failed with exit code 1
@ build-failed /gnu/store/d04mbj02vzjv0ljcqy2lxs33scz7kjz0-chez-scheme-for-=
racket-bootstrap-bootfiles-9.9.9-pre-release.14.drv - 1 builder for `/gnu/s=
tore/d04mbj02vzjv0ljcqy2lxs33scz7kjz0-chez-scheme-for-racket-bootstrap-boot=
files-9.9.9-pre-release.14.drv' failed with exit code 1

(see, e.g. the build 442314 on ci.guix.gnu.org).

The Racket fork of Chez is natively supported on aarch64, which is supporte= d by
comments in module (gnu packages chez), so I went on to find that machine architecture is communicated in the build process by setting the environmen= t
variable MACH. I haven't looked to verify this, but it seems that this
environment variable is normally set to a guessed value by the zuo build pr= ocess
(zuo for 'make' in Mandarin?).

The Guix build recipe for chez-scheme-for-racket-bootstrap-bootfiles, thoug= h, is
not configuring the whole downloaded racket source package but takes the shortcut of just building ChezScheme in the subdirectory
racket/src/ChezScheme
using the Racket utility
../rktboot/main.rkt
This script would actually accept the flag '=E2=80=93machine' and would set= the
environment variable MACH to the value of the argument following the flag.<= br/>

The problem is that in the case of aarch64 the recipe would not set the fla= g.
In the recipe for chez-scheme-for-racket-bootstrap-bootfiles in module (gnu=
packages chez), we find the lines

#~(invoke
   (search-input-file (or native-inp=
uts inputs)
                      "/opt/racket-vm/=
bin/racket")
   "../rktboot/main.rkt"
   #$@(if (racket-cs-native-supporte=
d-system?)
          #~()
          (let ((m (nix-system->p=
barch-machine-type)))
            #~("--machine"=
 #$m)))))))))))))

and, since (racket-cs-native-supported-system?) returns tarm64le,= the first
branch of the if expression is taken, ommitting the flag.

I suggest to change the above code to the following:

#~(invoke
   (search-input-file (or native-inp=
uts inputs)
                      "/opt/racket-vm/=
bin/racket")
   "../rktboot/main.rkt"
   #$@(let ((m (or (racket-cs-native-supported-system?)
                   (nix-system->pbarch-machine-type))))
        #~("--machine" #$m=
))))))))))))

which sets the flag for natively supported architectures and those supporte= d by
portable bytecode.

The package (and subsequently Racket) builds on aarch64, the build on x86_6= 4
seems to be unaffected.

It is a simple change which would make a huge difference for Guix users who= want
to be able to play with Racket on an aarch64 machine.

Cheers

Tim

L=C3=A1 Fh=C3=A9ile P=C3=A1draig sona dhaoibh!

--==-=-=-- --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=chez-racket-aarch64.patch commit f8d7b06a92b3839da1908837ac81ab6295626cf5 Author: Tim Johann Date: Thu Mar 16 18:53:13 2023 +0100 gnu: chez-scheme-for-racket-bootstrap-bootfiles: change for aarch64. * gnu/packages/chez.scm (chez-scheme-for-racket-bootstrap-bootfiles): change for build on aarch64, making racket available on aarch64. [arguments] use --machine even when architecture is supported by Racket's fork of ChezScheme. diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index c6420a980e..bc709917c2 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -692,10 +692,9 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles (search-input-file (or native-inputs inputs) "/opt/racket-vm/bin/racket") "../rktboot/main.rkt" - #$@(if (racket-cs-native-supported-system?) - #~() - (let ((m (nix-system->pbarch-machine-type))) - #~("--machine" #$m))))))))))))) + #$@(let ((m (or (racket-cs-native-supported-system?) + (nix-system->pbarch-machine-type)))) + #~("--machine" #$m)))))))))))) (supported-systems (package-supported-systems chez-scheme-for-racket)) (home-page "https://github.com/racket/ChezScheme") --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 23 21:38:38 2023 Received: (at 62231) by debbugs.gnu.org; 24 Mar 2023 01:38:38 +0000 Received: from localhost ([127.0.0.1]:39581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfWO5-0003ib-Un for submit@debbugs.gnu.org; Thu, 23 Mar 2023 21:38:38 -0400 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:51229) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfWMY-0003fq-Tz for 62231@debbugs.gnu.org; Thu, 23 Mar 2023 21:38:36 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 403A832002E2; Thu, 23 Mar 2023 21:36:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 23 Mar 2023 21:36:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= philipmcgrath.com; h=cc:content-type: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=fm2; t=1679621811; x= 1679708211; bh=capo7vavydvunRYSZuPKcYWLzKeVrKdPbDgOkLx7hJY=; b=V dDuwQKx4LzyJ7hbIfIqEJbysenm/JS+ibHDSAEZq8XE7KqxTDydPfZz9HYQljDo5 +Gq4GgcxHq1bsetnD9M3a/JhbVSdddPH63a5DzqHUfZEvVZUOEXCaghk2+kFjyuf kcyU3jXTaWwDhe1yALOBYiwvMGZU07fNq+zuXAIr/01752CEejNQptXV98csifZM 3SlwdxgYJls8GUPi2D3HL9SKY83bFxexUsYGK+cVdCA+PYCSHGJQWmLtxk8ArVZs dYQ5Kklw2awbtK3Xz6pK44a6l74icXZhhsmWYDNcU2oN0WtVLf3sK4inIRJitW5d bOhKfkUp/0fPPGDAB3Qwg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id: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; t=1679621811; x=1679708211; bh=capo7vavydvun RYSZuPKcYWLzKeVrKdPbDgOkLx7hJY=; b=LjrOg8UFms3lkizJX0DLJF8KI7Vi3 qFuPhEEDlVB0ZG3B9qT+npSkEEp3Muq0oQhkUEzLfL6wUrgeP1c23LsAsyq2XZr/ nk6j7wj8Bar2V00MZIB9bFYZsgYL2n12OzdiZtP2LPLIt4SrRD9XCzNVxGEalmpg AvWaG5Uxow8vIGsAenv6L3AvtCyBhN3X5NjBUBng9thdhPmkqQN5eOENUAep2Vr3 TkJzuxA53smIIgGECtH0XrpPS32gbPsrQv4S7dB1QcCEStewgiLy9x4vxwQlxITH Z8VC1TSIV6Fp7F/jK3x6GeuXssiZ+4zkJxC1FdglyxiboNmnMXdV8iH1w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeghedgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkjghfgggtsehgtderre dttddvnecuhfhrohhmpefrhhhilhhiphcuofgtifhrrghthhcuoehphhhilhhiphesphhh ihhlihhpmhgtghhrrghthhdrtghomheqnecuggftrfgrthhtvghrnhepledtfeevvdevje egleeltddtteeiveffkeetfedtieehuedtjeduudevhfejkeefnecuffhomhgrihhnpehg ihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehphhhilhhiphesphhhihhlihhpmhgtghhrrghthhdrtghomh X-ME-Proxy: Feedback-ID: i2b1146f3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Mar 2023 21:36:50 -0400 (EDT) From: Philip McGrath To: 62231@debbugs.gnu.org, Tim Johann Subject: Re: Chez Scheme for Racket build on aarch64 (patch attached) Date: Thu, 23 Mar 2023 21:36:42 -0400 Message-ID: <4267909.iIbC2pHGDl@bastet> In-Reply-To: <87h6ukntrg.fsf@phrogstar.de> References: <87h6ukntrg.fsf@phrogstar.de> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart9862253.CDJkKcVGEf"; micalg="pgp-sha512"; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 62231 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --nextPart9862253.CDJkKcVGEf Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii"; protected-headers="v1" From: Philip McGrath To: 62231@debbugs.gnu.org, Tim Johann Subject: Re: Chez Scheme for Racket build on aarch64 (patch attached) Date: Thu, 23 Mar 2023 21:36:42 -0400 Message-ID: <4267909.iIbC2pHGDl@bastet> In-Reply-To: <87h6ukntrg.fsf@phrogstar.de> References: <87h6ukntrg.fsf@phrogstar.de> MIME-Version: 1.0 Hi Tim, On Thursday, March 16, 2023 7:23:46 PM EDT Tim Johann wrote: > A few weeks ago I wanted to use Racket on Guix on aarch64, but was made > aware, that Racket was not available as a substitute and it did not build. > On the other hand, recent versions of Racket were available on Raspberry Pi > OS which is explicitly running on aarch64. The machine I am running Guix > on actually is a Raspberry Pi 4B. > Thanks again for your investigation of this problem! As I commented on the upstream issue at , I still think this is an upstream bug (and your analysis helped a great deal in finding the root cause), but the approach in your patch is probably the easiest way to fix things for Guix users for now. I'd just ask that you add a comment referencing the upstream issue and with some explanation, because it's not my preferred long-term approach. > > [...] > > using the Racket utility > ../rktboot/main.rkt > This script would actually accept the flag '--machine' and would set the > environment variable MACH to the value of the argument following the flag. > > The problem is that in the case of aarch64 the recipe would not set the > flag. In the recipe for chez-scheme-for-racket-bootstrap-bootfiles in > module (gnu packages chez), we find the lines > ,---- > > | #~(invoke > | > | (search-input-file (or native-inputs inputs) > | > | "/opt/racket-vm/bin/racket") > | > | "../rktboot/main.rkt" > | #$@(if (racket-cs-native-supported-system?) > | > | #~() > | (let ((m (nix-system->pbarch-machine-type))) > | > | #~("--machine" #$m))))))))))))) > > `---- > and, since `(racket-cs-native-supported-system?)' returns `tarm64le', the > first branch of the if expression is taken, ommitting the flag. > The "rktboot" scripts (which simulate enough of Chez Scheme to bootstrap its bootfiles) are supposed to be able to infer right machine type for the current platform, at least if the platform is natively supported. The problem is that the upstream code to doesn't actually work on architectures other than i386 and x86_64. > I suggest to change the above code to the following: > ,---- > > | #~(invoke > | > | (search-input-file (or native-inputs inputs) > | > | "/opt/racket-vm/bin/racket") > | > | "../rktboot/main.rkt" > | #$@(let ((m (or (racket-cs-native-supported-system?) > | > | (nix-system->pbarch-machine-type)))) > | > | #~("--machine" #$m)))))))))))) > > `---- > which sets the flag for natively supported architectures and those supported > by portable bytecode. This is a good work-around. The reason I'd like to avoid it in the long run is that, ideally, I'd like to get us out of the business of managing Chez machine types and the translation from normal architecture and OS strings. I think we'll at least be able to eliminate `%chez-features-table` once the ongoing work to reunify upstream Chez Scheme with Racket's branch is complete. Reducing the number of places where we have to use these machine-type- producing functions should help advance that goal, so I'd prefer to have a comment here reminding us that we can reconsider "--machine" once is fixed. -Philip --nextPart9862253.CDJkKcVGEf 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/HHoFAmQc/qoACgkQygNjjfo/ HHqfUQ/+P2CoZiNj0Z5MObpbhiswec/AP5ccFl0qKDKWcdbpps51YSr45kzWeXDk kCb6+rdYzNUzAumX7SWmNV2nq6GyD3YvxMgmNt1gVsUv2DmAAMBfEgOVugS64cCK M/o/KBgBpjB9+bdrRIqNSvWqKn9l7hfn+U065+AMDqvU7Hoi66nl9sDAUf+IO0cU pd33dD8rBrMZvcKhTZc7pN7IUF0JJXyBcOveTLiyBVYGK5YmxdcarjmkogRnyHjU ZDsPMApjyLhkFPYZozIxE8gp5bQ3uN90SFPUjanvQpGE5R4FsCeVkyD3A2uwo5EH piexnfQ9WRDBqR4/Fsrv3QniMSpeaM5i7pvF8bqmPJy6rn0drVmATlR2yaMyhojS L5TRcOfqP+gljAAbHzXsvyvlymtXhIUr4IZfo34trIlmIicxnKKFuhG7gYklSGkS Rxhnw/yA0nL6bb/4SixPLNIzOooJkLRx3OnUw08BewsbDoE2QIIww2dt9LntmTCK NnU31pGP6Ua/AZAT3lUv1Htu3S1PA/RA4ZyWQO8FnAu7BLiuAftRZDpuNTPz47rJ tkC4chURT6PD1wYgvfC3UJivC+GrfGNb0u8o3CgSrVZnyldIEbA1Uyb7Y7Fp6+7e 6SGYFol67mfE4y80xYRblreTpRFt0lRoO6Hper+AsL8G+jxjVZs= =9y03 -----END PGP SIGNATURE----- --nextPart9862253.CDJkKcVGEf-- From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 24 16:16:03 2023 Received: (at 62231) by debbugs.gnu.org; 24 Mar 2023 20:16:03 +0000 Received: from localhost ([127.0.0.1]:41436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfnpS-0004M3-O8 for submit@debbugs.gnu.org; Fri, 24 Mar 2023 16:16:03 -0400 Received: from ms-10.1blu.de ([178.254.4.101]:60858) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfnpQ-0004LU-LA for 62231@debbugs.gnu.org; Fri, 24 Mar 2023 16:16:01 -0400 Received: from [176.199.211.189] (helo=dolos) by ms-10.1blu.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pfnpO-0007BR-VT; Fri, 24 Mar 2023 21:15:59 +0100 From: Tim Johann To: 62231@debbugs.gnu.org, Philip McGrath Subject: Re: Chez Scheme for Racket build on aarch64 (patch attached) Date: Fri, 24 Mar 2023 21:03:19 +0100 References: <87h6ukntrg.fsf@phrogstar.de> <4267909.iIbC2pHGDl@bastet> User-agent: mu4e 1.8.13; emacs 29.0.60 In-reply-to: <4267909.iIbC2pHGDl@bastet> Message-ID: <87r0tdq51d.fsf@phrogstar.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Con-Id: 303810 X-Con-U: 0-timjohann X-Originating-IP: 176.199.211.189 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 62231 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Disposition: inline Hi Philip, Happy to be of help. Thanks for the pointers, here's the amended patch. I hope it is to your liking. cheers Tim --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=chez-racket-aarch64-rev1.patch commit e3c514db745d48e5ef7f7abb7b45037341298b17 Author: Tim Johann Date: Fri Mar 24 21:09:52 2023 +0100 gnu: chez-scheme-for-racket-bootstrap-bootfiles: change for aarch64. * gnu/packages/chez.scm (chez-scheme-for-racket-bootstrap-bootfiles): Temporary change for build on aarch64, making racket available on aarch64. Architecture autodetect in rktboot only addresses x86 archs, so far. This work-around sets the architecture, looked up in translation table, explicitly. The long term solution should be to fix rktboot to include other natively supported architectures in the autodetect mechanism. cf. https://github.com/racket/racket/issues/3948 [arguments] use --machine even when architecture is supported by Racket's fork of ChezScheme. diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index c6420a980e..ab6eaba6bd 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -692,10 +692,12 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles (search-input-file (or native-inputs inputs) "/opt/racket-vm/bin/racket") "../rktboot/main.rkt" - #$@(if (racket-cs-native-supported-system?) - #~() - (let ((m (nix-system->pbarch-machine-type))) - #~("--machine" #$m))))))))))))) + ;; Temporary handling of builds on non-x86 architectures, + ;; see https://github.com/racket/racket/issues/3948 + ;; Autodetect in rktboot only addresses x86 archs, so far. + #$@(let ((m (or (racket-cs-native-supported-system?) + (nix-system->pbarch-machine-type)))) + #~("--machine" #$m)))))))))))) (supported-systems (package-supported-systems chez-scheme-for-racket)) (home-page "https://github.com/racket/ChezScheme") --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 25 07:50:54 2023 Received: (at 62231) by debbugs.gnu.org; 25 Mar 2023 11:50:54 +0000 Received: from localhost ([127.0.0.1]:41877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pg2QA-0003qO-2u for submit@debbugs.gnu.org; Sat, 25 Mar 2023 07:50:54 -0400 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:55829) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pg2Q8-0003qB-HR for 62231@debbugs.gnu.org; Sat, 25 Mar 2023 07:50:53 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailnew.nyi.internal (Postfix) with ESMTP id DB24058226F; Sat, 25 Mar 2023 01:36:35 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sat, 25 Mar 2023 01:36:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= philipmcgrath.com; h=cc:cc:content-type: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=fm2; t= 1679722595; x=1679729795; bh=/kVa1/JW8Gie/Mm3gdp6WVGWKJPJXys8WOl wm4x5HGc=; b=dPRTKs9GObTmQZYKDMhL2eworHIkij29yDJzB5Z0nPiEN4vrOK5 lQXOaPyY0uJRh158KHA4xcEPtddjUf+j34mTRc9/AEpfxtWFh1w+9I0HbDSZ0gB/ g4PvktyZoqI9lHLY257CLoi89owwD5/d7P/U4GIPZskTCHn2O6wXJNC1gYw59Tm9 plu1MqWLmv/eLmiBCgj9DEJgVOjyQMVbqiCzP6wWqipxOWRNJJxrsl7aFA2abEJi hrSkYfsv2WwDnkjEmG9KbK3OkGUceY/o/OncdAYkJOCpK7tc7VPZgyANrL5XrAwW NVJfdaW0XCamt7AG5GILYgXqwFAKQSFkAJQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id: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; t=1679722595; x=1679729795; bh=/kVa1/JW8Gie/ Mm3gdp6WVGWKJPJXys8WOlwm4x5HGc=; b=Smd0NU9kgWviUgdoQgubRuOjYhbMZ UpzyGQpZ0Km3lHyjbRYHimY/zCDtabEZFQozyqWsGOUm/1RrQ7Sif4y+NOrNJ5GY Hy6reANbC4neUOIuO/a0xxit4RH92UkW6nrmPxmJKPfNr6zvTSNGwweH/W7YNBoN 2k/8Sp2NlBLrRJr1iJZY0MU3tOXukYQFjUBVQuHT9H201W0zH2I+Hg6Mpjtlfr3D u7c0BjfWiRBYXlkUVTnmdP5NPBdUmVExIshyomnF/QoyG2IgAR19x8zohSYlDWVy K+EFKmHzMCKFe37XgJfP5EcRESyz2J/IiQ2YZ3NIEcHVDxJ3QkgdyWkXg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdegjedgkeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkfgjfhggtgesghdtre ertddtvdenucfhrhhomheprfhhihhlihhpucfotgfirhgrthhhuceophhhihhlihhpsehp hhhilhhiphhmtghgrhgrthhhrdgtohhmqeenucggtffrrghtthgvrhhnpeffkeduueeute ejjefggfdvhfegffetgfekgedtteeitdekhfelueeludehleefhfenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehphhhilhhiphesphhhihhlih hpmhgtghhrrghthhdrtghomh X-ME-Proxy: Feedback-ID: i2b1146f3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 25 Mar 2023 01:36:25 -0400 (EDT) From: Philip McGrath To: 62231@debbugs.gnu.org, Tim Johann Subject: Re: Chez Scheme for Racket build on aarch64 (patch attached) Date: Sat, 25 Mar 2023 01:36:17 -0400 Message-ID: <13237587.uLZWGnKmhe@bastet> In-Reply-To: <87r0tdq51d.fsf@phrogstar.de> References: <87h6ukntrg.fsf@phrogstar.de> <4267909.iIbC2pHGDl@bastet> <87r0tdq51d.fsf@phrogstar.de> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3229284.aeNJFYEL58"; micalg="pgp-sha512"; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 62231 Cc: ludo@gnu.org, liliana.prikler@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --nextPart3229284.aeNJFYEL58 Content-Type: multipart/mixed; boundary="nextPart2882745.e9J7NaK4W3"; protected-headers="v1" Content-Transfer-Encoding: 7Bit From: Philip McGrath To: 62231@debbugs.gnu.org, Tim Johann Cc: ludo@gnu.org, liliana.prikler@gmail.com Subject: Re: Chez Scheme for Racket build on aarch64 (patch attached) Date: Sat, 25 Mar 2023 01:36:17 -0400 Message-ID: <13237587.uLZWGnKmhe@bastet> In-Reply-To: <87r0tdq51d.fsf@phrogstar.de> MIME-Version: 1.0 This is a multi-part message in MIME format. --nextPart2882745.e9J7NaK4W3 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" On Friday, March 24, 2023 4:03:19 PM EDT Tim Johann wrote: > Hi Philip, > > Happy to be of help. > > Thanks for the pointers, here's the amended patch. I hope it is to your > liking. > Thanks, this addresses my concerns! I'm not a Guix committer, so I'm cc'ing a couple of people who have applied recent patches to this file. They may want to review the commit message for style, also. I expect the underlying issue would also affect riscv64, but I hit some network trouble when trying to look for a build log just now. -Philip --nextPart2882745.e9J7NaK4W3 Content-Disposition: attachment; filename="chez-racket-aarch64-rev1.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="unicode-2-0-utf-8"; name="chez-racket-aarch64-rev1.patch" commit e3c514db745d48e5ef7f7abb7b45037341298b17 Author: Tim Johann Date: Fri Mar 24 21:09:52 2023 +0100 gnu: chez-scheme-for-racket-bootstrap-bootfiles: change for aarch64. * gnu/packages/chez.scm (chez-scheme-for-racket-bootstrap-bootfiles): Temporary change for build on aarch64, making racket available on aarch64. Architecture autodetect in rktboot only addresses x86 archs, so far. This work-around sets the architecture, looked up in translation table, explicitly. The long term solution should be to fix rktboot to include other natively supported architectures in the autodetect mechanism. cf. https://github.com/racket/racket/issues/3948 [arguments] use --machine even when architecture is supported by Racket's fork of ChezScheme. diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index c6420a980e..ab6eaba6bd 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -692,10 +692,12 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles (search-input-file (or native-inputs inputs) "/opt/racket-vm/bin/racket") "../rktboot/main.rkt" - #$@(if (racket-cs-native-supported-system?) - #~() - (let ((m (nix-system->pbarch-machine-type))) - #~("--machine" #$m))))))))))))) + ;; Temporary handling of builds on non-x86 architectures, + ;; see https://github.com/racket/racket/issues/3948 + ;; Autodetect in rktboot only addresses x86 archs, so far. + #$@(let ((m (or (racket-cs-native-supported-system?) + (nix-system->pbarch-machine-type)))) + #~("--machine" #$m)))))))))))) (supported-systems (package-supported-systems chez-scheme-for-racket)) (home-page "https://github.com/racket/ChezScheme") --nextPart2882745.e9J7NaK4W3-- --nextPart3229284.aeNJFYEL58 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/HHoFAmQeiFEACgkQygNjjfo/ HHoDlQ/+OwDhN809fDIHZilJZTZixuWASu41uOl94qGRsP1zhoZQs4yR9mKWFlku IvJiP7aWgMYU5P62k444+tX/sR4tn8wKhseUOBDDzlnTXbEeOYVHb5aNgO9LkD1W aF9/FvPFD8Syh6Z28nnFUrDfSB4BUd/3oesJpricnvHPVWZShSkdxHAuTz507Cx2 HKpwGAKarF3G3TOWSsP88Hyw2jg/o2dANOsWu7DsZx/yvDgjSfe+vo9Sxt9wKpYf nPx423nIMx/BBJ5m5TBI67Ex+eTZt4nFCAd1P57QQK3wniaZKexzbUEerZ4iipB9 ZuRIe8UlVfOwmU7jZflDWEMfXefUH2O9L67sWxDb3ZXprhhruWcT5fkOJkjvXZZ+ sTzUn4trM3+d2N7vAf1ujsjic8zOgAQLk2e6ASwW3IlMOuDfDOB9nLlNG1hIj+mp CvTBqZJIQ3bzay8bsDRL0enXNBnQl6Mou03gidwBbQkFjyPaBob9T6+HY4yarlkl 22LOM2jO9B8VIfsF/XGVpN2zlDEgMpGwcJa8GjwG/Wx/Yku3RT53ziRd/KW8l+6X ha2fnsq59f/RIlG731Tg3FBn0m2UWv/+EgykJof8zCgwAjkHw3K/KoDewLy8rGMu VRkbUL+NbeufdAgglloygN1eF4fCJFvyIX1qHLOZm09+lmiXSC0= =2oRm -----END PGP SIGNATURE----- --nextPart3229284.aeNJFYEL58-- From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 26 10:26:44 2023 Received: (at 62231-done) by debbugs.gnu.org; 26 Mar 2023 14:26:44 +0000 Received: from localhost ([127.0.0.1]:45649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgRKW-000520-0r for submit@debbugs.gnu.org; Sun, 26 Mar 2023 10:26:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46162) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgRKU-00051m-Fl for 62231-done@debbugs.gnu.org; Sun, 26 Mar 2023 10:26:43 -0400 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 1pgRKO-0007Aj-6L; Sun, 26 Mar 2023 10:26:36 -0400 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=6cKAXjxQ0RmgEgZZp/lEIXLHrRIe3+FMnVCh94nwpCQ=; b=ZgY6gLPsinBHuBsVe65u OdqPVVTLfdSQAu+XOI5RkB14NxYKLjiiGlQhfAuNFWCM66suP57Il3Yj3A5LGCHHoS9FITOyoYBTW jBb739jJnJZ/0ykJb8xfy9ublyXsuMuJib1bXeIeQ4PjSEd9IXUsVqwI7vEWRoPrWP5cNf/RSzQFh +YOgkVY0MzjIw36l5pVyuGCJrO17qDLarDgCVlxWFcMsMa8gHX/2JOJRMua2nJI8Hu6TpIbhPZmPV vh6k3Tvz+mCyVPJDMwI8yQG9Yji6cVOsLIiLx6VxOL2GB8ol7UlbOj+wrPnxjPUi2fhq17B8qbk6l MlCjRtf4ljCqfg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pgRKN-0005xg-Mm; Sun, 26 Mar 2023 10:26:35 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Tim Johann Subject: Re: bug#62231: Chez Scheme for Racket build on aarch64 (patch attached) References: <87h6ukntrg.fsf@phrogstar.de> <4267909.iIbC2pHGDl@bastet> <87r0tdq51d.fsf@phrogstar.de> Date: Sun, 26 Mar 2023 16:26:33 +0200 In-Reply-To: <87r0tdq51d.fsf@phrogstar.de> (Tim Johann's message of "Fri, 24 Mar 2023 21:03:19 +0100") Message-ID: <87ilenbnc6.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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 62231-done Cc: 62231-done@debbugs.gnu.org, Philip McGrath X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Tim Johann skribis: > commit e3c514db745d48e5ef7f7abb7b45037341298b17 > Author: Tim Johann > Date: Fri Mar 24 21:09:52 2023 +0100 > > gnu: chez-scheme-for-racket-bootstrap-bootfiles: change for aarch64. >=20=20=20=20=20 > * gnu/packages/chez.scm (chez-scheme-for-racket-bootstrap-bootfiles): > Temporary change for build on aarch64, making racket available on a= arch64. > Architecture autodetect in rktboot only addresses x86 archs, so far. > This work-around sets the architecture, looked up in translation ta= ble, > explicitly. The long term solution should be to fix rktboot to inc= lude > other natively supported architectures in the autodetect mechanism. > cf. https://github.com/racket/racket/issues/3948 > [arguments] use --machine even when architecture is supported by Ra= cket's > fork of ChezScheme. Applied! Thank you Tim, and thanks Philip for reviewing. Tim: please use =E2=80=98git format-patch=E2=80=99 in the future; the forma= t here cannot be ingested as-is by =E2=80=98git am=E2=80=99. Ludo=E2=80=99. From unknown Fri Jun 20 07:25:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 24 Apr 2023 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator