iBoyko - "sort of" a website

Getting SBCL (Steel Banks Common Lisp) Implementation to Support Multiple Threads

A quick and basic instruction on how to get multi-threading to work in SBCL implementation of Common Lisp.

Posted by Yakov Boyko on January 07, 2018

It turns out that some versions of SBCL (Steel Bank Common Lisp) implementation of Common Lisp come with multi-threading disabled by default. In particular, the SBCL 1.4 I had installed on my MacOS did not come with multi-threading enabled.

To check whether your installed version currently supports multiple threads, run:

(member :sb-thread *features*)

If you get NIL as a result, then multi-threading is disabled. How can one enable it?

In short, he needs to build SBCL from its source while indicating that the multi-threading feature is desired.
First, clone the source code using:

git clone https://github.com/sbcl/sbcl.git ~/Downloads/sbcl-source
cd Downloads/sbcl-source/

Then, run:

sh make.sh --with-sb-thread

The build process should take 5-10 minutes and will produce a lot of output.

As the final step, run to install the newly built version (either anew or as an overwrite of the existing SBCL binary).

sh install.sh

After that, start an SBCL REPL and run the command that checks whether multi-threading is enabled again. You should get something like this: