8.1 Installation

There are five parts to installation:

8.1.1 Unpacking the SLIB Distribution

System: Unix
System: GNU/Linux
wget https://ftp.gnu.org/gnu/slib/slib-3c2.tar.gz
tar -xzf slib-3c2.tar.gz
(cd slib-3c2; ./configure --prefix=/usr/local/; make install)
# rm slib-3c2.tar.gz

If you lack permission to install into /usr/local/, you can install into your home directory by changing /usr/local/ to your home directory in this script.

System: x86_64 GNU/Linux with Redhat Package Manager (rpm)
wget http://groups.csail.mit.edu/mac/ftpdir/scm/slib-3c2-1.noarch.rpm
rpm -U slib-3c2-1.noarch.rpm
# rm slib-3c2-1.noarch.rpm

This will create the SLIB directory /usr/share/slib.

If the SLIB distribution is a ZIP file, unzip the distribution to create the SLIB directory. Locate this slib directory either in your home directory (if only you will use this SLIB installation); or put it in a location where libraries reside on your system. On unix systems this might be /usr/share/slib, /usr/local/lib/slib, or /usr/lib/slib.

8.1.2 Configure Scheme Implementation to Locate SLIB

If the Scheme implementation supports getenv, then the value of the shell environment variable SCHEME_LIBRARY_PATH will be used for (library-vicinity) if it is defined. Currently, Bigloo, Chez, Guile, MITScheme, RScheme, and SCM support getenv. Scheme48 supports getenv but does not use it for determining library-vicinity. (That is done from the Makefile.)

The (library-vicinity) can also be set from the SLIB initialization file or by implementation-specific means.

8.1.3 Configure Scheme Implementation to Locate and Implementation Directory

Support for locating an implementation’s auxiliary directory is uneven among implementations. Also, the person installing SLIB may not have write permission to some of these directories (necessary for writing slibcat). Therefore, those implementations supporting getenv (except SCM and Scheme48) provide a means for specifying the implementation-vicinity through environment variables. Define the indicated environment variable to the pathname (with trailing slash or backslash) of the desired directory. Do not use slib/ as an implementation-vicinity!

BiglooBIGLOO_IMPLEMENTATION_PATH
ChezCHEZ_IMPLEMENTATION_PATH
GuileGUILE_IMPLEMENTATION_PATH
MIT-SchemeMITSCHEME_IMPLEMENTATION_PATH
RSchemeRSCHEME_IMPLEMENTATION_PATH

8.1.4 Loading SLIB Initialization File

If you use the slib script to start your SLIB session, then this step is unnecessary.

Check the manifest in README to find a configuration file for your Scheme implementation. Initialization files for most IEEE P1178 compliant Scheme Implementations are included with this distribution.

You should check the definitions of software-type, scheme-implementation-version, implementation-vicinity, and library-vicinity in the initialization file. There are comments in the file for how to configure it.

Once this is done, modify the startup file for your Scheme implementation to load this initialization file.

8.1.5 Build New SLIB Catalog for the Implementation

When SLIB is first used from an implementation, a file named slibcat is written to the implementation-vicinity for that implementation. Because users may lack permission to write in implementation-vicinity, it is good practice to build the new catalog when installing SLIB.

To build (or rebuild) the catalog, start the Scheme implementation (with SLIB), then:

(require 'new-catalog)

The catalog also supports color-name dictionaries. With an SLIB-installed scheme implementation, type:

(require 'color-names)
(make-slib-color-name-db)
(require 'new-catalog)
(slib:exit)

8.1.6 Implementation-specific Instructions

Multiple implementations of Scheme can all use the same SLIB directory. Simply configure each implementation’s initialization file as outlined above.

Implementation: SCM

The SCM implementation does not require any initialization file as SLIB support is already built into SCM. See the documentation with SCM for installation instructions.

Implementation: MIT Scheme
scheme -load ${SCHEME_LIBRARY_PATH}mitscheme.init
Implementation: SISC
sisc -e "(load \"${SCHEME_LIBRARY_PATH}sisc.init\")" --
Implementation: Kawa
kawa -f ${SCHEME_LIBRARY_PATH}kawa.init --
Implementation: Guile

Guile versions 1.6 and earlier link to an archaic SLIB version. In RedHat or Fedora installations:

rm /usr/share/guile/slib
ln -s ${SCHEME_LIBRARY_PATH} /usr/share/guile/slib

In Debian installations:

rm /usr/share/guile/1.6/slib
ln -s ${SCHEME_LIBRARY_PATH} /usr/share/guile/1.6/slib

${SCHEME_LIBRARY_PATH} is where SLIB gets installed.

Guile before version 1.8 with SLIB can then be started thus:

guile -l ${SCHEME_LIBRARY_PATH}guile.init

Guile version 1.8 and after with SLIB can then be started thus:

guile -l ${SCHEME_LIBRARY_PATH}guile.init \
      -l ${SCHEME_LIBRARY_PATH}guile.use

The Guile manual has a different way of installing SLIB:

http://www.gnu.org/software/guile/manual/html_node/SLIB-installation.html

Implementation: Scheme48

To make a Scheme48 image for an installation under <prefix>,

  1. cd to the SLIB directory
  2. type make prefix=<prefix> slib48.
  3. To install the image, type make prefix=<prefix> install48. This will also create a shell script with the name slib48 which will invoke the saved image.