1 : |
blume |
1047 |
Installation instructions for SML/NJ
|
2 : |
|
|
------------------------------------
|
3 : |
|
|
|
4 : |
|
|
These are instructions for installing recent "working" versions of SML/NJ.
|
5 : |
|
|
|
6 : |
|
|
1. If you are in a hurry (and you have network connectivity) ...
|
7 : |
|
|
----------------------------------------------------------------
|
8 : |
|
|
|
9 : |
|
|
- Pick a place to do the installation, e.g.
|
10 : |
|
|
|
11 : |
|
|
$ d=/usr/share/smlnj # or whatever you like
|
12 : |
|
|
$ mkdir $d
|
13 : |
|
|
$ cd $d
|
14 : |
|
|
|
15 : |
|
|
- Download config.tgz, e.g.
|
16 : |
|
|
|
17 : |
|
|
$ v=110.38 # or whatever is the version you desire
|
18 : |
|
|
$ wget http://ftp.research.bell-labs.com/dist/smlnj/working/$v/config.tgz
|
19 : |
|
|
|
20 : |
|
|
- Gunzip and untar, e.g.
|
21 : |
|
|
|
22 : |
|
|
$ gunzip <config.tgz | tar xf -
|
23 : |
|
|
|
24 : |
|
|
This creates a subdirectory "config"
|
25 : |
|
|
|
26 : |
|
|
- Edit the "config/targets" file to your taste. If you leave this
|
27 : |
|
|
file alone, you end up with a minimal installation.
|
28 : |
|
|
|
29 : |
|
|
- Run the installer, it will automatically fetch all other necessary
|
30 : |
|
|
tarballs:
|
31 : |
|
|
|
32 : |
|
|
$ config/install.sh
|
33 : |
|
|
|
34 : |
|
|
If the installer complains about not being able to fetch those
|
35 : |
|
|
tarballs, try step 2.1.
|
36 : |
|
|
|
37 : |
|
|
2. If you have a bit more time...
|
38 : |
|
|
---------------------------------
|
39 : |
|
|
|
40 : |
|
|
2.1. If you do not have network connectivity...
|
41 : |
|
|
-------------------------------------------------
|
42 : |
|
|
|
43 : |
|
|
- Use some other means of downloading the necessary tarballs. Store
|
44 : |
|
|
them in directory $d. Then run the installer (config/install.sh).
|
45 : |
|
|
|
46 : |
blume |
1059 |
Here is a table that shows which packages you will need to download
|
47 : |
blume |
1047 |
depending on what you select in config/targets. Take the union of
|
48 : |
|
|
all the packages corresponding to your selection. Don't forget to
|
49 : |
|
|
include the "(always)" entry. (<arch> and <os> should match your
|
50 : |
|
|
host system.)
|
51 : |
|
|
|
52 : |
blume |
1059 |
Keep in mind that making selections in config/targets there are
|
53 : |
|
|
dependencies between packages. For example, eXene requires cml
|
54 : |
|
|
and cml-lib. The installer script "knows" about these dependencies
|
55 : |
|
|
and will automatically calculate the transitive closure of the
|
56 : |
|
|
"requires" relation for you. Still, if you do not have network
|
57 : |
|
|
connectivity, then you should have downloaded tarballs for the
|
58 : |
|
|
entire transitive closure. (If you didn't, the installer will
|
59 : |
|
|
kindly remind you.)
|
60 : |
blume |
1047 |
|
61 : |
|
|
if you select... | ... you need
|
62 : |
|
|
---------------------------------------------------------------
|
63 : |
|
|
(always) | boot.<arch>-<os>.tgz
|
64 : |
|
|
| runtime.tgz
|
65 : |
|
|
|
|
66 : |
|
|
src-smlnj | MLRISC.tgz
|
67 : |
|
|
| cm.tgz
|
68 : |
|
|
| compiler.tgz
|
69 : |
|
|
| smlnj-lib.tgz
|
70 : |
|
|
| ml-yacc.tgz
|
71 : |
|
|
| system.tgz
|
72 : |
|
|
|
|
73 : |
|
|
ml-yacc | ml-yacc.tgz
|
74 : |
|
|
|
|
75 : |
|
|
ml-lex | ml-lex.tgz
|
76 : |
|
|
|
|
77 : |
|
|
ml-burg | ml-burg.tgz
|
78 : |
|
|
requires: ml-lex |
|
79 : |
|
|
|
|
80 : |
|
|
smlnj-lib | smlnj-lib.tgz
|
81 : |
|
|
|
|
82 : |
|
|
pgraph-util | cm.tgz
|
83 : |
|
|
|
|
84 : |
|
|
cml | cml.tgz
|
85 : |
|
|
requires: smlnj-lib |
|
86 : |
|
|
|
|
87 : |
|
|
cml-lib | cml.tgz
|
88 : |
|
|
|
|
89 : |
|
|
eXene | eXene.tgz
|
90 : |
|
|
requires: cml, cml-lib |
|
91 : |
|
|
|
|
92 : |
|
|
ckit | ckit.tgz
|
93 : |
|
|
|
|
94 : |
|
|
ml-nlffi-lib | ml-nlffi-lib.tgz
|
95 : |
|
|
|
|
96 : |
|
|
ml-nlffigen | ml-nlffigen.tgz
|
97 : |
|
|
requires: smlnj-lib, |
|
98 : |
|
|
ckit |
|
99 : |
|
|
|
|
100 : |
|
|
mlrisc-tools | MLRISC.tgz
|
101 : |
|
|
|
|
102 : |
|
|
nowhere |
|
103 : |
|
|
requires: mlrisc-tools |
|
104 : |
|
|
|
|
105 : |
|
|
doc | - (currently unavailable)
|
106 : |
|
|
|
107 : |
|
|
2.2. Tweaking "preloads"...
|
108 : |
|
|
----------------------------
|
109 : |
|
|
|
110 : |
|
|
- Before running the installer (but after unpacking the config
|
111 : |
|
|
directory), you can customize the set of libraries that are
|
112 : |
|
|
pre-loaded (either directly or via CM's "autoload" mechanism).
|
113 : |
|
|
|
114 : |
|
|
For this, edit config/preloads before running config/install.sh.
|
115 : |
|
|
|
116 : |
|
|
2.3. Using a different ftp server (for a step-1.-like installation)
|
117 : |
|
|
--------------------------------------------------------------------
|
118 : |
|
|
|
119 : |
|
|
- If you have a local mirror for ftp.research.bell-labs.com/dist/smlnj,
|
120 : |
|
|
then you can speed up installation by pointing the automatic URL
|
121 : |
|
|
fetch mechanism there. The URL of the repository is stored in
|
122 : |
|
|
config/srcarchiveurl. Edit this file before running config/install.sh.
|
123 : |
|
|
|
124 : |
|
|
2.4. Using locally stored tarballs
|
125 : |
|
|
-----------------------------------
|
126 : |
|
|
|
127 : |
|
|
- This is like step 2.3. -- except the URL in config/srcarchiveurl
|
128 : |
|
|
should read something like
|
129 : |
|
|
|
130 : |
|
|
file:///usr/src/packages/smlnj/working/110.38
|
131 : |
|
|
|
132 : |
|
|
(In other words, the URL should spell out the name of the local
|
133 : |
|
|
directory that happens to contain the tarballs.)
|
134 : |
|
|
|
135 : |
|
|
2.5. What needs to be on my PATH?
|
136 : |
|
|
----------------------------------
|
137 : |
|
|
|
138 : |
|
|
- You should include $d/bin into your PATH.
|
139 : |
|
|
|
140 : |
|
|
2.6. Which of all those files do I really need?
|
141 : |
|
|
------------------------------------------------
|
142 : |
|
|
|
143 : |
|
|
After the installer completes, directory $d will be full of files
|
144 : |
|
|
and subdirectories. Not all of them are actually required if you want
|
145 : |
|
|
to use the system.
|
146 : |
|
|
|
147 : |
|
|
In particular, if you are not interested in any of the source code,
|
148 : |
|
|
you can DELETE EVERYTHING EXCEPT:
|
149 : |
|
|
|
150 : |
|
|
$d/bin
|
151 : |
|
|
$d/lib
|
152 : |
|
|
|
153 : |
|
|
2.7. Can I move files to another directory after the fact?
|
154 : |
|
|
-----------------------------------------------------------
|
155 : |
|
|
|
156 : |
|
|
Yes. But this requires two small tweaks (points 2. and 3. below).
|
157 : |
|
|
|
158 : |
|
|
Here is the procedure:
|
159 : |
|
|
|
160 : |
|
|
Suppose you have installed everything under $d and now you want to
|
161 : |
|
|
move things to some other directory $e (e.g., e=/usr/share/smlnj):
|
162 : |
|
|
|
163 : |
|
|
1. Move (at least) $d/bin and $d/lib to $e:
|
164 : |
|
|
|
165 : |
|
|
$ mv $d/{bin,lib} $e
|
166 : |
|
|
|
167 : |
|
|
2. Edit $e/bin/.run-sml and change the value of
|
168 : |
|
|
the variable BIN_DIR to (the value of) $e/bin.
|
169 : |
|
|
(If e=/usr/share/smlnj, then the value would have to be
|
170 : |
|
|
/usr/share/smlnj/bin.)
|
171 : |
|
|
|
172 : |
|
|
3. Before running the "sml" command, set the environment variable
|
173 : |
|
|
CM_PATHCONFIG to $e/lib. You could do this globally, either
|
174 : |
|
|
in a system-wide .profile or even by adding a line, e.g.,
|
175 : |
|
|
|
176 : |
|
|
export CM_PATHCONFIG=/usr/share/smlnj/lib
|
177 : |
|
|
|
178 : |
|
|
to $e/bin/.run-sml.
|
179 : |
|
|
|
180 : |
|
|
Alternatively, each user who wants to run "sml" could set the
|
181 : |
|
|
variable by him/herself.
|
182 : |
|
|
|
183 : |
|
|
2.8 Forcing the installer to use a particular URL getter program
|
184 : |
|
|
----------------------------------------------------------------
|
185 : |
|
|
|
186 : |
|
|
By default, config/install.sh will attempt to use wget, curl, and lynx
|
187 : |
|
|
(in that order). If you already know which of these programs you want
|
188 : |
|
|
the installer to use, then set the environment variable URLGETTER
|
189 : |
|
|
to "wget", "curl", or "lynx", respectively.
|
190 : |
|
|
|
191 : |
|
|
You can also set URLGETTER to any other command "foo" as long as
|
192 : |
|
|
it can be invoked as
|
193 : |
|
|
|
194 : |
|
|
$ foo <source> <destination>
|
195 : |
|
|
|
196 : |
|
|
where <source> is the URL you want to fetch and <destination> is
|
197 : |
|
|
the file name where the result will be stored.
|
198 : |
|
|
|
199 : |
|
|
3. Troubleshooting:
|
200 : |
|
|
-------------------
|
201 : |
|
|
|
202 : |
|
|
3.1. You think you have network connectivity, but the installer fails
|
203 : |
|
|
---------------------------------------------------------------------
|
204 : |
|
|
|
205 : |
|
|
- You probably do not have any of the following commands available
|
206 : |
|
|
on your system: wget, lynx, curl.
|
207 : |
|
|
|
208 : |
|
|
Failsafe remedy: Proceed according to step 2.1., using whatever
|
209 : |
|
|
other FTP client you have.
|
210 : |
|
|
|
211 : |
|
|
Alternative remedy: If you have some other command-line tool to
|
212 : |
|
|
fetch URLs, make a wrapper for it (if necessary) so that it can
|
213 : |
|
|
be invoked with precisely two arguments: <srcurl> and <dst>.
|
214 : |
|
|
Then set the environment variable URLGETTER to the name of this
|
215 : |
|
|
(wrapped) tool and try running the installer.
|
216 : |
|
|
|
217 : |
|
|
Example: Suppose you don't have wget but a wget-lookalike named
|
218 : |
|
|
"xget". You could then make a shell script that wraps xget, e.g.
|
219 : |
|
|
using a shell script "myxget" consisting of the single line:
|
220 : |
|
|
|
221 : |
|
|
exec xget -nv -O $2 $1
|
222 : |
|
|
|
223 : |
|
|
Once you have myxget, simply run:
|
224 : |
|
|
|
225 : |
|
|
URLGETTER=myxget config/install.sh
|