On Mon, Mar 2, 2009 at 1:40 AM, Juan Jose Garcia-Ripoll <juanjose.garciaripoll@googlemail.com> wrote:
On Mon, Mar 2, 2009 at 9:57 AM, Elliott Slaughter
<elliottslaughter@gmail.com> wrote:
> Hi,
> I'm trying to use asdf:make-build to build a system I built using asdf. My
> problem is that after the build completes, when I run the executable I
> created, none of my packages appear to exist.

Are you defining the packages in the *.asd files? If so, they are not
going to be included in the executable. Every package definition
should be in one of the compiled files that are going to be linked
into the program. *.asd files are just like makefiles: they do not
form part of the final image.

No, I have a package.lisp file which is a component of the system which defines all the packages.

And I would also point out that none of the packages from libraries I am importing appear either.

Here is a (somewhat) self-contained example which breaks for me:

Start from the example in /ecl/examples/asdf/. Modify the files as follows:
Add this to the top of file1.lisp:
(defpackage :test (:use :cl) (:export :test-function))
(in-package :test)
And this to the top of file2.lisp:
(in-package :test)

Now with just these changes, the example still works fine for me. But say I modify the example.asd by adding the following to the end of the defsystem line.
    :depends-on (:closer-mop)

Now when I build with asdf:make-build, I get the following error:

elliott@Blackthorn:~/Programming/ecl/examples/asdf$ ecl
> (require :asdf)

> (asdf:make-build :example :type :program :monolithic t)

[... compiling ...]
;;; Note: Invoking external command:
;;;   gcc -o "/home/elliott/Programming/ecl/examples/asdf/example" -L"/usr/local/lib/" "/home/elliott/Programming/ecl/examples/asdf/ECLINITt69QUc.o" "/home/elliott/Programming/Lisp/asdf/closer-mop/libcloser-mop.a" "/home/elliott/Programming/ecl/examples/asdf/libexample.a"    -lecl -ldl  -lm   -lgmp
> (ext:system "./example")
No applicable method for MAKE-INSTANCE
Broken at SI:TOP-LEVEL.No restarts available.
Top level.
CLOSER-MOP> (find-package :c2mop)

#<"CLOSER-MOP" package>
CLOSER-MOP> (find-package :test)


Do you observe these results on your end? Am I doing something wrong in this example?


Elliott Slaughter

"Any road followed precisely to its end leads precisely nowhere." - Frank Herbert