我想使用buildapp来使curl-lisp可执行文件作为example给出:
buildapp --output lisp-curl --asdf-path ~/src/clbuild/systems/ \
--load-system drakma \
--eval '(defun main (args) (write-string (drakma:http-request (second args))))' \
--entry main
这绝对不会起作用,因为我没有路径“〜/src/clbuild/systems/”,因为我使用quicklisp时,我的系统应位于“〜/quicklisp/dists/quicklisp/software”,但是在执行时:
buildapp --output lisp-curl \
--asdf-path ~/quicklisp/dists/quicklisp/software \
--load-system drakma \
--eval '(defun main (args) (write-string (drakma:http-request (second args))))' \
--entry main
; file: /home/simkoc/dumper-YKYna1b3.lisp
; in: DEFUN DUMP-FILE-DEBUGGER
; (QUIT :UNIX-STATUS 111)
;
; caught STYLE-WARNING:
; SB-EXT:QUIT has been deprecated as of SBCL 1.0.56.55. Use SB-EXT:EXIT or
; SB-THREAD:ABORT-THREAD instead.
;
; In future SBCL versions SB-EXT:QUIT will signal a full warning at compile-time.
;
; compilation unit finished
; caught 1 STYLE-WARNING condition
Fatal MISSING-COMPONENT:
Component "drakma" not found
This对一个问题的回答已经暗示,quicklisp能够以buildapp能够检索它的方式来导出其系统,但可悲的是没有详细介绍。
我还尝试过将
--asdf-path
保留下来,因为SBCL(启动时)已经可以使用(require 'drakma)
或(asdf:load-system "drakma")
加载Drakma了。同样使用--require
而不是--load-system
不会做这笔交易。因此:如何将buildapp与quicklisp结合使用以使所需系统具有可执行文件(我只是想了解MISSING-COMPONENT PART)
最佳答案
如果Drakma已经安装在quicklisp中,那么我认为如果您使用--asdf-tree
而不是--asdf-path
,您的示例将起作用。但是将Quicklisp目录用作树可能会造成一些麻烦,因为并非树中的每个系统文件都打算加载。
还有另一个选项与Quicklisp对可用系统的知识更紧密地集成在一起。这是我的工作:
sbcl --no-userinit --no-sysinit --non-interactive \
--load ~/quicklisp/setup.lisp \
--eval '(ql:quickload "drakma")' \
--eval '(ql:write-asdf-manifest-file "quicklisp-manifest.txt")'
buildapp --manifest-file quicklisp-manifest.txt --load-system drakma [the rest of your options]
第一个命令可确保下载了drakma,并且quicklisp-manifest.txt中包含Quicklisp知道的系统索引。第二个使用该索引使用已安装的Quicklisp系统来构建应用程序。
关于common-lisp - 如何结合使用buildapp和quicklisp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18917067/