Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/INSTALL
ViewVC logotype

Annotation of /sml/trunk/INSTALL

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1362 - (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 : mblume 1362 $ config/new-install.sh
40 :    
41 :     or, if this should fail for any reason(*),
42 :    
43 : blume 1047 $ config/install.sh
44 :    
45 :     If the installer complains about not being able to fetch those
46 :     tarballs, try step 2.1.
47 :    
48 :     2. If you have a bit more time...
49 :     ---------------------------------
50 :    
51 :     2.1. If you do not have network connectivity...
52 :     -------------------------------------------------
53 :    
54 :     - Use some other means of downloading the necessary tarballs. Store
55 : mblume 1362 them in directory $d. Then run the installer (config/new-install.sh
56 :     or config/install.sh).
57 : blume 1047
58 : blume 1059 Here is a table that shows which packages you will need to download
59 : blume 1047 depending on what you select in config/targets. Take the union of
60 :     all the packages corresponding to your selection. Don't forget to
61 :     include the "(always)" entry. (<arch> and <os> should match your
62 :     host system.)
63 :    
64 : blume 1059 Keep in mind that making selections in config/targets there are
65 :     dependencies between packages. For example, eXene requires cml
66 :     and cml-lib. The installer script "knows" about these dependencies
67 :     and will automatically calculate the transitive closure of the
68 :     "requires" relation for you. Still, if you do not have network
69 :     connectivity, then you should have downloaded tarballs for the
70 :     entire transitive closure. (If you didn't, the installer will
71 :     kindly remind you.)
72 : blume 1047
73 :     if you select... | ... you need
74 :     ---------------------------------------------------------------
75 :     (always) | boot.<arch>-<os>.tgz
76 :     | runtime.tgz
77 :     |
78 :     src-smlnj | MLRISC.tgz
79 :     | cm.tgz
80 :     | compiler.tgz
81 :     | smlnj-lib.tgz
82 :     | ml-yacc.tgz
83 :     | system.tgz
84 :     |
85 :     ml-yacc | ml-yacc.tgz
86 :     |
87 :     ml-lex | ml-lex.tgz
88 :     |
89 :     ml-burg | ml-burg.tgz
90 :     requires: ml-lex |
91 :     |
92 :     smlnj-lib | smlnj-lib.tgz
93 :     |
94 :     pgraph-util | cm.tgz
95 :     |
96 :     cml | cml.tgz
97 :     requires: smlnj-lib |
98 :     |
99 :     cml-lib | cml.tgz
100 :     |
101 :     eXene | eXene.tgz
102 :     requires: cml, cml-lib |
103 :     |
104 :     ckit | ckit.tgz
105 :     |
106 :     ml-nlffi-lib | ml-nlffi-lib.tgz
107 :     |
108 :     ml-nlffigen | ml-nlffigen.tgz
109 :     requires: smlnj-lib, |
110 :     ckit |
111 :     |
112 :     mlrisc-tools | MLRISC.tgz
113 :     |
114 :     nowhere |
115 :     requires: mlrisc-tools |
116 :     |
117 :     doc | - (currently unavailable)
118 :    
119 :     2.2. Tweaking "preloads"...
120 :     ----------------------------
121 :    
122 :     - Before running the installer (but after unpacking the config
123 :     directory), you can customize the set of libraries that are
124 :     pre-loaded (either directly or via CM's "autoload" mechanism).
125 :    
126 : mblume 1362 For this, edit config/preloads before running config/new-install.sh
127 :     (or config/install.sh).
128 : blume 1047
129 :     2.3. Using a different ftp server (for a step-1.-like installation)
130 :     --------------------------------------------------------------------
131 :    
132 :     - If you have a local mirror for ftp.research.bell-labs.com/dist/smlnj,
133 :     then you can speed up installation by pointing the automatic URL
134 :     fetch mechanism there. The URL of the repository is stored in
135 : mblume 1362 config/srcarchiveurl. Edit this file before running
136 :     config/new-install.sh (or config/install.sh).
137 : blume 1047
138 :     2.4. Using locally stored tarballs
139 :     -----------------------------------
140 :    
141 :     - This is like step 2.3. -- except the URL in config/srcarchiveurl
142 :     should read something like
143 :    
144 :     file:///usr/src/packages/smlnj/working/110.38
145 :    
146 :     (In other words, the URL should spell out the name of the local
147 : mblume 1362 directory that happens to contain the tarballs. Notice that
148 :     this method does not seem to work with certain versions of wget
149 :     which do not understand the file:// scheme.)
150 : blume 1047
151 :     2.5. What needs to be on my PATH?
152 :     ----------------------------------
153 :    
154 :     - You should include $d/bin into your PATH.
155 :    
156 :     2.6. Which of all those files do I really need?
157 :     ------------------------------------------------
158 :    
159 :     After the installer completes, directory $d will be full of files
160 :     and subdirectories. Not all of them are actually required if you want
161 :     to use the system.
162 :    
163 :     In particular, if you are not interested in any of the source code,
164 :     you can DELETE EVERYTHING EXCEPT:
165 :    
166 :     $d/bin
167 :     $d/lib
168 :    
169 :     2.7. Can I move files to another directory after the fact?
170 :     -----------------------------------------------------------
171 :    
172 : blume 1261 Yes.
173 : blume 1047
174 :     Here is the procedure:
175 :    
176 :     Suppose you have installed everything under $d and now you want to
177 :     move things to some other directory $e (e.g., e=/usr/share/smlnj):
178 :    
179 :     1. Move (at least) $d/bin and $d/lib to $e:
180 :    
181 :     $ mv $d/{bin,lib} $e
182 :    
183 : blume 1261 2. Before running the "sml" command, set the environment variable
184 :     SMLNJ_HOME to point to $e:
185 : blume 1047
186 : blume 1261 $ export SMLNJ_HOME=$e
187 : blume 1047
188 : blume 1261 If you want to put the contents of $e/lib somewhere else, then
189 :     point CM_PATHCONFIG to wherever the path configuration file
190 :     lives. (The default is $SMLNJ_HOME/lib/pathconfig.)
191 : blume 1047
192 : blume 1261 You can also scatter around the contents of $e/lib. If you do so,
193 :     you have to edit the path configuration file itself. See the CM
194 :     manual for more information on path anchors and path configuration.
195 : blume 1047
196 :     2.8 Forcing the installer to use a particular URL getter program
197 :     ----------------------------------------------------------------
198 :    
199 : mblume 1362 By default, config/new-install.sh (and config/install.sh) will
200 :     attempt to use wget, curl, and lynx (in that order). If you
201 :     already know which of these programs you want
202 : blume 1047 the installer to use, then set the environment variable URLGETTER
203 :     to "wget", "curl", or "lynx", respectively.
204 :    
205 :     You can also set URLGETTER to any other command "foo" as long as
206 :     it can be invoked as
207 :    
208 :     $ foo <source> <destination>
209 :    
210 :     where <source> is the URL you want to fetch and <destination> is
211 :     the file name where the result will be stored.
212 :    
213 :     3. Troubleshooting:
214 :     -------------------
215 :    
216 :     3.1. You think you have network connectivity, but the installer fails
217 :     ---------------------------------------------------------------------
218 :    
219 :     - You probably do not have any of the following commands available
220 :     on your system: wget, lynx, curl.
221 :    
222 :     Failsafe remedy: Proceed according to step 2.1., using whatever
223 :     other FTP client you have.
224 :    
225 :     Alternative remedy: If you have some other command-line tool to
226 :     fetch URLs, make a wrapper for it (if necessary) so that it can
227 :     be invoked with precisely two arguments: <srcurl> and <dst>.
228 :     Then set the environment variable URLGETTER to the name of this
229 :     (wrapped) tool and try running the installer.
230 :    
231 :     Example: Suppose you don't have wget but a wget-lookalike named
232 :     "xget". You could then make a shell script that wraps xget, e.g.
233 :     using a shell script "myxget" consisting of the single line:
234 :    
235 :     exec xget -nv -O $2 $1
236 :    
237 :     Once you have myxget, simply run:
238 :    
239 :     URLGETTER=myxget config/install.sh
240 : mblume 1362
241 :     ----------------------------------------------------------------------------
242 :     (*) config/new-install.sh is a newer version of our installer with
243 :     major parts written in SML rather than as a shell script.
244 :     Since it is fairly new it may still have some problems -- in which
245 :     case you can fall back to the old config/install.sh.

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0