문제

I'm having trouble getting SBCL to start under slime. I've messed things up and I don't know how to recover. This was working fine until I...

Had a problem loading a package via asdf. At which point I started debugging the asdf.lisp provided with SBCL to see what was going wrong. The sole change I made was to put a (break) in which I removed once I'd figured out what was wrong. All was fine until the next time I tried to start SBCL.

Then I got a swank compilation error saying that the asdf.fasl was older than the asdf.lisp file. That made sense to me so I recompiled the asdf.fasl. The output I'm now getting is:

(progn (load "c:\\emacs-23.1\\site-lisp\\slime\\swank-loader.lisp" :verbose t) (funcall (read-from-string "swank-loader:init")) (funcall (read-from-string "swank:start-server") "c:\\Users\\GILESR~1\\AppData\\Local\\Temp\\slime.3068" :coding-system "iso-latin-1-unix"))

This is SBCL 1.0.37, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.

This is experimental prerelease support for the Windows platform: use
at your own risk.  "Your Kitten of Death awaits!"
* 
; loading #P"c:\\emacs-23.1\\site-lisp\\slime\\swank-loader.lisp"
; loading #P"c:\\hacking\\emacs\\.slime\\fasl\\2010-07-30\\sbcl-1.0.37-win32-x86\\swank-backend.fasl"
; loading #P"c:\\hacking\\emacs\\.slime\\fasl\\2010-07-30\\sbcl-1.0.37-win32-x86\\swank-source-path-parser.fasl"
; loading #P"c:\\hacking\\emacs\\.slime\\fasl\\2010-07-30\\sbcl-1.0.37-win32-x86\\swank-source-file-cache.fasl"

; compiling file "c:\\emacs-23.1\\site-lisp\\slime\\swank-sbcl.lisp" (written 22 JUL 2010 08:15:02 AM):

; file: c:\emacs-23.1\site-lisp\slime\swank-sbcl.lisp
; in: EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE)
;     (REQUIRE 'SWANK-BACKEND::SB-BSD-SOCKETS)
; 
; caught ERROR:
;   (during compile-time-too processing)
;   The function ASDF::MODULE-PROVIDE-ASDF is undefined.

;     (REQUIRE 'SWANK-BACKEND::SB-INTROSPECT)
; 
; caught ERROR:
;   (during compile-time-too processing)
;   The function ASDF::MODULE-PROVIDE-ASDF is undefined.

;     (REQUIRE 'SWANK-BACKEND::SB-POSIX)
; 
; caught ERROR:
;   (during compile-time-too processing)
;   The function ASDF::MODULE-PROVIDE-ASDF is undefined.

;     (REQUIRE 'SWANK-BACKEND::SB-CLTL2)
; 
; caught ERROR:
;   (during compile-time-too processing)
;   The function ASDF::MODULE-PROVIDE-ASDF is undefined.
; 
; compilation unit aborted
;   caught 1 fatal ERROR condition
;   caught 4 ERROR conditions
;
; compilation aborted because of fatal error:
;   SB-INT:SIMPLE-READER-PACKAGE-ERROR at 1839 (line 62, column 18) on #<SB-SYS:FD-STREAM
;                                                                        for "file c:\\emacs-23.1\\site-lisp\\slime\\swank-sbcl.lisp"
;                                                                        {24564B89}>:
;     package "SB-POSIX" not found
;   ; compilation aborted after 0:00:00.045

;; 
;; Error while compiling c:\emacs-23.1\site-lisp\slime\swank-sbcl.lisp:
;;   COMPILE-FILE returned NIL.
;; Aborting.

So it's not finding some stuff it needs in my recompiled asdf. In order to resolve this I've done a complete uninstall and reinstall of SBCL. No joy. I've got nothing in my .sbclrc either.

Update: On viewing the asdf.lisp source code the missing functions are definitely in the file. The thing that's preventing them from compiling is I think the line:

#+(and sbcl sbcl-hooks-require)

My knowledge of lisp is currently not sufficient to compile the asdf file in the environment to trigger the above conditional compilation statement.

도움이 되었습니까?

해결책

I've sorted the problem using the following steps:

  1. Fire up sbcl from Windows start menu.
  2. Run the following code to add the sbcl-hooks-require symbol to the feature list:

    (push :sbcl-hooks-require features)

  3. Recompile asdf.lisp. In order to do this I needed to recompile asdf outside of the installed C:\Program files\Steel... directory as the UAC on Windows Vista will stop the fasl being written. For example:

    (compile-file "C:\foobar\asdf.lisp")

  4. Copy the generated fasl back to C:\Program files\Steel... to overwrite the original fasl.

Update: The formatting on stackoverflow has knocked out some of the code bits. The code should be as follows:

(push :sbcl-hooks-require *features*)
(compile-file "C:\\foobar\\asdf.lisp")
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top