ECL如何在可执行文件中包含ASDF依赖项?

时间:2009-02-24 01:02:45

标签: lisp common-lisp asdf ecl

我有这个ecl-make.lisp:

(asdf:oos 'asdf:compile-op :stumpwm)

(defun system-objects (system)
  (loop for component in (asdf:module-components (asdf:find-system system))
    for pathname = (asdf:component-pathname component)
    for directory = (pathname-directory pathname)
    for name = (pathname-name pathname)
    when (equal "lisp" (pathname-type pathname))
    collect (make-pathname :directory directory :type "o" :name name)))

(c:build-program "stumpwm" :lisp-files
  (concatenate 'list
    (system-objects :cl-ppcre)
    (system-objects :clx)
    (mapcar (lambda (component)
              (concatenate 'string component ".o"))
      stumpwm-system::*components*))
  :epilogue-code '(unwind-protect (stumpwm:stumpwm) (ext:quit)))

stumpwm-system::*components*是我stumpwm.asd的补充, 用于在该文件中生成ASDF组件 上面正确排序的文件列表。)

它完全失败了:

... same messages you get when (system-objects ...) are
... excluded from the c:build-program [it compiles in
... this case, but of course CL-PPCRE and CLX are unavailable.]
An error occurred during initialization:
Cannot find out entry point for binary file.

我到了解决我引入的错误的地步 以前的尝试。如果你用ECL构建了一个程序 包括依赖项,请告诉我你是如何做到的。我明白了 我可以在stumpwm启动时插入并加载依赖项(甚至 没有加载我的~/.eclrc,告诉ASDF在哪里找到 这些)。但是这个应该是可能的。

1 个答案:

答案 0 :(得分:3)

哦,哇。 Here's the answer

  1. 删除ecl-make.lisp,将更改还原为stumpwm.asd

  2. ecl -eval '(asdf:make-build :stumpwm :type :program)'

  3. 就是这样。 [但是,ASDF看不到asdf:build-op。]

    编辑:嗯,它还需要一个序幕。 ecl-examples现在显示asdf:make-build