• Lisp on Mac M1

    From Alan Canales@21:1/5 to All on Tue Oct 26 08:30:33 2021
    I'm trying to use Lisp on Apple silicon but can't still. Any recommendations?

    Thank you.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stephane Tougard@21:1/5 to Alan Canales on Tue Oct 26 18:33:35 2021
    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




    On 2021-10-26, Alan Canales <alanrafacanales@gmail.com> wrote:
    I'm trying to use Lisp on Apple silicon but can't still. Any recommendations?

    Thank you.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peri Didaskalou@21:1/5 to Alan Canales on Tue Oct 26 12:26:11 2021
    Hi Alan, Have you seen this reddit thread?

    https://www.reddit.com/r/lisp/comments/jwqg8f/cl_implementation_support_for_apple_silicon/


    On 2021-10-26 11:30 a.m., Alan Canales wrote:
    I'm trying to use Lisp on Apple silicon but can't still. Any recommendations?

    Thank you.


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nemo@21:1/5 to Peri Didaskalou on Tue Oct 26 14:17:36 2021
    On 2021-10-26 12:26, Peri Didaskalou wrote:
    Hi Alan, Have you seen this reddit thread?

    https://www.reddit.com/r/lisp/comments/jwqg8f/cl_implementation_support_for_apple_silicon/

    On 2021-10-26 11:30 a.m., Alan Canales wrote:
    I'm trying to use Lisp on Apple silicon but can't still. Any
    recommendations?

    Thank you.

    Roberto posted this a few months ago: https://sourceforge.net/p/clisp/bugs/742/?limit=25#7773

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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nemo@21:1/5 to Stephane Tougard on Wed Oct 27 11:04:48 2021
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From argenfargen@21:1/5 to alanraf...@gmail.com on Sat Aug 6 00:09:22 2022
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From argenfargen@21:1/5 to argenfargen on Sat Aug 6 01:05:45 2022
    On Saturday, August 6, 2022 at 8:09:25 AM UTC+1, argenfargen wrote:
    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

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Zyni=20Mo=C3=AB?=@21:1/5 to argenfargen on Tue Aug 16 19:44:43 2022
    argenfargen <kkimes2020@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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)