1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238
|
Installation instructions for SML/NJ
------------------------------------
Quick Windows installation:
---------------------------
For standard installation of SML/NJ on Microsoft Windows (95 or NT),
fetch 110-smlnj.exe, which is a self-installing executable. This
self-installer gives you the options of typical, custom, or compact
installations.
For installation on Unix, or to manually build the compiler on
Windows, use the directions below. Installation instructions are also
available in the form of a web page at URL
http://cm.bell-labs.com/cm/cs/what/smlnj/install.html
---------------------------------------------
Unix Installation:
------------------
Administrators of Intel-based Linux systems can use the
RedHat package manager "RPM" (http://www.redhat.com/rpm/)
to install SML/NJ. This has been tested on an installation of RedHat
5.0. Use the distribution file smlnj-110.0-3.i386.rpm.
Note, however, that we do not actively support this format. Should
you have difficulties with this, then we recommend falling back on the
following generic installation procedure for Unix.
Once you have retrieved the distribution files, do the following
steps:
1) create a root directory for the installation (e.g., /usr/local/sml).
2) put the compressed tar files that make up the distribution in the
root directory. Note that these files will be unpacked automatically
by the install script (except for 110-config.tar.Z; see step 3). In
addition to the tar files for the various sources, you also need the
pre-compiled binary files for the compiler. These files are:
110-bin.alpha32.tar.Z -- for DEC Alpha and Digital Unix 4.0
110-bin.alpha32x.tar.Z -- for DEC Alpha and OSF/1 3.2 and older
110-bin.hppa.tar.Z -- for HPPA processors
110-bin.mipseb.tar.Z -- for big-endian MIPS processors (e.g. SGI)
110-bin.rs6000.tar.Z -- for IBM Power processors
110-bin.sparc.tar.Z -- for SPARC processors
110-bin.x86.tar.Z -- for Intel i386, i486 and Pentium processors.
In addition, you need the source code for the run-time system, which is
in the file 110-runtime.tar.Z.
3) unpack the configuration bundle in the root directory
% cd /usr/local/sml
% zcat 110-config.tar.Z | tar -xf -
this will create a directory /usr/local/sml/config.
4) edit the file config/targets, commenting out any targets that
you do not want to install. The default is to install the following
list (given with the corresponding distribution file):
Target Distribution file
------ -----------------
sml-cm 110-cm.tar.Z
smlnj-lib 110-smlnj-lib.tar.Z
ml-yacc 110-ml-yacc.tar.Z
ml-lex 110-ml-lex.tar.Z
ml-burg 110-ml-burg.tar.Z
doc 110-doc.tar.Z
5) run the installation script while in the root directory:
% config/install.sh
6) if you have multiple hardware/operating system platforms sharing the
same file system, you can repeat steps 4&5 for each platform.
The installation process creates the following directory tree rooted
at the installation directory (call it ROOT):
ROOT/config - the configuration tools
ROOT/bin - shell scripts for running sml and the tools
ROOT/bin/.run - contains the runtime systems
ROOT/bin/.heap - contains the heap images
ROOT/lib - SC sources files for the various libraries
ROOT/src - the source code; installing libraries also leaves
the precompiled library code in this subtree.
POTENTIAL PROBLEMS
The most likely problem is in compiling the runtime system. You may
need to edit the architecture/operating system specific makefile. You
can find these files in the directory "ROOT/src/runtime/objs". They
are named mk.<arch>-<opsys> (e.g., mk.sparc-sunos, mk.mipseb-irix5).
They are currently set up to use the vendor compiler on the mips, and
alpha, and to use gcc on the sparc, rs6000 and x86.
The install shell script checks to see if your system has Korn shell
(ksh); if so, it uses that for the shell in the shell scripts (ksh is
faster than /bin/sh). If you are installing your system on multiple
platforms, where some have ksh and some do not, then install the
system on a platform that does not have ksh first.
On 64-bit Irix systems (6.2 and 6.4), you need to set the SGI_ABI shell
variable to "-32" prior to installation. In sh you would execute
export SGI_ABI
SGI_ABI="-32"
and in csh, you do
setenv SGI_ABI "-32"
---------------------------------------------
Windows Installation:
---------------------
These instructions are provided for those that need to recompile the
runtime system, the SML/NJ compiler, or the other tools provided with
the SML/NJ distribution under Windows NT or 95.
You will need to install the SML/NJ executables from the
self-installing executable provided in the distribution.
ftp://ftp.research.bell-labs.com/dist/smlnj/release/110/110-smlnj.exe
This step is necessary to install some of the required batch files to
invoke the compiler.
To unpack the distribution, you will need the Windows versions of the
"GNU unzip" (gunzip) and "tape archive" (tar). These are freely
available from
ftp://ftp.cs.washington.edu/pub/ntemacs/utilities
Compiling the runtime system requires the following tools:
MS Visual C++, 2.0 or later
MS Assembler (MASM), 6.11 or later
MS NMAKE (part of VC++), 1.50 or later
It should be straightforward to build with other compilers,
assemblers, and "make" utilities (see src\runtime\objs\makefile.win32
and src\runtime\objs\mk.x86-win32).
Compiling the SML compiler source requires ksh and common
Unix tools (sed, grep). We use MKS Toolkit for this,
although other ksh based toolkits should work directly as well;
e.g. UWIN (http://www.research.att.com/sw/tools/uwin/).
Installing the source files
---------------------------
Determine the root directory for the SML/NJ installation on your
system, and make it your current directory. For the purpose of
exposition, we will assume the default directory, C:\SML.
Download the runtime system sources and the SML/NJ compiler
sources:
ftp://ftp.research.bell-labs.com/dist/smlnj/working/110/110-runtime.tar.Z
ftp://ftp.research.bell-labs.com/dist/smlnj/working/110/110-sml-nj.tar.Z
You may also wish to fetch some of the following optional components
of the SML/NJ distribution:
Compilation Manager
ftp://ftp.research.bell-labs.com/dist/smlnj/working/110/110-cm.tar.Z
Standard ML of New Jersey Library
ftp://ftp.research.bell-labs.com/dist/smlnj/working/110/110-smlnj-lib.tar.Z
ML-Burg code-generator generator
ftp://ftp.research.bell-labs.com/dist/smlnj/working/110/110-ml-burg.tar.Z
ML-Lex lexical analyzer generator
ftp://ftp.research.bell-labs.com/dist/smlnj/working/110/110-ml-lex.tar.Z
ML-Yacc parser generator
ftp://ftp.research.bell-labs.com/dist/smlnj/working/110/110-ml-yacc.tar.Z
Uncompress and unbundle each of the distribution files:
C:\SML\> gunzip 110-runtime.tar.Z
C:\SML\> tar -xvf 110-runtime.tar
Change to the SRC\SML-NJ directory
C:\SML\> ch src\sml-nj
Download the SML/NJ compiler binaries:
ftp://ftp.research.bell-labs.com/dist/smlnj/working/110/110-bin.x86-win32.tar.Z
Uncompress and unbundle the binaries:
C:\SML\SRC\SML-NJ\> gunzip 110-bin.x86-win32.tar.Z
C:\SML\SRC\SML-NJ\> tar -xvf 110-bin.x86-win32.tar
Compiling the runtime system
----------------------------
Ensure that the compiler, assembler, and "make" utility are in your path.
Compile the runtime by issuing
nmake /f mk.x86-win32
in SML/NJ's src\runtime\objs directory. This will create
run.x86-win32.exe which is usually placed in the smlnj\bin\.run
directory.
Compiling the SML/NJ compiler
-----------------------------
Set the working directory to src\sml-nj and, from a ksh prompt,
issue the command:
xmakeml -boot bin.x86-win32
This will produce the image sml.x86-win32 which is usually placed in
bin\.heap.
Compiling the various tools
---------------------------
SML/NJ tools are built analogously to the Unix versions. That is,
the command
build
is issued in the respective tool directory. Note that SML/NJ's bin
directory must be in the path for the default build command to
find the compiler and tools.
Please send comments or questions regarding this file to
sml-nj@research.bell-labs.com.
|