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