Here are my steps for setting up SBCL (Steel Bank Common Lisp) and Slime (Emacs Lisp mode) to work under Windows Vista.
It’s mostly straightforward, except for dealing with spaces in path names. It turns out that slime.el uses the (split-string) function to pull apart the Lisp command line, which won’t work with the default “c:\program files\…” location. Here’s how to fix that, using symbolic links (yes, Windows supports them too!).
The following was tested on a Vista box, SBCL 1.0.13, and Slime 2.0 on Emacs 22.2.1.
Installing SBCL:
- Download and install SBCL. By default, it will install to c:\Program Files\Steel Bank Common Lisp\1.0.13
- Run cmd.exe as Administrator (required for symbolic links)
- Set up a link from SBCL install directory, to some location without spaces. Note that the syntax is an inverse of the Unix ‘ln’ command.
C:\Users\Rob\Documents>ver
Microsoft Windows [Version 6.0.6000]C:\Users\Rob\Documents>mklink /d SBCL “c:\Program Files\Steel Bank Common Lisp\1.0.13″
symbolic link created for SBCL <<===>> c:\Program Files\Steel Bank Common Lisp\1.0.13C:\Users\Rob\Documents>dir sbcl*
…
04/09/2008 09:07 PM <SYMLINKD> SBCL [c:\Program Files\Steel Bank Common Lisp\1.0.13]
Installing Emacs and Slime:
- Download Emacs, unzip it to any location (eg. c:\Program Files\emacs). If desired, run the emacs\bin\addpm.exe program to add a link to the start menu.
- Download Slime, and unzip it under your emacs/site-lisp directory.
- Add the following to your ~/.emacs file:
(setq inferior-lisp-program “c:/users/rob/documents/sbcl/sbcl.exe –core c:/users/rob/documents/sbcl/sbcl.core”)
(require ’slime)
(slime-setup) - Restart Emacs, and then run M-x run-lisp to test whether Lisp starts up.
- Start slime with M-x slime. Happy hacking!
robert | 11-Apr-08 at 7:53 pm | Permalink
Also, here are some notes for getting ASDF-install to work with SBCL and Windows. They weren’t worth their own blog posting, really.
It’s tricky to get asdf-install to work in a Windows SBCL installation, due to a combination of reliance on Unix tools for archive processing, and some problems with inter-process communication on the Windows port of SBCL.
This produces errors such as the following, when trying to run asdf-install:
Here’s a method to get this up and running. The following was done using SBCL 1.0.13 and a recent version of ASDF-Install, all running on a Windows Vista machine.
I. The tools
First, get a copy of ASDF-Install from the “asdf-install-unstable” repository:
http://common-lisp.net/project/asdf-install/asdf-install_latest.tar.gzSBCL comes with its own, older version - I just installed this new one right on top of the old one, in the sbcl/asdf-install directory.
Second, you’ll need Cygwin, for the bash and tar programs from Unix. Plus, it’s a very cool toolset.
http://www.cygwin.comII. The kluges
Now time for some diffs.
First of all, in asdf-install/variables.lisp, customize the paths to match your Cygwin install. In particular, the following: (changed lines in boldface)
Second, in asdf-install/installer.lisp, in the function tar-arguments, we get rid of extra backslashes and double quotes:
Finally, a change in asdf-install/port.lisp: the function return-output-from-program has got to lose its output redirection, because it confuses Win32 SBCL. (In effect, it will no longer return any output from program, but be that as it may.
) The new version looks like:
3. The results.
Now everything should be ready to run.
A few additional notes:
1. At the “Install where?” prompt, it’s easiest to install to the local directory. System-wide install will fail because of Vista user-access control, unless you’re running your Lisp session as root.
2. GPG verification isn’t supported on Win32 SBCL, and would require more kluging.
3. ASDF by itself expects all definition files to be linked manually to the repository directory. For a quick script to automate that, see this page:
http://www.cliki.net/asdf- under the Alternative Sysdef Search functionality heading.