2

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)

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.

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

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
smokeink
  • 101
  • 6

1 Answers1

6

EDIT: 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.

Make sure, that you have required the ASDF:

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

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.

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

// 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)

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

  • So all those asdf libraries will have to be distributed along with the standalone exe? I'll check up the quicklisp bundles. – smokeink Dec 03 '15 at 09:51
  • 3
    No, when you compile the project then everything is compiled in the executable. But obviously all the dependencies need to be accessible at the compilation time. – Daniel Kochmański Dec 03 '15 at 09:57
  • 1
    The thing works for me (adding this dependency). ecl -load readme.lisp builds fine. FWIW I have Quicklisp in the .eclrc file so all the dependencies are accessible by ASDF. – Daniel Kochmański Dec 03 '15 at 10:15
  • It builds fine here too, but it won't run – smokeink Dec 03 '15 at 10:36
  • How do you build your program? If you use image-op or program-op, it should just work. – Faré Dec 04 '15 at 06:28
  • I don't recommend make-build. Actually, I'd like to get rid of make-build altogether. – Faré Dec 04 '15 at 06:28
  • Fare: I build it with make-build, as it's shown in that example file. How to build it with asdf dependencies included using image-op or program-op? Can you show the steps? Thanks. – smokeink Dec 04 '15 at 09:50
  • Broken documentation link, one ok is https://common-lisp.net/project/ecl/static/ecldoc/User_0027s-guide.html – Ehvince Oct 02 '17 at 06:45
  • @DanielKochmański looks like initializing Quicklisp in the `.eclrc` is important. I have `#-quicklisp (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))) (when (probe-file quicklisp-init) (load quicklisp-init))) ` – Ehvince Oct 02 '17 at 06:55