title: SBCL: building a standalone executable
body: <p>How do I build a standalone executable in SBCL?  I've tried</p>
  
  <pre><code>; SLIME 2.20
  CL-USER&gt; (defun hullo ()
                       (format t "hullo"))
  HULLO
  CL-USER&gt; (sb-ext:save-lisp-and-die "hullo" :toplevel #'hullo :executable t)
  </code></pre>
  
  <p>but that just produces the following error.</p>
  
  <pre><code>Cannot save core with multiple threads running.
  
  Interactive thread (of current session):
    #&lt;THREAD "main thread" RUNNING {10019563F3}&gt;
  
  Other threads:
    #&lt;THREAD "Swank Sentinel" RUNNING {100329E073}&gt;,
    #&lt;THREAD "control-thread" RUNNING {1003423A13}&gt;,
    #&lt;THREAD "reader-thread" RUNNING {1003428043}&gt;,
    #&lt;THREAD "swank-indentation-cache-thread" RUNNING
       {1003428153}&gt;,
    #&lt;THREAD "auto-flush-thread" RUNNING {1004047DA3}&gt;,
    #&lt;THREAD "repl-thread" RUNNING {1004047FA3}&gt;
     [Condition of type SB-IMPL::SAVE-WITH-MULTIPLE-THREADS-ERROR]
  </code></pre>
  
  <p>What am I doing wrong?</p>