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/NOTES/INSTALL
ViewVC logotype

Annotation of /sml/trunk/NOTES/INSTALL

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5892 - (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 : jhr 5873 $ d=/usr/local/smlnj # or whatever you like
19 : blume 1047 $ mkdir $d
20 :     $ cd $d
21 :    
22 :     - Download config.tgz, e.g.
23 :    
24 : jhr 5873 $ v=110.93 # or whatever is the version you desire
25 : mblume 1414 $ wget http://smlnj.cs.uchicago.edu/dist/working/$v/config.tgz
26 : blume 1047
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 : jhr 5873 On the x86-64 (aka amd64) hardware, the installer supports installing
42 :     either 32- or 64-bit versions of SML/NJ on macOS and Linux. The
43 :     relevant options are
44 :    
45 :     -default <sz> -- installs the system with the specified host
46 :     size (either 32 or 64 bits) as the default.
47 :     Currently, if this option is not specified,
48 :     then the default hostsize is 32.
49 :    
50 :     -32 | -64 -- installs the specified version of the system,
51 :     but does not override the default size. These
52 :     options can be used to install both the 32-
53 :     and 64-bit versions in the same location
54 : jhr 5892 by running the install.sh script twice.
55 :     In this case, you need to run the installation
56 :     of the default size second.
57 : jhr 5873
58 :     ** WARNING **
59 :     The 64-bit version of SML/NJ is new as of 110.94 and has not been
60 :     as thoroughly tested as the 32-bit version.
61 :    
62 : blume 1047 If the installer complains about not being able to fetch those
63 :     tarballs, try step 2.1.
64 :    
65 :     2. If you have a bit more time...
66 :     ---------------------------------
67 :    
68 :     2.1. If you do not have network connectivity...
69 :     -------------------------------------------------
70 :    
71 :     - Use some other means of downloading the necessary tarballs. Store
72 : mblume 1385 them in directory $d. Then run the installer (config/install.sh).
73 : blume 1047
74 : blume 1059 Here is a table that shows which packages you will need to download
75 : blume 1047 depending on what you select in config/targets. Take the union of
76 :     all the packages corresponding to your selection. Don't forget to
77 :     include the "(always)" entry. (<arch> and <os> should match your
78 :     host system.)
79 :    
80 : blume 1059 Keep in mind that making selections in config/targets there are
81 :     dependencies between packages. For example, eXene requires cml
82 :     and cml-lib. The installer script "knows" about these dependencies
83 :     and will automatically calculate the transitive closure of the
84 :     "requires" relation for you. Still, if you do not have network
85 :     connectivity, then you should have downloaded tarballs for the
86 :     entire transitive closure. (If you didn't, the installer will
87 :     kindly remind you.)
88 : blume 1047
89 : jhr 4227 if you select... | ... you need
90 : blume 1047 ---------------------------------------------------------------
91 :     (always) | boot.<arch>-<os>.tgz
92 :     | runtime.tgz
93 :     |
94 :     src-smlnj | MLRISC.tgz
95 :     | cm.tgz
96 :     | compiler.tgz
97 :     | smlnj-lib.tgz
98 :     | ml-yacc.tgz
99 :     | system.tgz
100 :     |
101 : jhr 4360 old-basis | old-basis.tgz
102 :     |
103 : blume 1047 ml-yacc | ml-yacc.tgz
104 :     |
105 :     ml-lex | ml-lex.tgz
106 :     |
107 :     ml-burg | ml-burg.tgz
108 :     requires: ml-lex |
109 :     |
110 :     smlnj-lib | smlnj-lib.tgz
111 :     |
112 :     pgraph-util | cm.tgz
113 :     |
114 :     cml | cml.tgz
115 :     requires: smlnj-lib |
116 :     |
117 :     cml-lib | cml.tgz
118 :     |
119 :     eXene | eXene.tgz
120 :     requires: cml, cml-lib |
121 :     |
122 :     ckit | ckit.tgz
123 :     |
124 :     ml-nlffi-lib | ml-nlffi-lib.tgz
125 :     |
126 :     ml-nlffigen | ml-nlffigen.tgz
127 :     requires: smlnj-lib, |
128 :     ckit |
129 :     |
130 :     mlrisc-tools | MLRISC.tgz
131 :     |
132 :     nowhere |
133 :     requires: mlrisc-tools |
134 :     |
135 : jhr 3926 doc | doc.tgz
136 : blume 1047
137 :     2.2. Tweaking "preloads"...
138 :     ----------------------------
139 :    
140 :     - Before running the installer (but after unpacking the config
141 :     directory), you can customize the set of libraries that are
142 :     pre-loaded (either directly or via CM's "autoload" mechanism).
143 :    
144 : mblume 1385 For this, edit config/preloads before running config/install.sh.
145 : blume 1047
146 :     2.3. Using a different ftp server (for a step-1.-like installation)
147 :     --------------------------------------------------------------------
148 :    
149 : mblume 1414 - If you have a local mirror for smlnj.cs.uchicago.edu/dist,
150 : blume 1047 then you can speed up installation by pointing the automatic URL
151 :     fetch mechanism there. The URL of the repository is stored in
152 : mblume 1362 config/srcarchiveurl. Edit this file before running
153 : mblume 1385 config/install.sh.
154 : blume 1047
155 :     2.4. Using locally stored tarballs
156 :     -----------------------------------
157 :    
158 :     - This is like step 2.3. -- except the URL in config/srcarchiveurl
159 :     should read something like
160 :    
161 :     file:///usr/src/packages/smlnj/working/110.38
162 :    
163 :     (In other words, the URL should spell out the name of the local
164 : mblume 1362 directory that happens to contain the tarballs. Notice that
165 :     this method does not seem to work with certain versions of wget
166 :     which do not understand the file:// scheme.)
167 : blume 1047
168 :     2.5. What needs to be on my PATH?
169 :     ----------------------------------
170 :    
171 :     - You should include $d/bin into your PATH.
172 :    
173 :     2.6. Which of all those files do I really need?
174 :     ------------------------------------------------
175 :    
176 :     After the installer completes, directory $d will be full of files
177 :     and subdirectories. Not all of them are actually required if you want
178 :     to use the system.
179 :    
180 :     In particular, if you are not interested in any of the source code,
181 :     you can DELETE EVERYTHING EXCEPT:
182 :    
183 :     $d/bin
184 :     $d/lib
185 :    
186 :     2.7. Can I move files to another directory after the fact?
187 :     -----------------------------------------------------------
188 :    
189 : jhr 4227 Yes.
190 : blume 1047
191 :     Here is the procedure:
192 :    
193 :     Suppose you have installed everything under $d and now you want to
194 :     move things to some other directory $e (e.g., e=/usr/share/smlnj):
195 :    
196 :     1. Move (at least) $d/bin and $d/lib to $e:
197 :    
198 :     $ mv $d/{bin,lib} $e
199 :    
200 : blume 1261 2. Before running the "sml" command, set the environment variable
201 :     SMLNJ_HOME to point to $e:
202 : blume 1047
203 : blume 1261 $ export SMLNJ_HOME=$e
204 : blume 1047
205 : blume 1261 If you want to put the contents of $e/lib somewhere else, then
206 :     point CM_PATHCONFIG to wherever the path configuration file
207 :     lives. (The default is $SMLNJ_HOME/lib/pathconfig.)
208 : blume 1047
209 : blume 1261 You can also scatter around the contents of $e/lib. If you do so,
210 :     you have to edit the path configuration file itself. See the CM
211 :     manual for more information on path anchors and path configuration.
212 : blume 1047
213 :     2.8 Forcing the installer to use a particular URL getter program
214 :     ----------------------------------------------------------------
215 :    
216 : mblume 1385 By default, config/install.sh will attempt to use wget, curl, and
217 :     lynx (in that order). If you already know which of these programs
218 :     you want the installer to use, then set the environment variable
219 :     URLGETTER to "wget", "curl", or "lynx", respectively.
220 : blume 1047
221 :     You can also set URLGETTER to any other command "foo" as long as
222 :     it can be invoked as
223 :    
224 :     $ foo <source> <destination>
225 :    
226 :     where <source> is the URL you want to fetch and <destination> is
227 :     the file name where the result will be stored.
228 :    
229 : mblume 1385 2.9 Where are those "CM" directories?
230 :     -------------------------------------
231 :    
232 :     CM metadata (source skeletons, compiled files, stable libraries, GUIDs,
233 :     ...) are now stored under a directory called ".cm". We changed this
234 :     from the original "CM" because of name clashes on case-insensitive
235 :     file systems. However, SML/NJ itself can work with any (reasonable)
236 :     choice of name for the metadata directory -- but for consistency the
237 :     choice has to be made at installation time.
238 :    
239 :     To choose a different name for metadata directories, run
240 :     config/install.sh in the presence of an environment variable
241 :     CM_DIR_ARC. For example, if you want to have all these directories
242 :     be named "FOOBAR", then run the installer (assuming a Bourne-ish
243 :     shell) as
244 :    
245 :     $ CM_DIR_ARC=FOOBAR config/install.sh
246 :    
247 : blume 1047 3. Troubleshooting:
248 :     -------------------
249 :    
250 :     3.1. You think you have network connectivity, but the installer fails
251 :     ---------------------------------------------------------------------
252 :    
253 :     - You probably do not have any of the following commands available
254 :     on your system: wget, lynx, curl.
255 :    
256 :     Failsafe remedy: Proceed according to step 2.1., using whatever
257 :     other FTP client you have.
258 :    
259 :     Alternative remedy: If you have some other command-line tool to
260 :     fetch URLs, make a wrapper for it (if necessary) so that it can
261 :     be invoked with precisely two arguments: <srcurl> and <dst>.
262 :     Then set the environment variable URLGETTER to the name of this
263 :     (wrapped) tool and try running the installer.
264 :    
265 :     Example: Suppose you don't have wget but a wget-lookalike named
266 :     "xget". You could then make a shell script that wraps xget, e.g.
267 :     using a shell script "myxget" consisting of the single line:
268 :    
269 : mblume 1385 $ exec xget -nv -O $2 $1
270 : blume 1047
271 :     Once you have myxget, simply run:
272 :    
273 : jhr 4227 $ URLGETTER=myxget config/install.sh
274 : mblume 1362
275 : jhr 3608 3.2. The install fails with a message about 32-bit support
276 :     ----------------------------------------------------------
277 :    
278 : jhr 5873 By default, SML/NJ is a 32-bit system. We have recently (as of
279 :     version 110.94) added beta support for 64-bit Linux and macOS
280 :     systems. See Section 1 above for more information.
281 : jhr 3608
282 : jhr 5873 To install the 32-bit version on a 64-bit architecture, you must
283 :     have support for running 32-bit binaries. On macOS (prior to
284 :     macOS 10.15 Catalena), this support is standard, but some 64-bit
285 :     Linux systems are not configured with 32-bit support. In such a
286 :     case, you will ge the message
287 :    
288 : jhr 4360 !!! SML/NJ requires support for 32-bit executables
289 : jhr 3608
290 :     during the install process. To fix this problem, you will need
291 :     to acquire the 32-bit emulation libraries for your particular Linux
292 :     distribution.
293 :    
294 : jhr 4227 For Debian (7.0 Wheezy and later) and recent version of Ubuntu, you will
295 :     need to enable multiarch support. See https://wiki.debian.org/Multiarch or
296 :     https://wiki.ubuntu.com/MultiarchSpec for details, or try the following
297 :     commands:
298 : dbm 3707
299 : jhr 4360 dpkg --add-architecture i386
300 :     apt-get update
301 :     apt-get install libc6:i386
302 : dbm 3707
303 : jhr 4227 For older versions of Debian and Ubuntu, you will need to install three
304 : jhr 4360 packages using apt-get:
305 : jhr 4227
306 : jhr 4360 apt-get install gcc-multilib g++-multilib ia32-libs
307 : jhr 4227
308 : dbm 3707 For Red Hat Fedora (at least Fedora 16), you will need to install
309 :     glibc-devel(i686):
310 :    
311 : jhr 4360 yum install glibc-devel.i686
312 : dbm 3707
313 : jhr 4227 For Red Hat Enterprise Linux (or CentOS), you may also have to
314 : dbm 3709 install the rpm package libgcc-multilib, e.g.:
315 :    
316 : jhr 4360 yum groupinstall "Development tools"
317 :     yum install libgcc.i686
318 :     yum install glibc-devel.i686
319 : dbm 3709
320 : jhr 4227 Older instructions for RHEL and CentOS: download the libgcc-multilib package
321 :     from rpmseek.com and then run
322 : dbm 3709
323 : jhr 4360 rpm -ivh libgcc-multilib-xxx.x86_64.rpm
324 : jhr 4227
325 :     where the libgcc-multilib package is the one you downloaded.
326 :    
327 : jhr 4360 For openSUSE use the YaST administration tool to install the gcc-32bit
328 :     package.
329 : jhr 4227
330 : mblume 1362 ----------------------------------------------------------------------------

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