Next: , Previous: About SLIB, Up: About SLIB


8.1 Installation

There are five parts to installation:

8.1.1 Unpacking the SLIB Distribution

If the SLIB distribution is a GNU/Linux RPM, it 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. If you know where SLIB should go on other platforms, please inform agj@alum.mit.edu.

8.1.2 Install documentation and slib script

     make infoz
     make install

8.1.3 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, Elk, Gambit, Gauche, Guile, Jscheme, Larceny, MITScheme, MzScheme, RScheme, S7, STk, VSCM, 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.4 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!

Bigloo BIGLOO_IMPLEMENTATION_PATH
Chez CHEZ_IMPLEMENTATION_PATH
ELK ELK_IMPLEMENTATION_PATH
Gambit GAMBIT_IMPLEMENTATION_PATH
Guile GUILE_IMPLEMENTATION_PATH
Jscheme JSCHEME_IMPLEMENTATION_PATH
MIT-Scheme MITSCHEME_IMPLEMENTATION_PATH
MzScheme MZSCHEME_IMPLEMENTATION_PATH
RScheme RSCHEME_IMPLEMENTATION_PATH
S7 S7_IMPLEMENTATION_PATH
STk STK_IMPLEMENTATION_PATH
Vscm VSCM_IMPLEMENTATION_PATH

8.1.5 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.6 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.7 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: Larceny

Starting with version 0.96, Larceny contains its own SLIB initialization file, loaded by (require 'srfi-96). If SCHEME_LIBRARY_PATH is not set, then Larceny looks for an slib subdirectory of a directory in the list returned by (current-require-path)

          larceny -- -e "(require 'srfi-96)"
— Implementation: Gauche-0.9

Gauche also supports SLIB. It finds SLIB at installation time; (use slib) to enable.

          gosh -u slib
— Implementation: ELK
          elk -i -l ${SCHEME_LIBRARY_PATH}elk.init
— Implementation: PLT Scheme
— Implementation: DrScheme
— Implementation: MzScheme

The init.ss file in the _slibinit_ collection is an SLIB initialization file. To run SLIB in MzScheme:

          mzscheme -f ${SCHEME_LIBRARY_PATH}mzscheme.init
— Implementation: MIT Scheme
          scheme -load ${SCHEME_LIBRARY_PATH}mitscheme.init
— Implementation: Gambit-C 3.0
          gsi -:s ${SCHEME_LIBRARY_PATH}gambit.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.

— Implementation: VSCM
From: Matthias Blume <blume @ cs.Princeton.EDU>
     Date: Tue, 1 Mar 1994 11:42:31 -0500

Disclaimer: The code below is only a quick hack. If I find some time to spare I might get around to make some more things work.

You have to provide vscm.init as an explicit command line argument. Since this is not very nice I would recommend the following installation procedure:

  1. run scheme
  2. (load "vscm.init")
  3. (slib:dump "dumpfile")
  4. mv dumpfile place-where-vscm-standard-bootfile-resides. For example:

    mv dumpfile /usr/local/vscm/lib/scheme-boot

    In this case vscm should have been compiled with flag:

    -DDEFAULT_BOOTFILE='"/usr/local/vscm/lib/scheme-boot"'

    See Makefile (definition of DDP) for details.

— Implementation: S7

S7 is not a standalone implementation, but runs as the extension language for the Snd sound editor. ${SCHEME_LIBRARY_PATH}s7.init can be loaded from the Snd init file or on the Snd command line thus:

          snd -l ${SCHEME_LIBRARY_PATH}s7.init