[Openmcl-devel] Debian packaging for CCL
R. Matthew Emerson
rme at clozure.com
Mon Jul 9 19:43:53 PDT 2012
On Jul 9, 2012, at 5:04 AM, Faheem Mitha wrote:
>
> 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.
In order to run, ccl needs:
1. The lisp kernel binary. The lisp kernel is a relatively small
program written in a combination of C and assembly language that
contains the garbage collector, OS thread support, and other runtime
support stuff.
2. A heap image file. This is lisp code and data.
This is all you need, if your needs are small enough. It's even
possible to combine these two files into one by passing
:prepend-kernel t to ccl:save-application.
When CCL starts up, it defines a ccl: logical host. If it finds
that CCL_DEFAULT_DIRECTORY is set in the environment to the name
of a directory, it will make the ccl: logical host point to that
directory. Otherwise, it will figure out what directory the heap
image file is in, and use that.
If you want to do lisp development, you will almost certainly want
the interface directories, contained in platform-specific directories.
On x86 Linux systems, the names are x86-headers (for 32-bit) and
x86-headers64 (for 64-bit). Without these, the #_ reader macro will
not work. CCL expects these directories to be in the ccl: directory.
If you want to use ASDF to load systems, then you clearly need to get
ASDF from somewhere. For user convenience, we bundle a version of ASDF
with CCL in ccl:tools; and we set up things so that (require 'asdf) will
find it there.
If you don't want to use the bundled ASDF, that's perfectly fine.
There's nothing magical about the bundled version: it's completely
unaltered from the upstream sources. We only include it to save
users the trouble of downloading it separately; CCL itself doesn't
make use of ASDF to build itself. We also don't maintain ASDF (and
don't want to), so we're trying to keep it at arm's length, so to
speak, by including it in ccl:tools;.
Anyway, if you use your own ASDF, the odds are that cl:require will
not know where you put it, and you'll need to use cl:load to load it.
Regarding source code, I believe that many programmers find it
helpful to have the source code of the lisp implementation around,
too. This way, you can M-. right into the source code of
with-open-file (or whatever).
More information about the Openmcl-devel
mailing list