ChezScheme icon indicating copy to clipboard operation
ChezScheme copied to clipboard

Pull or Backport ARM64 Support from the Racket Backend Version

Open haziz opened this issue 5 years ago • 6 comments

It would be ideal if the appropriate code is pulled or backported from the Racket backend fork of Chez Scheme to allow compiling on aarch64 ARM64 architecture.

I did finally manage to compile and install Chez Scheme on aarch64 running on a Raspberry Pi 4 running 64bit Raspberry Pi OS (formerly called Raspbian), using the Racket backend fork. It did take me a while to figure it out since the Chez Scheme fork used by Racket is not well documented (probably understandable since it is intended as a backend for another project), and I did not initially know how to git checkout the needed submodules (nanopass, zlib etc.).

I also left a suggestion on the Racket fork issues list suggesting that they do a pull request of the appropriate code. I am not a sophisticated or advanced enough coder to do the work myself.

With the continued rise of ARM architecture (probably now the dominant CPU architecture when one counts all the phones/tablets etc.), it is important for Chez Scheme to stay current and relevant, and support this important architecture. Also with the recent shift of Apple to their "M1" ARM architecture, it may give a leg up on porting to that.

haziz avatar Dec 19 '20 13:12 haziz

Did you build Racket fork of Chez Scheme?

amirouche avatar Jan 07 '21 22:01 amirouche

How did you do it? Please :roll_eyes:

amirouche avatar Jan 07 '21 22:01 amirouche

Amirouche, I've built the fork on several arm64 machines (a Raspberry Pi 4 running Raspberry OS, a Pine64 tablet running Mobian, a Lenovo tablet running Debian under Termux, and a Lenovo Chromebook running Google's “Linux”), merely by following the instructions in the fork's BUILDING file. All the builds passed the smoke test, though I haven't tried any real code on them yet. Unfortunately, the Racket fork is version 9.5.3, versus this repository's 9.5.5. and I want to do some experiments with Swish, which needs 9.5.4 or .5.

vmanis avatar Jan 08 '21 06:01 vmanis

I started work on an arm64 port a while back as an educational venture, but I have less time to work on it now. My branch has some outstanding issues; however, it is bootstrapped. I haven't looked into Racket, but someone may be able to incorporate some of their work onto this branch which is already up to 9.5.5.

You can find a squashed and rebased version of my branch here. Set-up instructions for arm64 are at the end of the BUILDING file.

Some key work that remains is:

  • support foreign-callable (can call C, but cannot be called by C)
  • support multi-threading
  • get all mats to pass
  • revisit logical immediates
  • review

DylanWaddell avatar Jan 10 '21 21:01 DylanWaddell

I am interested too in using vanilla Chez Scheme on arm64 - my use case is embedding it as a scripting language in other programs. I have a setup for Chez Scheme on amd64 and it's working nicely.

Using the arm64 version of Racket would be quite inconvenient, as it's much bigger and I'd need to extract the underlying Chez kernel (kernel.o / libkernel.a) and boot files.

Any status update on this issue? If needed, I may be able to dedicate some time to help backporting arm64 support from Racket's fork of version 9.5.5 to Chez Scheme version 9.5.8

cosmos72 avatar Aug 22 '22 07:08 cosmos72

已收到

Sshanfeng avatar Aug 22 '22 07:08 Sshanfeng

This can now be closed, I believe.

sorawee avatar Oct 18 '23 16:10 sorawee

@sorawee, would you care to explain the reason for proposing to close this issue?

I could not find any mention of arm64 (officially "aarch64") support on 9.6.4 release notes published two days ago, on 16 Oct. 2023

cosmos72 avatar Oct 18 '23 16:10 cosmos72

Changes from the Racket fork are already merged back to Chez Scheme in Git HEAD. See https://groups.google.com/g/chez-scheme/c/D7g6mIcYLNU for details.

sorawee avatar Oct 18 '23 16:10 sorawee

Excellent, that's great news! At risk of nitpicking, can we keep this issue open until a Chez Scheme version with aarch64 support is released ?

cosmos72 avatar Oct 18 '23 16:10 cosmos72

At risk of nitpicking, can we keep this issue open until a Chez Scheme version with aarch64 support is released ?

I believe most projects close issues at the point that a fix is merged, and this project appears to follow that behaviour. It would be a bit odd to handle this one issue differently.

If your goal is to be notified when the feature appears in a release without watching the whole repo, I would suggest using the repo "watch" custom option to watch releases only.

jryans avatar Oct 18 '23 16:10 jryans