![]() |
| ----- |
|
This page explains how to install the release tarballs of CMUCL. If you're using an alternative distribution packaging, such as .deb archives, use whatever is appropriate there. For each supported platform there are two bzip2 tar archives, one containing the base system, and the other (with extra in the name) containing optional additional files supporting CLX, Hemlock, the Motif interface, and so on. Download the archives corresponding to your platform. Certain tarballs are PGP-signed by the packager and are accompanied by a file with an .asc extension; in this case you can check that they have not been modified by using GPG:
wget http://common-lisp.net/project/cmucl/downloads/release/19e/cmucl-19e-x86-linux.tar.bz2
wget http://common-lisp.net/project/cmucl/downloads/release/19e/cmucl-19e-x86-linux.tar.bz2.asc
gpg --verify cmucl-19e-x86-linux.tar.bz2.asc
GPG should tell you that the file has a good signature from one of the CMUCL developers (you may need to fetch the developer's key with gpg --recv-key). Unless you have a web-of-trust relationship with that developer it will warn you that the key is not certified with a trusted signature. Extract the tarballsThe release tarballs extract to the following directory structure:
bin/lisp
lib/cmucl/lib/lisp.core
doc/cmucl/README (this file)
man/man1/cmucl.1
...
This allows you to install CMUCL directly under /usr/local, for example using
cd /usr/local
tar xjf /path/to/cmucl-19e-<platform>.tar.bz2
tar xjf /path/to/cmucl-19e-<platform>.extra.tar.bz2
or alternatively, install under a directory in /opt, for example
mkdir /opt/cmucl-19e
cd /opt/cmucl-19e
tar xjf /path/to/cmucl-19e-<platform>.tar.bz2
tar xjf /path/to/cmucl-19e-<platform>.extra.tar.bz2
The 19e distribution is relocateable: the lisp binary will search for the lisp.core file relative to its location. This means that it is sufficient to have /usr/local/bin (or /opt/cmucl-19e/bin) in your PATH to be able to invoke CMUCL from your shell. You can now invoke CMUCL: this should display a banner then show a prompt (the default prompt is an asterisk).
% lisp
CMU Common Lisp 19e (19E), running on mansuetude
With core: /opt/cmucl-19e/lib/cmucl/lib/lisp.core
Dumped on: Thu, 2008-05-01 18:56:07+02:00 on usrtc3142
See <http://www.cons.org/cmucl/> for support information.
Loaded subsystems:
Python 1.1, target Intel x86
CLOS based on Gerd's PCL 2004/04/14 03:32:47
* (format t "~&Hello, world!~%")
Hello, world!
NIL
*
Loading subsystemsTo load precompiled subsystems (assuming that you installed the -extra- tarball), just use REQUIRE:
* (require :gray-streams)
* (require :clx)
* (require :clm)
* (require :hemlock)
The DEFSYSTEM facility is not included with CMUCL, but can be obtained from CLOCC. It may be installed as a subsystem by compiling it (using the function COMPILE-FILE), and moving the resulting defsystem.FASL file to $ROOT/lib/cmucl/lib/subsystems/defsystem-library.FASL (where FASL is the file extension of compiled lisp files on your system, for instance .sparcf or .x86f). You can then say
* (require :defsystem)
to load the DEFSYSTEM facility into your running lisp. Create a site-wide initialization fileCMUCL reads two initialization files: a per-user file named ~/.cmucl-init.lisp, or a site-wide file named $ROOT/lib/cmucl/lib/site-init.lisp (where $ROOT is the base directory in which you installed CMUCL, for example /usr/local/). It is customary to initialize the SHORT-SITE-NAME and LONG-SITE-NAME from the site-init file. CMUCL is distributed with a file called $ROOT/lib/cmucl/lib/generic-site.lisp that you can use as a template for your site-init file: # cd $ROOT/lib/cmucl/lib # cp generic-site.lisp site-init.lisp # emacs site-init.lisp If you have the CMUCL source code installed on your system, you can set the target: search-list to point to them, so that the debugger provides more information when a CMUCL function signals an error. See the commented-out line at the end of the generic-site file. Interacting with CMUCLThe basic commandline interface offered by CMUCL is rather basic; it doesn't offer a history mechanism or commandline editing facilities. You may wish to investigate using a more powerful interface than the commandline, such as SLIME, or Climacs, or Hemlock, or (more basic) M-x run-lisp in Emacs. |