Blog 2021/12/11
<- previous | index | next ->
Note: these scripts assume you already have Xcode installed, see https://macintoshgarden.org/apps/apple-xcode and install Xcode 3.1.4.
It appears 2.39 was the last version of clisp which shipped a binary release for OS X / PowerPC:
A bit of fiddling revealed that this binary release appears to:
- rely on being placed in
/usr/local/lib/clisp
- rely on the presence of
/sw/lib/libreadline.4.dylib
- have been built against readline 4.3 (4.2 will fail with
dyld: Symbol not found: _rl_insert_mode
)
$ cd clisp-2.39
$ ./clisp
./clisp: /usr/local/lib/clisp/base/lisp.run: No such file or directory
$ sudo mv clisp-2.39 /usr/local/lib/clisp
$ cd /usr/local/lib/clisp
$ ./clisp
dyld: Library not loaded: /sw/lib/libreadline.4.dylib
Referenced from: /usr/local/lib/clisp/base/lisp.run
Reason: image not found
Trace/BPT trap
$ DYLD_PRINT_LIBRARIES=1 ./clisp
dyld: loaded: /usr/local/lib/clisp/./clisp
dyld: loaded: /usr/lib/libSystem.B.dylib
dyld: loaded: /usr/lib/system/libmathCommon.A.dylib
dyld: loaded: /usr/local/lib/clisp/base/lisp.run
dyld: Library not loaded: /sw/lib/libreadline.4.dylib
Referenced from: /usr/local/lib/clisp/base/lisp.run
Reason: image not found
Trace/BPT trap
$ otool -l clisp | grep ' name'
name /usr/lib/dyld (offset 12)
name /usr/lib/libSystem.B.dylib (offset 24)
Note: /sw/
appears to be the Fink installation root.
I was unable to find any downloadable libreadline.4.dylib
files,
so I ended up writing a script which builds it from source.
readline
4.3 will build, but needs a small patch to its shlib/Makefile
to:
- link against ncurses
- fix the version provided by the dylib (4.3, not 4)
Download or copy readline-4.3.tar.gz
into ~/Downloads/
, then run the attached script install-readline-4.3-leopard-powerpc.sh
.
Download or copy clisp-2.39-powerpc-apple-darwin8.7.0-8.7.0.tar.gz
into ~/Downloads/
, then run the attached script install-clisp-2.39-leopard-powerpc.sh
.
clisp
should now run:
$ /usr/local/lib/clisp/clisp
i i i i i i i ooooo o ooooooo ooooo ooooo
I I I I I I I 8 8 8 8 8 o 8 8
I \ `+' / I 8 8 8 8 8 8
\ `-+-' / 8 8 8 ooooo 8oooo
`-__|__-' 8 8 8 8 8
| 8 o 8 8 o 8 8
------+------ ooooo 8oooooo ooo8ooo ooooo 8
Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998
Copyright (c) Bruno Haible, Sam Steingold 1999-2000
Copyright (c) Sam Steingold, Bruno Haible 2001-2006
[1]> (+ 1 1)
2
[2]>
Thanks to:
A trivial performance benchmark:
11 seconds on my 1.25 GHz eMac:
Less than one second on my M1 Mac mini 🤯: