代码之家  ›  专栏  ›  技术社区  ›  Giles Roberts

在Vista上的slime下启动sbcl时出错

  •  1
  • Giles Roberts  · 技术社区  · 14 年前

    我很难让SBCL从粘液中开始。我把事情搞砸了,不知道怎么恢复。在我…

    通过asdf加载包时出现问题。在这一点上,我开始调试提供给sbcl的asdf.lisp,以查看出了什么问题。我做的唯一改变是休息一下,一旦我发现了问题所在,就把它取下来。一切都很好,直到下一次我试图启动SBCL。

    然后我得到了一个swank编译错误,说asdf.fasl比asdf.lisp文件旧。这对我来说很有意义,所以我重新编译了asdf.fasl。我现在得到的结果是:

    (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.
    

    所以在我重新编译的ASDF中找不到它需要的东西。为了解决这个问题,我已经完全卸载并重新安装了sbcl。没有欢乐。我的.sbclrc里也没有。

    更新:在查看asdf.lisp源代码时,丢失的函数肯定在文件中。阻止他们编译的是我认为这一行:

    #+(and sbcl sbcl-hooks-require)
    

    我对lisp的了解目前还不足以在环境中编译asdf文件来触发上述条件编译语句。

    1 回复  |  直到 14 年前
        1
  •  0
  •   Giles Roberts    14 年前

    我使用以下步骤对问题进行了排序:

    1. 从Windows“开始”菜单启动sbcl。
    2. 运行以下代码将sbcl hooks require符号添加到功能列表中:

      (推动:需要SBCL挂钩 特征 )

    3. 重新编译为df.lisp。为此,我需要在安装的C:\Program Files\Steel之外重新编译asdf…目录作为Windows Vista上的UAC将停止写入FASL。例如:

      (编译文件“c:\foobar\asdf.lisp”)

    4. 将生成的fasl复制回c:\program files\steel…覆盖原FASL。

    更新:stackoverflow上的格式去掉了一些代码位。代码应如下:

    (push :sbcl-hooks-require *features*)
    (compile-file "C:\\foobar\\asdf.lisp")