Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Lisp on Mac M1

967 views
Skip to first unread message

Alan Canales

unread,
Oct 26, 2021, 11:30:37 AM10/26/21
to
I'm trying to use Lisp on Apple silicon but can't still. Any recommendations?

Thank you.

Peri Didaskalou

unread,
Oct 26, 2021, 12:26:18 PM10/26/21
to

Stephane Tougard

unread,
Oct 26, 2021, 1:08:07 PM10/26/21
to
Hi,

Install the port from https://www.macports.org/

Insure that /opt/local/bin is in PATH

export PATH=/opt/local/bin:$PATH
sudo port install sbcl

Then :

stephane@Stephanes-MacBook-Pro ~ % uname -a
Darwin Stephanes-MacBook-Pro.local 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:31 PDT 2021; root:xnu-7195.121.3~9/RELEASE_ARM64_T8101 arm64
stephane@Stephanes-MacBook-Pro ~ % sbcl
This is SBCL 2.1.9, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
*


I could not get clisp working (compilation failed)

I could install ccl, but I could not get it working (seems there is no
valid kernel for the M1).

So I guess, you have to use sbcl for the time being.

Stéphane

nemo

unread,
Oct 26, 2021, 2:17:41 PM10/26/21
to
Roberto posted this a few months ago:
https://sourceforge.net/p/clisp/bugs/742/?limit=25#7773

(I have not tried it, though.)
N.

nemo

unread,
Oct 27, 2021, 11:04:54 AM10/27/21
to
On 2021-10-26 12:33, Stephane Tougard wrote (in part):
> I could not get clisp working (compilation failed)
>
> I could install ccl, but I could not get it working (seems there is no
> valid kernel for the M1).
>
> So I guess, you have to use sbcl for the time being.
>
> Stéphane

Clisp is available via Homebrew:
build [~]=> file /opt/homebrew/bin/clisp
/opt/homebrew/bin/clisp: Mach-O 64-bit executable arm64

/opt/homebrew/bin/clisp: Mach-O 64-bit executable arm64
build [~]=> /opt/homebrew/bin/clisp --version
GNU CLISP 2.49.92 (2018-02-18) (built on hmbrw-a-001-m1-005.local
[127.0.0.1])
Software: GNU C Apple LLVM 12.0.5 (clang-1205.0.22.9)
[...]

N.

argenfargen

unread,
Aug 6, 2022, 3:09:25 AM8/6/22
to
On Tuesday, October 26, 2021 at 4:30:37 PM UTC+1, alanraf...@gmail.com wrote:
> I'm trying to use Lisp on Apple silicon but can't still. Any recommendations?
>
> Thank you.
I looked through the ruby code on homebrew for clisp.
So, I adapted that:
curl https://alpha.gnu.org/gnu/clisp/clisp-2.49.92.tar.bz2 -o clisp-2.49.92.tar.bz2
tar xf clisp-2.49.92.tar.bz2
cd clisp-2.49.92/src/gllib/

Edited "vma-iter.c" to delete this line (line 1330):
# if defined __ppc64__ || defined __x86_64__

and replaced it with:
# if defined __aarch64__ || defined __ppc64__ || defined __x86_64__

It compiled and passed a lot of tests and gives me:
usr~/clisp-2.49.92/src> file clisp
clisp: Mach-O 64-bit executable arm64

argenfargen

unread,
Aug 6, 2022, 4:05:47 AM8/6/22
to
Steel Bank now has version 2.1.2 for macos M1. I've rebuilt sbcl 2.2.7 with it and taht passes regression tests.
It's on the sbcl.org site. Click on "Downloads" link and it takes you to a table showing 2.1.2 and will download from sourcforge.com

Zyni Moë

unread,
Aug 16, 2022, 3:44:48 PM8/16/22
to
argenfargen <kkime...@gmail.com> wrote:

> Steel Bank now has version 2.1.2 for macos M1. I've rebuilt sbcl 2.2.7
> with it and taht passes regression tests.

I found that you can use x64 ccl using Rosetta to cross-compile sbcl for
M1. Is very slow but once you have done it once you can of course use
resulting sbcl to rebuild itself, much faster,so now

This is SBCL 2.2.7.96-ceb434314, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.


--
the small snake
0 new messages