These are instructions for installing recent versions of SML/NJ on Unix-like systems, including MacOX X with the developer tools (Xcode) installed.
If you are running MacOS X but don't have the developer tools, you can install the system starting from the disk image that we provide. See MACOSINSTALL for details.
If you are running Windows, see WININSTALL.html instead.$ d=/usr/local/smlnj # or whatever you like $ mkdir $d $ cd $d
$ v=110.93 # or whatever is the version you desire $ wget http://smlnj.cs.uchicago.edu/dist/working/$v/config.tgz
$ gunzip config.tgz | tar xf -This creates a subdirectory "config"
config/targets
" file to your taste. If you leave this
file alone, you end up with a minimal installation.
$ config/install.shOn x86-64 (aka amd64) hardware, the installer supports installing either 32- or 64-bit versions of SML/NJ on macOS and Linux. The relevant options are
Use some other means of downloading the necessary tarballs. Store them in directory $d. Then run the installer (config/install.sh).
Here is a table that shows which packages you will need to download depending on what you select in config/targets. Take the union of all the packages corresponding to your selection. Don't forget to include the "(always)" entry. (<arch> and <os> should match your host system.)
Keep in mind that making selections in config/targets there are dependencies between packages. For example, eXene requires cml and cml-lib. The installer script "knows" about these dependencies and will automatically calculate the transitive closure of the "requires" relation for you. Still, if you do not have network connectivity, then you should have downloaded tarballs for the entire transitive closure. (If you didn't, the installer will kindly remind you.)
If you sellect ... | ... you need | |
---|---|---|
anything |
boot.<arch>-<os>.tgz runtime.tgz |
|
src-smlnj |
MLRISC.tgz cm.tgz compiler.tgz smlnj-lib.tgz ml-yacc.tgz system.tgz |
|
old-basis |
old-basis.tgz |
|
ml-yacc |
ml-yacc.tgz |
|
ml-lex |
ml-lex.tgz |
|
ml-burg requires: ml-lex |
ml-burg.tgz |
|
smlnj-lib |
smlnj-lib.tgz |
|
pgraph-util |
cm.tgz |
|
cml requires: smlnj-lib |
cml.tgz |
|
cml-lib |
cml.tgz |
|
eXene requires: cml, cml-lib |
eXene.tgz |
|
ckit |
ckit.tgz |
|
ml-nlffi-lib |
ml-nlffi-lib.tgz |
|
ml-nlffigen requires: smlnj-lib, ckit |
ml-nlffigen.tgz |
|
mlrisc-tools |
MLRISC.tgz |
|
nowhere requires: mlrisc-tools |
||
doc |
doc.tgz |
file:///usr/src/packages/smlnj/working/110.94(In other words, the URL should spell out the name of the local directory that happens to contain the tarballs. Notice that this method does not seem to work with certain versions of wget which do not understand the file:// scheme.)
$d/bin $d/lib
$ mv $d/{bin,lib} $e
SMLNJ_HOME
to point to $e:
$ export SMLNJ_HOME=$eIf you want to put the contents of $e/lib somewhere else, then point CM_PATHCONFIG to wherever the path configuration file lives. (The default is $SMLNJ_HOME/lib/pathconfig.) You can also scatter around the contents of $e/lib. If you do so, you have to edit the path configuration file itself. See the CM manual for more information on path anchors and path configuration.
config/install.sh
will attempt to use wget, curl, and
lynx (in that order). If you already know which of these programs
you want the installer to use, then set the environment variable
URLGETTER to "wget", "curl", or "lynx", respectively.
You can also set URLGETTER to any other command "foo" as long as
it can be invoked as
$ foowhere <source> is the URL you want to fetch and <destination> is the file name where the result will be stored.
.cm
". We changed this
from the original "CM
" because of name clashes on case-insensitive
file systems. However, SML/NJ itself can work with any (reasonable)
choice of name for the metadata directory -- but for consistency the
choice has to be made at installation time.
To choose a different name for metadata directories, run
config/install.sh in the presence of an environment variable
CM_DIR_ARC. For example, if you want to have all these directories
be named "FOOBAR
", then run the installer (assuming a Bourne-ish
shell) as
$ CM_DIR_ARC=FOOBAR config/install.sh
$ exec xget -nv -O $2 $1Once you have myxget, simply run:
$ URLGETTER=myxget config/install.sh
!!! SML/NJ requires support for 32-bit executablesduring the install process. To fix this problem, you will need to acquire the 32-bit emulation libraries for your particular Linux distribution. For Debian (7.0 Wheezy and later) and recent version of Ubuntu, you will need to enable multiarch support. See https://wiki.ubuntu.com/MultiarchSpec for details, or try the following commands:
dpkg --add-architecture i386 apt-get update apt-get install libc6:i386You may also need to install the two following packages:
apt-get install gcc-multilib g++-multilibFor Red Hat Fedora (at least Fedora 16), you will need to install glibc-devel(i686):
yum install glibc-devel.i686For Red Hat Enterprise Linux (or CentOS), you may also have to install the rpm package libgcc-multilib, e.g.:
yum groupinstall "Development tools" yum install libgcc.i686 yum install glibc-devel.i686Older instructions for RHEL and CentOS: download the libgcc-multilib package from rpmseek.com and then run
rpm -ivh libgcc-multilib-xxx.x86_64.rpmwhere the libgcc-multilib package is the one you downloaded. For openSUSE use the YaST administration tool to install the gcc-32bit package.