30 4 / 2012

SBCL supports multi-threading on OS X and linux, but unfortunately it doesn’t enable by default on mac. I had a hard time to identify this after I changed to linux to play with hunchentoot. To solve this, I need to enable threads when compile it from the source.

1. Download and unarchive the source.

2. In the root of directory of the source, create a file named customize-target-features.lisp with content

(lambda (features)
      (flet ((enable (x)
               (pushnew x features))
             (disable (x)
               (setf features (remove x features))))
        ;; Threading support, available only on x86/x86-64 Linux, x86Solaris
        ;; and x86 Mac OS X (experimental).
        (enable :sb-thread)))

3. Then, compile and install SBCL from its source.

sh make.sh && sudo sh install.sh

OR

- Donwload and unarchive the source. Then, compile and install with option

sh make.sh --with-sb-thread && sudo sh install.sh
  1. haminhvuong posted this