A script to update/install the latest versions of all the most important Common Lisp packages.
About
clbuild is a shell script helping with the download, compilation, an invocation of Common Lisp applications. It defaults to SBCL but otherwise tries to be somewhat independent of your local environment.
clbuild was originally written by Luke Gorrie. (Idea from jhbuild by James Henstridge, a Gnome hacker).
Please send patches bug reports to clbuild-devel@common-lisp.net (list information).
Download and Usage
clbuild is maintained in darcs.
$ darcs get http://common-lisp.net/project/clbuild/clbuild
You might want to make the shell script executable:
$ cd clbuild clbuild$ chmod +x clbuild
clbuild depends on various helper applications. Try check to make sure they are installed:
clbuild$ ./clbuild check Checking for helper applications... found /usr/bin/X11/cvs found /usr/bin/X11/svn found /usr/bin/X11/darcs found /usr/bin/X11/wget found /bin/tar found /bin/mktemp Success: All helper applications found. Checking Lisp startup... Success: Lisp starts up using "sbcl" Looking for installable systems... 0 systems definition files registered
Use help to more information:
clbuild$ ./clbuild help Usage: ./clbuild COMMAND [ARGS...] Important commands are: projects show a list of projects install PROJECT install this project uninstall PROJECT uninstall this project slime run Lisp (using Emacs, recommended) lisp run Lisp (using the Terminal) check check for helper applications See also 'clbuild --long-help' for a full list of commands.
Run install to install projects:
clbuild$ ./clbuild install cl-ppcre NEW darcs pull cl-ppcre ... lots of output not shown ...
Run slime to use installed projects from Lisp:
clbuild$ ./clbuild slime
After starting SLIME, use ASDF to load and compile installed programs, for example by typing
CL-USER> (asdf:operate 'asdf:load-op 'cl-ppcre)
CL-USER> (cl-ppcre:all-matches-as-strings "\\w+" "clbuild is great")
FAQ
How does clbuild differ from asdf-install?
clbuild includes a list of selected libraries and applications and their well-known locations, and downloads the newest version or CVS/SVN/darcs repositories if possible. It can also build SBCL for you and includes convenient commands to start various applications.
In contrast, asdf-install can install any software listed on Cliki. It always downloads release tarballs. (It is up to the user to hunt down the trustworthy PGP keys as a protection agains malicous wiki entries.)
Just add it to clbuild/wnpp-projects. Please send a note to the mailing list so that we can include it, too. (See below for notes on the dependencies file.)
We use version-controlled download mechanisms to avoid losing local changes when updating.
clbuild's source directory is meant as an area where hackers can do their work, and we wouldn't feel confident recommending it for that purpose if we had to delete and move directories or extract tarballs in there.
Instead, we have the clbuild mirror with darcs conversions of tarball-only projects.
(Future versions of clbuild might do that darcs conversion on-the-fly somewhere in a new directory clbuild/import, and then use darcs pull from that directory into clbuild/source. The downside of that approach would be that different users (and separate clbuild checkouts by the same user) would have incompatible darcs checkouts for the same project.)
You don't have to run this command when sending us patches for new projects. Anyone merging such a patch will rebuild the dependencies before comitting anyway.
This file is an educated guess and sometimes not perfect. We prefer to err on the side of too many dependencies rather than too few.
However, the following situations are not necessarily bugs:
- circular dependencies: (cffi depends on trivial-features, which depends on cffi itself. That is not a problem.
- non-transitive dependencies: (if A depends on B, which depends on C, it does not follow that A depends on C.)
Make sure to distinguish between project dependencies and system dependencies.
The following process computes the "project dependencies" of a project FOO:
- look for all files named clbuild/source/FOO/*.asd and load them. (Except for some special projects that force us to scan recursively for asd files.)
- for each system BAR that we found a file FOO/bar.asd for, compute the systems that BAR depends on. (ASDF provides no function that I am aware of to find those dependencies, so we scan the in-order-to slot to make an educated guess what those dependencies are.) As an extra exception, we sometimes add dependencies at this point, for example to force mcclim to always depend on cffi, no matter whether the caller currently has gtkairo enabled or not.
- for each such system that is a dependency, map the system back to its asd file, and if that asd file is found somewhere in clbuild/source/BAZ/, consider it to be part of project BAZ
- The projects found in the last step are the dependencies of FOO.
This process implies that dependencies between projects are not transitive.
For example, the project `babel' depends on the project `rt' because the system BABEL-TEST depends on the system RT.
But the system HUNCHENTOOT depends only on BABEL, not BABEL-TEST, so the project `hunchentoot' does not depend on the project `rt'.
Think about "clbuild update hunchentoot" as "install everything I need to use/hack all parts of hunchentoot", which doesn't include BABEL-TEST or RT. "clbuild update babel" means "install everything I need to use/hack babel", which includes BABEL-TEST and hence RT.
- Luke originally wrote clbuild as a shell script.
- clbuild is not a mere shell script. At least `recompile' and `record-dependencies' are now written in Lisp.
- We basically just call out to darcs, git, cvs, and svn anyway.
- Thanks to the shell script, we can install lisp projects before having built a clean SBCL, and without having to worry whether the Lisp in $PATH is good enough.
- Building SBCL from a shell script seems like a natural thing to do.
- Other projects have tried to explore different parts of the design space for lisp software installers. There is cl-librarian written in Lisp, clget written in Perl, and so on.