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

My favourite application is not supported. How can I add it?

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

Why did you get rid of all tarball-only downloads?

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

It doesn't load my ~/.sbclrc!

Yes, that's the default. But you can change it in clbuild.conf using the USER_INIT configuration variable.

"clbuild lisp" doesn't seem to use my monster.core!

Yes, use "clbuild preloaded" if you want that.

Can I start the lisp with swank already preloaded? (Or: "clbuild slime" doesn't seem to load my monster.core)

Yes, you can change that behaviour in clbuild.conf using the START_SLIME_USING_CORE configuration variable. To preload swank, you can run "clbuild dumpcore slime" before doing that.

Can I run emacs and slime without going through "clbuild slime"?

Yes, just run "clbuild slime-configuration". It prints a .emacs excerpt. Copy&paste it into your .emacs.

Is the "dependencies" file autogenerated?

Yes, using "clbuild record-dependencies", which requires a complete check-out of all projects, including wnpp-projects.

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.

The "dependencies" file is broken!

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:

Make sure to distinguish between project dependencies and system dependencies.

The following process computes the "project dependencies" of a project 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.

Why is clbuild written in shell? Lisp is so much better.

There are many answers to this question. Here are just a few of them:

Does it work on cygwin?

It used to work on cygwin. Beware that cygwin support is tested only occasionally and might not be complete or functional anymore. (In any case, you need to recompile SBCL with an ASDF patch for shortcut support first.) To start clbuild's slime, make sure to use the Windows version of Emacs, not cygwin's Emacs.