For Windows 9X and Windows NT (3.5.1 and above) and Windows 2000:
The easiest way to install SML/NJ on Windows machines is to use the self-installing executable smlnj.exe ( http, ftp).
The installation updates the system PATH environment variable to point to the location of the SML/NJ executables, and adds a CM_PATH environment variable to point to the location of the libraries. Because of these updates, it is necessary to reboot the machine after the installation to ensure proper behavior of the compiler (Windows NT/2000 users can logoff instead of rebooting).
- Login as administrator (the setup must define system environment variables).
- Launch the self-installing executable.
- Choose a destination folder for SML/NJ (default C:\SML).
- Choose a setup. Choices include:
- typical: installs the runtime system, the compiler (including the compilation manager), ml-lex, ml-yacc, ml-burg and most components of the SML/NJ library.
- compact: installs only the runtime system and the compiler.
- custom: allows you to choose the components to install.
- Choose a folder that will contain the program icons for SML/NJ. This folder will be part of the Programs folder of the Start menu.
To recompile the runtime system, the SML/NJ compiler itself, or any of the tools, you will need to refer to the manual installation instructions for Windows.
Linux RPM Installation:
Administrators of Intel-based Linux systems can use the RedHat package manager "RPM" to install SML/NJ. This has been tested on an installation of RedHat 6.1-2 and 7.0. Use the distribution file:smlnj-110.0.7-4.i386.rpmShould you have difficulties with the RPM installation, or wish to customize the installation, then we recommend falling back on the following generic installation procedure for Unix.
For Unix machines:
The installation process creates the following subdirectories in the installation directory:
- Create an SMLROOT directory for the installation (e.g., SMLROOT=/usr/local/sml) in a place where it is appropriate to install software packages. On some machines administrator privileges may be required to create the new sml directory in a public directory like /usr/local or /opt, but if necessary you can always install sml in a subdirectory of your own home directory.
- Download the compressed tar files that make up the distribution into this SMLROOT directory. These files will be unpacked automatically by the install script (except for config.tar.Z; see step 3).
You will need at least the following source packages from the distribution:
config.tar.Z http ftp Installation scripts runtime.tar.Z http ftp Runtime system cm.tar.Z http ftp Compilation Manager In addition to the tar files for the various sources, you also need the pre-compiled binary files for the compiler. You will need one of these files:
bin.alpha32-unix.tar.Z http ftp for DEC Alpha and Digital Unix 4.0 bin.hppa-unix.tar.Z http ftp for HPPA processors bin.mipseb-unix.tar.Z http ftp for Silicon Graphics machines bin.rs6000-unix.tar.Z http ftp for IBM Power processors bin.sparc-unix.tar.Z http ftp for SPARC processors bin.x86-unix.tar.Z http ftp for Intel Pentium processors running UNIX. If your file system is mounted on multiple machines with different instruction sets, you may fetch more than one of these "bin" files.
Finally, you may wish to fetch some of the following optional components of the SML/NJ distribution (a "*" marks a member of the standard config/targets, see below):
* smlnj-lib.tar.Z http ftp Standard ML of New Jersey Library * ml-burg.tar.Z http ftp ML-Burg code-generator generator * ml-lex.tar.Z http ftp ML-Lex lexical analyzer generator * ml-yacc.tar.Z http ftp ML-Yacc parser generator sml-nj.tar.Z http ftp Source code for SML/NJ compiler * cml.tar.Z http ftp Concurrent ML * eXene.tar.Z http ftp eXene multithreaded X-windows toolkit
- Unpack the configuration bundle in the sml ROOT directory
% zcat config.tar.Z | tar -xf -This will create a subdirectory config.
- If you wish to customize the installation to include more or fewer components than the default, edit the file config/targets, commenting out any targets that you do not want to install or removing comment characters from components that you want to add. However, you not need to edit the targets file; if you leave it alone the subsystems marked with an asterisk * above will be installed by default. Editing config/targets is not required or recommended for first-time users.
- Run the installation script while in the SMLROOT directory:
% config/install.sh
- If you have multiple hardware/operating system platforms sharing the same file system, you can run config/install.sh on each platform.
config - the configuration tools bin - shell scripts for running sml and the tools bin/.run - contains the runtime systems bin/.heap - contains the heap images lib - compilation-manager sources files for the various libraries 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 SMLROOT/src/runtime/objs. They are named mk.
- (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.