ChezScheme
ChezScheme copied to clipboard
Support for Apple Silicon and MacPorts
I'm not sure if this is a bug or a feature request, but is it at all possible to have native support for Apple Silicon Macs via MacPorts? The current version doesn't install due to other extant issues but as it stands, MacPorts shows that only x86-64 is supported and not the native arm64 on the new Macs.
I'm sure if someone wants to ship @cfrisz a new M1 mac he'd be happy to work on getting Chez running on it natively. 😄 After that, getting it in to MacPorts and other package managers is handled by people more familiar with them (or has been in the past, anyway)... see, e.g., #82
I will happily develop and package Chez Scheme for the price of an M1 Mac Mini. 😁 Short of that, I would like to load a 64-bit ARM Linux distro on my Raspberry Pi 4 and start work on an arm64le port when I have a chance, which would hopefully get us most of that way to arm64osx.
The Racket fork of Chez Scheme already contains an AArch64 backend: https://github.com/racket/ChezScheme/blob/master/s/arm64.ss
The Racket fork of Chez Scheme already contains an AArch64 backend: https://github.com/racket/ChezScheme/blob/master/s/arm64.ss
I did not install on Apple M1, but your notice did allow me to install the Chez Scheme backend version on ARM (Rasbperry Pi 4) aarch64, so than you! It would be good if they can backport/pull request the needed code to the mainline Dybvig/Cisco project.
I'm sure if someone wants to ship @cfrisz a new M1 mac he'd be happy to work on getting Chez running on it natively. 😄 After that, getting it in to MacPorts and other package managers is handled by people more familiar with them (or has been in the past, anyway)... see, e.g., #82
I'd be happy to provide ssh access for Apple Silicon as well as Power9 Silicon.
I've got my hands on an Apple Silicon machine in the meantime, so the offer is appreciated, but unnecessary (though Power9 could be fun). I have some work on an arm64osx branch, but now I need to make more time for it.
Excellent. Just let me know.
Hi everyone. I've just hit this problem right now and I'm not sure what to do. Any progress on having it running natively on M1?
I'm continuing work on the Apple Silicon support, and should have more time to work on it at the end of the month when I have time off from my day job.
Ideally, I would be able to say that Rosetta 2 support for the a6osx
version should work, but @jltaylor-us and I discovered that there seems to be a regression in that support. We should probably open an issue for that as well.
That said, I ran into the Rosetta 2 issue trying to cross-compile, but I think the pre-built a6osx
binary and boot files should work on M1. Someone else might have the answer at hand, but I'll check later today and update/open issues as appropriate.
That would be absolutely great! Thanks for a quick answer.
I'm here with working MBP 2021 if you need any experimentation on M1 hardware. I'm not that good at mac/nix though since I've never used them before, but I'm willing to help if I can
I appreciate it. I've got an M1 Mac Mini that's my daily driver and Apple Silicon dev machine. I was not making as much time as I hoped I would for the Apple Silicon support for quite a while, so I didn't have work to show. I have made more time recently, so I should push that work to a visible branch soon.
FWIW, I just ran both make install
and the bullyx
mats on the current main branch in a fresh workspace in an intel terminal (i.e., a shell spawned via /usr/bin/arch -x86_64 /bin/bash -l
) with no problems. Well, no real problems... one configuration of the mats said something "seems to take too long", but I'm not going to count a single failure of a timing-based test under emulation as an error unless it's a consistent failure.
As a follow-up from this morning: in line with what @jltaylor-us reported, I was able to build and test a6osx
on my M1 Mac Mini in an x86_64
shell. I tried to reproduce the Rosetta 2 issue we encountered, and I couldn't get it to happen. I'm going to chalk it up to human error until it happens again. This does seem to mean I can do the cross-compile step entirely on the M1 machine, which makes things easier
Any updates here? @cjfrisz
just pinging again @cjfrisz
I've uploaded the current work I have to a draft pull request #607.
I managed to build the Racket fork on my M1 Mac in the meantime. It was a bit confusing, so sharing instructions here in case it helps others:
git clone [email protected]:racket/ChezScheme --depth 1
cd ChezScheme
git submodule init
git submodule update --depth 1
./configure --pb
make tarm64osx.bootquick
# Option 1: /usr/local install
./configure --threads --installschemename=chez
make -j10
sudo make install
echo '(+ 1 1)' | chez -q # should print 2
# Option 2: custom prefix
./configure --threads --installschemename=chez --installprefix=testprefix
make -j10
make install
export SCHEMEHEAPDIRS=testprefix/lib/csv%v/%m
echo '(+ 1 1)' | ./testprefix/bin/chez -q # should print 2
I based the configure flags off the Homebrew formula.
Hopefully #607 will be merged at some point and I can go back to using brew install chezscheme
.
This also can now be closed, I believe.
Can you cut off a new release per this issue close?
relates to https://github.com/Homebrew/homebrew-core/pull/152760