views:

417

answers:

1

I have this 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* is my addition to stumpwm.asd, used to generate the ASDF components in that file and the properly-ordered list of files above.)

It simply fails:

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

I'm to the point where I'm only solving errors that I introduced with previous attempts. If you've built a program with ECL that included dependencies, please show me how you did it. I see how I can punt and load the dependencies when stumpwm starts (even without loading my ~/.eclrc , which tells ASDF where to find these). But this should be possible.

+3  A: 

Oh, wow. Here's the answer:

  1. Delete ecl-make.lisp , revert changes to stumpwm.asd

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

That's it. [ASDF doesn't see an asdf:build-op , however.]

EDIT: well, it also needs a prologue. ecl-examples now shows off asdf:make-build

ayrnieu