编译错误常见的lisp

时间:2017-01-03 02:56:14

标签: common-lisp sbcl slime

我正在尝试编译“my-project”common-lisp, 这是相关的部分,在编译时中断:

 (ql:quickload :cffi-grovel)
 (ql:quickload :static-vectors)

编译消息

  2: ASDF/ACTION:PERFORM returned NIL
  2: (ASDF/ACTION:PERFORM #<ASDF/LISP-ACTION:PREPARE-OP >
                          #<ASDF/SYSTEM:SYSTEM "static-vectors">)
  2: ASDF/ACTION:PERFORM returned NIL
  2: (ASDF/ACTION:PERFORM #<ASDF/LISP-ACTION:PREPARE-OP >
                          #<ASDF/LISP-ACTION:CL-SOURCE-FILE
                            "static-vectors" "pkgdcl">)
  2: ASDF/ACTION:PERFORM returned NIL
  2: (ASDF/ACTION:PERFORM #<ASDF/LISP-ACTION:COMPILE-OP >
                          #<ASDF/LISP-ACTION:CL-SOURCE-FILE
                            "static-vectors" "pkgdcl">)
..........................
[package static-vectors]      2: ASDF/ACTION:PERFORM returned NIL
  2: (ASDF/ACTION:PERFORM #<ASDF/LISP-ACTION:LOAD-OP >
                          #<ASDF/LISP-ACTION:CL-SOURCE-FILE
                            "static-vectors" "pkgdcl">)
  2: ASDF/ACTION:PERFORM returned T
  2: (ASDF/ACTION:PERFORM #<ASDF/LISP-ACTION:PREPARE-OP >
                          #<ASDF/LISP-ACTION:CL-SOURCE-FILE
                            "static-vectors" "constantp">)
  2: ASDF/ACTION:PERFORM returned NIL
  2: (ASDF/ACTION:PERFORM #<ASDF/LISP-ACTION:COMPILE-OP >
                          #<ASDF/LISP-ACTION:CL-SOURCE-FILE
                            "static-vectors" "constantp">)
  2: ASDF/ACTION:PERFORM returned NIL
  2: (ASDF/ACTION:PERFORM #<ASDF/LISP-ACTION:LOAD-OP >
                          #<ASDF/LISP-ACTION:CL-SOURCE-FILE
                            "static-vectors" "constantp">)
  2: ASDF/ACTION:PERFORM returned T
  2: (ASDF/ACTION:PERFORM #<ASDF/LISP-ACTION:PREPARE-OP >
                          #<ASDF/LISP-ACTION:CL-SOURCE-FILE
                            "static-vectors" "initialize">)
  2: ASDF/ACTION:PERFORM returned NIL
  2: (ASDF/ACTION:PERFORM #<ASDF/LISP-ACTION:COMPILE-OP >
                          #<ASDF/LISP-ACTION:CL-SOURCE-FILE
                            "static-vectors" "initialize">)
.      2: ASDF/ACTION:PERFORM returned NIL
  2: (ASDF/ACTION:PERFORM #<ASDF/LISP-ACTION:LOAD-OP >
                          #<ASDF/LISP-ACTION:CL-SOURCE-FILE
                            "static-vectors" "initialize">)
  2: ASDF/ACTION:PERFORM returned T
  2: (ASDF/ACTION:PERFORM #<ASDF/LISP-ACTION:PREPARE-OP >
                          #<CFFI-GROVEL:GROVEL-FILE
                            "static-vectors" "ffi-types">)
  2: ASDF/ACTION:PERFORM returned NIL
  2: (ASDF/ACTION:PERFORM #<CFFI-GROVEL::PROCESS-OP >
                          #<CFFI-GROVEL:GROVEL-FILE
                            "static-vectors" "ffi-types">)
; cc -m64 -o /home/me/.cache/common-lisp/sbcl-1.3.1.debian-linux-x64/home    /me/.dotfiles/sbcl/.quicklisp/dists/quicklisp/software/static-vectors-1.6/src/ffi-types__grovel-tmpOU81XRV0 -I/home/me/.dotfiles/sbcl/.quicklisp/dists/quicklisp/software/cffi_0.17.1/ /home/me/.cache/common-lisp/sbcl-1.3.1.debian-linux-x64/home/me/.dotfiles/sbcl/.quicklisp/dists/quicklisp/software/static-vectors-1.6/src/ffi-types__grovel.c
    3: (RUN-PROGRAM "cc" ("-m64" "-o" "/home/me/.cache/common-lisp/sbcl-1.3.1.debian-linux-x64/home/me/.dotfiles/sbcl/.quicklisp/dists/quicklisp/software/static-vectors-1.6/src/ffi-types__grovel-tmpOU81XRV0" "-I/home/me/.dotfiles/sbcl/.quicklisp/dists/quicklisp/software/cffi_0.17.1/" "/home/me/.cache/common-lisp/sbcl-1.3.1.debian-linux-x64/home/me/.dotfiles/sbcl/.quicklisp/dists/quicklisp/software/static-vectors-1.6/src/ffi-types__grovel.c") :INPUT T :OUTPUT T :ERROR T :WAIT T :ALLOW-OTHER-KEYS T :IF-INPUT-DOES-NOT-EXIST :ERROR :IF-OUTPUT-EXISTS :OVERWRITE :IF-ERROR-EXISTS :OVERWRITE :SEARCH T :IF-OUTPUT-DOES-NOT-EXIST :CREATE :IF-ERROR-DOES-NOT-EXIST :CREATE :WAIT T :INPUT :INTERACTIVE :OUTPUT :INTERACTIVE :ERROR-OUTPUT :INTERACTIVE :INPUT :INTERACTIVE :ERROR-OUTPUT :INTERACTIVE :IF-INPUT-DOES-NOT-EXIST :ERROR :IF-OUTPUT-EXISTS :OVERWRITE :IF-ERROR-OUTPUT-EXISTS :OVERWRITE :ELEMENT-TYPE :DEFAULT :EXTERNAL-FORMAT :UTF-8 :OUTPUT :INTERACTIVE :ERROR-OUTPUT :INTERACTIVE)

奇怪的行为:

我的浮动x-terminal-emulator-window(X11,i3-Window-Manager)正在弹出到前面!我必须杀死这个窗口,以便进行编译过程,但之后它直接落在DEBUGGER中, 符合以下条件:

错误/调试器

#<error printing object> cannot be printed readably.
[Condition of type CFFI-GROVEL:GROVEL-ERROR]

Restarts:
0: [RETRY] Retry PROCESS-OP on #<GROVEL-FILE "static-vectors" "ffi-types">.
1: [ACCEPT] Continue, treating PROCESS-OP on #<GROVEL-FILE "static-vectors" "ffi-types"> as having been successful.
2: [RETRY] Retry ASDF operation.
3: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration.
4: [ABORT] Give up on "my-project"
5: [RETRY] Retry EVAL of current toplevel form.
--more--

Backtrace:
0: (CFFI-GROVEL:GROVEL-ERROR "~a" #<PRINT-NOT-READABLE {100E16CC53}>)
1: ((LAMBDA NIL :IN CFFI-GROVEL:PROCESS-GROVEL-FILE))
2: (SB-IMPL::%WITH-STANDARD-IO-SYNTAX #<CLOSURE (LAMBDA NIL :IN CFFI-GROVEL:PROCESS-GROVEL-FILE) {100AEB197B}>)
3: ((:METHOD ASDF/ACTION:PERFORM (CFFI-GROVEL::PROCESS-OP CFFI-GROVEL:GROVEL-FILE)) #<CFFI-GROVEL::PROCESS-OP > #<CFFI-GROVEL:GROVEL-FILE "static-vectors" "ffi-types">) [fast-method]
4: ((SB-PCL::EMF ASDF/ACTION:PERFORM) #<unavailable argument> #<unavailable argument> #<CFFI-GROVEL::PROCESS-OP > #<CFFI-GROVEL:GROVEL-FILE "static-vectors" "ffi-types">)
5: (SB-DEBUG::TRACE-CALL #<SB-DEBUG::TRACE-INFO ASDF/ACTION:PERFORM> #<CLOSURE (LAMBDA (SB-PCL::.ARG0. SB-PCL::.ARG1.) :IN "/build/sbcl-X2E_zI/sbcl-1.3.1/src/pcl/dlisp3.fasl") {10053FF57B}> #<CFFI-GROVEL..
6: ((:METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS :AROUND (T T)) #<CFFI-GROVEL::PROCESS-OP > #<CFFI-GROVEL:GROVEL-FILE "static-vectors" "ffi-types">) [fast-method]
7: ((:METHOD ASDF/PLAN:PERFORM-PLAN (LIST)) ((#<ASDF/LISP-ACTION:PREPARE-OP > . #1=#<ASDF/SYSTEM:SYSTEM "uiop">) (#2=#<ASDF/LISP-ACTION:COMPILE-OP > . #1#) (#3=#<ASDF/LISP-ACTION:LOAD-OP > . #1#) (#<CFFI..
8: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))
9: ((:METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)) ((#<ASDF/LISP-ACTION:PREPARE-OP > . #1=#<ASDF/SYSTEM:SYSTEM "uiop">) (#2=#<ASDF/LISP-ACTION:COMPILE-OP > . #1#) (#3=#<ASDF/LISP-ACTION:LOAD-OP > . #1#) (#..
10: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))

在“接受”条件并将#上的PROCESS-OP视为成功后,编译过程继续,然后是一个简单的错误,因为找不到编译的fasl文件。

故障排除

在我对本地SBCL + SLIME设置的这种副作用感到困惑后,我尝试了

1。)删除$ HOME / .cache / common-lisp /并重新编译,但没有成功或改变。<​​/ p>

2。)通过Roswell安装一个清新的环境并从那里运行, 这给了我同样的错误,加上终端警告,这可能会解决问题:

** (x-terminal-emulator:27111): WARNING **: Binding '<Shift><Control><Alt>a' failed!
Unable to bind hide_window key, another instance/window has it.
PluginRegistry::load_plugins: Importing plugin __init__.py failed: 'module' object has no attribute 'AVAILABLE'

我不确定这些事件是否以及如何相互依赖, 那么我该如何开始修复这个窗口行为?

我怎样才能继续编译失败的组件?

1 个答案:

答案 0 :(得分:1)

错误已被规避 - 尽管执行纯RUN-PROGRAM会在我的系统上引发相同的错误 - 遵循附录D中的guideline of ASDF 3

作为一个示例用法,使用CFFI库的正确方法是使用:defsystem-depends-on(&#34; cffi-grovel&#34;),如下所示,它定义了类asdf :: cffi-grovel ,可以通过关键字:cffi-grovel在系统组件中指定:

(defsystem "some-system-using-ffi"
  :defsystem-depends-on ("cffi-grovel")
  :depends-on ("cffi")
  :components
  ((:cffi-grovel "foreign-functions")
   ...))

在my-project.asd中插入后,编译错误已经消失。