[Openmcl-devel] Debian packaging for CCL

Faheem Mitha faheem at faheem.info
Mon Jul 9 02:04:20 PDT 2012


Hi Keith,

Thanks for your helpful response.

On Sat, 7 Jul 2012, Keith M Corbett wrote:

> QuickLisp calls ASDF. Both are independent of CCL and other Lisp
> implementations. QuickLisp is a very nice utility that takes over
> where CL and ASDF leave off.

> You need to get ASDF working properly. The easiest way is to install
> CCL using the documented procedure. Since you are trying to do
> things the hard way - or going boldly where no one has gone before -
> at a minumum you should load an up-to-date version of ASDF. To be
> clear, you may need to load ASDF by calling LOAD with a qualified
> pathname to the asdf.lisp source.

> Hint: run this and see if it finds the asdf.lisp that comes with CCL:

>   (probe-file "CCL:tools/asdf")

? (probe-file "CCL:tools/asdf")
NIL

So apparently not.

> Before QuickLisp one might have loaded the ASDF program in a CCL
> init file. Instead of using REQUIRE it would be possible to load
> ASDF with an explicit call to LOAD:

>   (load "CCL:tools;asdf")

This does work, and I can then run some sample code.

? (load "CCL:tools;asdf")
#P"/usr/local/src/ccl/ccl/tools/asdf.lisp"
? (require 'cl-rmath)
CL-RMATH
NIL
? (cl-rmath::rgamma 3.0d0 2.0d0)
2.3911849536091383D0

> Note the use of the CCL logical pathname. If you install CCL per
> directions in the doc you should find that CCL: pathnames are
> translated relative to a directory that comes from either
> CCL_DEFAULT_DIRECTORY (environment variable) or the directory where
> the CCL runtime images reside.

Right. So, so it needs a location to find the ASDF installation (in
this case).

> (And please note that my example using LOAD is by way of
> explanation, not a recommended procedure for routine use.) So to
> recap: Your /tmp installation in case 1 is tripping an error because
> the loaded version of ASDF (which probably came with QuickLisp) is
> obsolete and incompatible with CCL 1.8. In case 2 you don't see a
> startup problem because you don't run QuickLisp.

In case one, the QL initialization is available. In this case even
startup does not work for the /tmp files. The error is

Unbound variable: CCL::FASL-VERSION

I don't know what is causing the problem, but I don't think
incompatible versions of ASDF is the issue. I think the QL
initialization is forcing CCL to try to load ASDF. CCL is not able to
locate ASDF because it doesn't know where the source/installation
directory is, and hence the error, though I don't know why it is
giving this error in particular.

I assume that QL uses the implementation's included ASDF if available.
I don't see what else it could do. If QL was using a bundled version
of ASDF then it would be failing all the time, even for the source
repository. Also, at least in my installation, the Debian quicklisp
package I'm using has /usr/share/cl-quicklisp/quicklisp.lisp as the
only source file. So, no, it does not bundle ASDF.

> When you ran REQUIRE alone you hadn't set up the runtime environment
> to find code modules by name. That's what ASDF + DEFSYSTEM are for.

> Anyone who learned Common Lisp before QuickLisp had to come up to
> speed on ASDF registry and associated pathname issues. Now it is
> possible to load most third-party CL libraries without knowing how
> ASDF works. That said, you may want to look deeper into this topic
> if you intend to support Debian users who may adopt your new install
> scheme.

> But the best way to move forward is to make things better, not
> worse. Help CCL help you: Either keep the image files in the same
> location as installation files (including tools like ASDF) or
> specify CCL_DEFAULT_DIRECTORY to point to the installation.

Well, part of the reason for this exercise, aside from a general
desire to understand the structure of a CL installation, is to figure
out what files are actually required for an installation. In a
traditional Unix software setup, there is a makefile which has an
INSTALL target, which when invoked, installs the necessary files in
the appropriate places on the system. In this case, it is not clear
which files are needed, aside from the image file. From the discussion
above, it seems that at least the files in the tools subdirectory are
needed, namely asdf.lisp, defsystem.lisp, and possibly
defsystem.lx32fsl. So, what else is required? I suppose a lazy way
would be to just copy all the files in the source repository into an
installation/deb package, but that is hardly optimal. For one thing,
all those files on my system are 179MB.

One obvious question - since asdf.lisp is required, why not just load
it into the image rather than having the implementation locate it at
runtime? By the same token, at first sight it seems like everything
necessary could be loaded into the image, and hence no additional
files would be required.

> Good luck

Thanks.
                                                         Regards, Faheem




More information about the Openmcl-devel mailing list