如果我想为我的程序创建一个 Lisp 图像,我该如何正确地做呢?有什么先决条件吗?与 QUICKLISP 搭配起来不是很好吗?
现在,如果我启动 SBCL(仅预加载 QUICKLISP)并保存图像:
(save-lisp-and-die "core")
然后尝试使用此图像再次启动 SBCL
sbcl --core core
然后尝试做:
(ql:quickload :cl-yaclyaml)
我得到以下信息:
To load "cl-yaclyaml":
Load 1 ASDF system:
cl-yaclyaml
; Loading "cl-yaclyaml"
.......
debugger invoked on a SB-INT:EXTENSION-FAILURE in thread
#<THREAD "main thread" RUNNING {100322C613}>:
Don't know how to REQUIRE sb-sprof.
See also:
The SBCL Manual, Variable *MODULE-PROVIDER-FUNCTIONS*
The SBCL Manual, Function REQUIRE
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [RETRY ] Retry completing load for #<REQUIRE-SYSTEM "sb-sprof">.
1: [ACCEPT ] Continue, treating completing load for #<REQUIRE-SYSTEM "sb-sprof"> as having been successful.
2: Retry ASDF operation.
3: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration.
4: [ABORT ] Give up on "cl-yaclyaml"
5: Exit debugger, returning to top level.
(SB-IMPL::REQUIRE-ERROR "Don't know how to ~S ~A." REQUIRE "sb-sprof")
0]
或者,如果我尝试:
(require 'sb-sprof)
当 sbcl 以保存的核心启动时,我得到同样的错误。如果 sbcl 刚启动就sbcl
没有报错。
事实上,预加载 QUICKLISP 不是问题:如果最初调用 sbcl 时使用sbcl --no-userinit --no-sysinit
.
我做错了吗?
PS。如果我使用 roswell,ros -L sbcl-bin -m core run
不知何故不会拾取图像(通过*A*
在保存之前声明变量进行测试,并且一旦重新启动就看不到它)。
PS2。到目前为止,sbcl 不提供扩展模块(SB-SPROF
、SB-POSIX
等),除非在保存图像之前明确要求它们。