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

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