有没有办法在 Embeddable Common Lisp 上编译 UFFI 依赖的 lisp 程序而不修改它们?
例如,当我尝试通过 Quicklisp 加载 CLSQL 时,出现以下错误:
> (ql:quickload "clsql")
Condition of type: LOAD-SYSTEM-DEFINITION-ERROR
Error while trying to load definition for system clsql from pathname /home/thorin/quicklisp/dists/quicklisp/software/clsql-20120107-git/clsql.asd: Cannot find the external symbol GETENV in #<"FFI" package>.
Available restarts:
1. (ABORT) Give up on "clsql"
2. (RESTART-TOPLEVEL) Go back to Top-Level REPL.
Broken at SI:BYTECODES. [Evaluation of: (QUICKLISP-CLIENT:QUICKLOAD "clsql")]
更有趣的是,当我第二次发出命令而不退出时,我得到了以下错误:
> (ql:quickload "clsql")
To load "clsql":
Load 1 ASDF system:
clsql
; Loading "clsql"
[package cmucl-compat]............................
[package clsql-sys]...............................
[package clsql]...................................
[package clsql-user]
FINALIZE-INHERITANCE
;;; Error:
;;; in file kmr-mop.lisp, position 1682
;;; at (FINALIZE-INHERITANCE (FIND-CLASS '%SLOT-ORDER-TEST-CLASS))
;;; * The form (FINALIZE-INHERITANCE (FIND-CLASS '%SLOT-ORDER-TEST-CLASS)) was not evaluated successfully.
;;; Error detected:
;;; The function FINALIZE-INHERITANCE is undefined.
Condition of type: COMPILE-ERROR
Error while invoking #<compile-op (:VERBOSE NIL) 000000000497ae70> on #<cl-source-file "clsql" "sql" "base" "kmr-mop">
也许这与 Quicklisp 有关。