Previous Up Next

3  Installation

Installing the Moby system is a matter of a few simple steps. For purposes of this discussion, assume that ``PATH'' is the parent directory of where the Moby distribution will be located.
  1. Download the Moby system and any prerequesites you need (see Section 3.2).
  2. Choose a location for the Moby system's source tree and unbundle the tar file. This step will create a directory tree rooted at ``PATH/Moby.''
  3. Configure the system (see Section 3.3). This step generates makefiles, etc., that are specialized to your installation.
  4. Build the system (see Section 3.4).
  5. Once the system is built, it is ready to be used, but you can optionally install the executables and library files in another location (see Section 3.5).

3.1  Supported machines

We currently only support the Intel IA32 (a.k.a., x86) running Linux (2.2 or 2.4 kernels).

3.2  Prerequisites

Before you can configure or build the Moby system, you should make sure that you have the necessary prerequesites:
SML/NJ

The Moby compiler is primarily implemented in SML using the SML/NJ system and will compile with recent working versions of the SML/NJ system (110.52 or later). See the SML/NJ homepage at
http://www.smlnj.org
for information on how to get and install the SML/NJ system. You should ensure that your SML/NJ installation includes the following components:
ml-lex
ml-yacc
smlnj-lib
mlrisc
ckit
The first four of these are part of the default installation; the CKit library is not installed by default, so you must edit the config/targets file to include them in the SML/NJ installation.

GNU tools

You will need GNU make, gcc (the C compiler), and assembler for your machine. The C compiler is used to compile the run-time libraries, while the assembler is used in the Moby compiler toolchain. We are currently using make version 3.79.1, gcc version 3.2, and as version 2.13.90. You will also need to have the gmp library installed.

3.3  Configuration

The configure command is run in the root directory of the Moby tree.
% cd /usr/local/src/moby % ./configure options
where options may include one or more of the following:
--prefix=path

This option specifies the installation path prefix (default /usr/local). Library files will be installed in path/lib and executables will be installed in path/bin.
--with-mlrisc=path

This option is used to override the default location of the MLRISC Library. The path should specify the absolute path to the root of the MLRISC source tree that you want to use.
--with-ckit=path

This option is used to override the default location of the CKit Library. The path should specify the absolute path to the root of the CKit source tree that you want to use.
--with-smlnj-lib=path

This option is used to override the default location of the SML/NJ Library. The path should specify the absolute path to the root of the SML/NJ Library source tree that you want to use. For some versions of SML/NJ, you may need to use a version of the library that is more recent than the one included in the SML/NJ release (see Section 3.2).
--with-asdlGen=path

This option is used to specify the location of the asdlGen command. The path should specify the absolute path to the asdlGen command. Unless you plan to change the internal representations of the Moby compiler (see Section 3.6), you will not need this option.
--enable-heap-frames

enable heap-allocated activation frames.
Heap-allocated activation frames are an experimental feature that is still under development.
--enable-threads

This option enables compiling versions of the runtime system and Moby libraries that support threads.
Multithreading is not supported in this release.
--enable-mt-one-to-one

enable threads with one-to-one thread/task mapping
Multithreading is not supported in this release.
--enable-mt-many-to-many

enable threads with many-to-many thread/task mapping
Multithreading is not supported in this release.
--help

This option causes the configure command to print out an annotated list of its options.
The configure command normally picks up the path of the sml command from your path. To override the default version of SML/NJ to use, set the environment variable SMLNJ_CMD to the path of the sml command that you want to use. For example:
% SMLNJ_CMD=/usr/local/smlnj-110.49/bin/sml ./configure

3.4  Building the system

Once the system has been configured, you can build the system by running the command
% make build
in the root directory of the Moby tree. Assuming that there are no problems, these commands will install the Moby compiler and other tools in the bin subdirectory, and it will install the Moby libraries in the lib subdirectory.

3.5  Installing the system

If the make is successful, you can install the compiler, tools, and libraries using the command
% make install
The default behaviour is to install the moby system in /usr/local, but you can override this behaviour by using the ``--prefix'' option to configure (see Section 3.3).

The intermediate files produced by the build process can be removed by the command
% make clean
and the files produced by configuration can be removed by the command
% make distclean

3.6  Additional information for compiler hackers

3.6.1  CGG

Primitive operations in the Moby compiler's optimization and code generation phases are supported largely via code generated from a single specification file (src/CGG/primops.cgg). The format of this file is described in the Implementation Notes.

3.6.2  ASDL

If you want to modify the Moby compiler, you may need additional tools. The format of MBI files is specified using ASDL (Abstract Syntax Description Language), which requires the asdlGen tool (http://asdl.sourceforge.net). A version of asdlGen that is compatible with SML/NJ 110.43 and later can be downloaded from
http://moby.cs.uchicago.edu/downloads

3.6.3  Running the program generators

The top-level make target regen causes the files produced by the cgg and asdlGen tools to be regenerated. After regenerating these files, the compiler and libraries should be recompiled. We recommend the following three-step process after making a change that requires regeneration:
% make regen % make clean % make build

3.6.4  Configuration management

We use the GNU autoconf tool to manage configuration of the system. If the file configure.ac changes, the configuration file can be regenerated as follows:
% autoheader -B config % autoconf -B config

3.6.5  Runtime-system libraries

The configuration system allows one to build runtime systems that support a range of different configuration operations. For each combination, a build directory is created under the
src/runtime/build
directory with its own, customized, makefile.




Previous Up Next