如何分发asdf/quicklisp依赖项以及使用Embeddable Common Lisp编译的应用程序? [英] How to distribute the asdf/quicklisp dependencies along with an app compiled with Embeddable Common Lisp?

查看:96
本文介绍了如何分发asdf/quicklisp依赖项以及使用Embeddable Common Lisp编译的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试了以下示例 ECL存储库asdf示例,它工作正常,但没有任何asdf依赖项.如果我添加

I have tried this example ECL repository asdf example , it works fine but it doesn't have any asdf dependencies. If i add

:依赖(#:下壳)

:depends-on (#:inferior-shell)

到example.asd,然后运行已编译的独立可执行文件给出错误:

to example.asd then running the compiled standalone executable gives this error:

Condition of type: SIMPLE-PACKAGE-ERROR
There exists no package with name "ASDF/DRIVER"
No restarts available.

什么原因导致此错误,以及处理 ECL 上的asdf依赖项的惯用方式是什么?

What causes this error, and what is the idiomatic way of dealing with asdf dependencies on ECL ?

推荐答案

此问题已针对高于16.1.3的ECL(已在development分支中修复)解决,因此在即将发布的版本中无需使用"require"技巧

this problem is fixed for ECL newer than 16.1.3 (fixed in develop branch), so no `require' trick should be needed in the upcoming release.

通常来说,您走的路是正确的.

In general path you have taken is correct.

请确保您需要ASDF:

Make sure, that you have required the ASDF:

(require 'asdf)
(find-package "ASDF/DRIVER")

然后定义了"ASDF/DRIVER"包.另一方面,下层外壳还需要其他一些库(例如alexandria),因此您必须将它们的路径放在ASDF中央注册表中,或使用

Then "ASDF/DRIVER" package is defined. On the other hand inferior-shell requires a few other libraries (alexandria for instance), so you have to put the path to them in the ASDF central registry or use the Quicklisp bundles.

有关使用ECL进行构建的更多详细信息,请参见其文档.

More detailed info about building with ECL is available in its Documentation.

//编辑 经过调查,似乎在程序启动时必须手动要求ASDF.这可能是一个错误.作为解决方法,添加

// EDIT After investigation it appears that ASDF has to be manually required at the program start. It is probably a bug. As a workaround add

:prologue-code '(require 'asdf)

指向(asdf:make-build…)独立可执行文件.一切正常.

to the (asdf:make-build …) for standalone executable. Everything works fine then.

这篇关于如何分发asdf/quicklisp依赖项以及使用Embeddable Common Lisp编译的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆