Mercurial > octave-nkf
annotate doc/interpreter/install.txi @ 8325:b93ac0586e4b
spelling corrections
Here is a patch with some spelling corrections to the manual.
changeset: 8308:aeaf884ea9af
user: Brian Gough <bjg@gnu.org>
date: Fri Nov 07 09:26:17 2008 -0500
summary: [docs] assoicated => associated
author | Brian Gough<bjg@network-theory.co.uk> |
---|---|
date | Mon, 17 Nov 2008 11:38:39 +0100 |
parents | 30c0533e39ae |
children | 00df69d7e698 |
rev | line source |
---|---|
6778 | 1 @c Copyright (C) 1996, 1997, 2007 John W. Eaton |
7018 | 2 @c |
3 @c This file is part of Octave. | |
4 @c | |
5 @c Octave is free software; you can redistribute it and/or modify it | |
6 @c under the terms of the GNU General Public License as published by the | |
7 @c Free Software Foundation; either version 3 of the License, or (at | |
8 @c your option) any later version. | |
9 @c | |
10 @c Octave is distributed in the hope that it will be useful, but WITHOUT | |
11 @c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
12 @c FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
13 @c for more details. | |
14 @c | |
15 @c You should have received a copy of the GNU General Public License | |
16 @c along with Octave; see the file COPYING. If not, see | |
17 @c <http://www.gnu.org/licenses/>. | |
3294 | 18 |
7018 | 19 @c The text of this file appears in the file INSTALL in the Octave |
20 @c distribution, as well as in the Octave manual. | |
3294 | 21 |
22 @ifclear INSTALLONLY | |
4167 | 23 @node Installation |
3294 | 24 @appendix Installing Octave |
25 @end ifclear | |
26 | |
27 @ifset INSTALLONLY | |
28 @include conf.texi | |
29 | |
30 This file documents the installation of Octave. | |
31 | |
32 Octave is free software; you can redistribute it and/or modify it | |
33 under the terms of the GNU General Public License as published by the | |
34 Free Software Foundation. | |
35 | |
7144 | 36 @strong{Note:} This file is automatically generated from |
37 @file{doc/interpreter/install.txi} in the Octave sources, so to make | |
8325
b93ac0586e4b
spelling corrections
Brian Gough<bjg@network-theory.co.uk>
parents:
7144
diff
changeset
|
38 changes to this documentation file, change that source file. |
7144 | 39 |
4167 | 40 @node Installation |
3294 | 41 @chapter Installing Octave |
42 @end ifset | |
43 | |
44 @cindex installing Octave | |
45 | |
46 Here is the procedure for installing Octave from scratch on a Unix | |
3862 | 47 system. |
3294 | 48 |
49 @itemize @bullet | |
50 @item | |
51 Run the shell script @file{configure}. This will determine the features | |
52 your system has (or doesn't have) and create a file named | |
53 @file{Makefile} from each of the files named @file{Makefile.in}. | |
54 | |
55 Here is a summary of the configure options that are most frequently used | |
56 when building Octave: | |
57 | |
58 @table @code | |
59 @item --prefix=@var{prefix} | |
60 Install Octave in subdirectories below @var{prefix}. The default value | |
61 of @var{prefix} is @file{/usr/local}. | |
62 | |
63 @item --srcdir=@var{dir} | |
64 Look for Octave sources in the directory @var{dir}. | |
65 | |
7091 | 66 @item --enable-bounds-check |
67 Enable bounds checking for indexing operators in the internal array | |
68 classes. This option is primarily used for debugging Octave. Building | |
8325
b93ac0586e4b
spelling corrections
Brian Gough<bjg@network-theory.co.uk>
parents:
7144
diff
changeset
|
69 Octave with this option has a negative impact on performance and is not |
7091 | 70 recommended for general use. |
3294 | 71 |
7091 | 72 @item --enable-64 |
73 This is an @strong{experimental} option to enable Octave to use 64-bit | |
74 integers for array dimensions and indexing on 64-bit platforms. You | |
75 probably don't want to use this option unless you know what you are | |
76 doing. | |
77 | |
78 If you use @code{--enable-64}, you must ensure that your Fortran | |
79 compiler generates code with 8 byte signed @code{INTEGER} values, and | |
80 that your BLAS and LAPACK libraries are compiled to use 8 byte | |
81 signed integers for array dimensions and indexing. | |
3294 | 82 |
83 @item --enable-shared | |
7091 | 84 Create shared libraries (this is the default). If you are planning to |
85 use the dynamic loading features, you will probably want to use this | |
86 option. It will make your @file{.oct} files much smaller and on some | |
87 systems it may be necessary to build shared libraries in order to use | |
88 dynamically linked functions. | |
3294 | 89 |
90 You may also want to build a shared version of @code{libstdc++}, if your | |
7081 | 91 system doesn't already have one. |
3294 | 92 |
93 @item --enable-dl | |
94 Use @code{dlopen} and friends to make Octave capable of dynamically | |
7091 | 95 linking externally compiled functions (this is the default if |
96 @code{--enable-shared} is specified). This option only works on systems | |
97 that actually have these functions. If you plan on using this feature, you | |
3294 | 98 should probably also use @code{--enable-shared} to reduce the size of |
99 your @file{.oct} files. | |
100 | |
7091 | 101 @item --without-blas |
102 Compile and use the generic BLAS and LAPACK versions included with | |
103 Octave. By default, configure first looks for BLAS and LAPACK matrix | |
104 libraries on your system, including optimized BLAS implementations such | |
105 as the free ATLAS 3.0, as well as vendor-tuned libraries. (The use of | |
106 an optimized BLAS will generally result in several-times faster matrix | |
107 operations.) Only use this option if your system has BLAS/LAPACK | |
108 libraries that cause problems for some reason. You can also use | |
109 @code{--with-blas=lib} to specify a particular BLAS library | |
110 @code{-llib} that configure doesn't check for automatically. | |
111 | |
112 @item --without-ccolamd | |
113 Don't use CCOLAMD, disable some sparse matrix functionality. | |
114 | |
115 @item --without-colamd | |
116 Don't use COLAMD, disable some sparse matrix functionality. | |
117 | |
118 @item --without-curl | |
119 Don't use the cURL, disable the @code{urlread} and @code{urlwrite} | |
120 functions. | |
3294 | 121 |
7091 | 122 @item --without-cxsparse |
123 Don't use CXSPARSE, disable some sparse matrix functionality. | |
124 | |
125 @item --without-umfpack | |
126 Don't use UMFPACK, disable some sparse matrix functionality. | |
127 | |
128 @item --without-fftw | |
129 Use the included fftpack library instead of the FFTW library. | |
3294 | 130 |
7091 | 131 @item --without-glpk |
132 Don't use the GLPK library for linear programming. | |
133 | |
134 @item --without-hdf5 | |
135 Don't use the HDF5 library for reading and writing HDF5 files. | |
136 | |
137 @item --without-zlib | |
138 Don't use the zlib library, disable data file compression and support | |
139 for recent MAT file formats. | |
140 | |
141 @item --without-lapack | |
3690 | 142 Compile and use the generic BLAS and LAPACK versions included with |
143 Octave. By default, configure first looks for BLAS and LAPACK matrix | |
144 libraries on your system, including optimized BLAS implementations such | |
145 as the free ATLAS 3.0, as well as vendor-tuned libraries. (The use of | |
146 an optimized BLAS will generally result in several-times faster matrix | |
147 operations.) Only use this option if your system has BLAS/LAPACK | |
148 libraries that cause problems for some reason. You can also use | |
3960 | 149 @code{--with-blas=lib} to specify a particular BLAS library |
3690 | 150 @code{-llib} that configure doesn't check for automatically. |
151 | |
3294 | 152 @item --help |
153 Print a summary of the options recognized by the configure script. | |
154 @end table | |
155 | |
156 See the file @file{INSTALL} for more information about the command line | |
157 options used by configure. That file also contains instructions for | |
158 compiling in a directory other than where the source is located. | |
159 | |
160 @item | |
161 Run make. | |
162 | |
163 You will need a recent version of GNU Make. Modifying Octave's | |
164 makefiles to work with other make programs is probably not worth | |
165 your time. We recommend you get and compile GNU Make instead. | |
166 | |
167 For plotting, you will need to have gnuplot installed on your system. | |
168 Gnuplot is a command-driven interactive function plotting program. | |
169 Gnuplot is copyrighted, but freely distributable. The `gnu' in gnuplot | |
170 is a coincidence---it is not related to the GNU project or the FSF in | |
171 any but the most peripheral sense. | |
172 | |
7091 | 173 To compile Octave, you will need a recent version of GNU Make. You will |
174 also need a recent version of @code{g++} or other ANSI C++ compiler. You | |
175 will also need a Fortran 77 compiler or @code{f2c}. If you use | |
176 @code{f2c}, you will need a script like @code{fort77} that works like a | |
177 normal Fortran compiler by combining @code{f2c} with your C compiler in | |
178 a single script. | |
3294 | 179 |
180 If you plan to modify the parser you will also need GNU @code{bison} and | |
181 @code{flex}. If you modify the documentation, you will need GNU | |
182 Texinfo, along with the patch for the @code{makeinfo} program that is | |
183 distributed with Octave. | |
184 | |
185 GNU Make, @code{gcc}, and @code{libstdc++}, @code{gnuplot}, | |
186 @code{bison}, @code{flex}, and Texinfo are all available from many | |
187 anonymous ftp archives. The primary site is @url{ftp.gnu.org}, but it | |
188 is often very busy. A list of sites that mirror the software on | |
189 @url{ftp.gnu.org} is available by anonymous ftp from | |
190 @url{ftp://ftp.gnu.org/pub/gnu/GNUinfo/FTP}. | |
191 | |
7091 | 192 You will need about 925 megabytes of disk storage to work with when |
193 building Octave from source (considerably less if you don't compile with | |
194 debugging symbols). To do that, use the command | |
3294 | 195 |
196 @example | |
197 make CFLAGS=-O CXXFLAGS=-O LDFLAGS= | |
198 @end example | |
199 | |
200 @noindent | |
201 instead of just @samp{make}. | |
202 | |
203 @item | |
204 If you encounter errors while compiling Octave, first check the list of | |
205 known problems below to see if there is a workaround or solution for | |
206 your problem. If not, | |
207 @ifclear INSTALLONLY | |
208 see @ref{Trouble}, | |
209 @end ifclear | |
210 @ifset INSTALLONLY | |
211 see the file BUGS | |
212 @end ifset | |
213 for information about how to report bugs. | |
214 | |
215 @item | |
216 Once you have successfully compiled Octave, run @samp{make install}. | |
217 | |
218 This will install a copy of octave, its libraries, and its documentation | |
219 in the destination directory. As distributed, Octave is installed in | |
220 the following directories. In the table below, @var{prefix} defaults to | |
221 @file{/usr/local}, @var{version} stands for the current version number | |
222 of the interpreter, and @var{arch} is the type of computer on which | |
223 Octave is installed (for example, @samp{i586-unknown-gnu}). | |
224 | |
225 @table @file | |
226 @item @var{prefix}/bin | |
227 Octave and other binaries that people will want to run directly. | |
228 | |
229 @item @var{prefix}/lib | |
230 Libraries like libcruft.a and liboctave.a. | |
231 | |
232 @item @var{prefix}/share | |
233 Architecture-independent data files. | |
234 | |
235 @item @var{prefix}/include/octave | |
236 Include files distributed with Octave. | |
237 | |
238 @item @var{prefix}/man/man1 | |
239 Unix-style man pages describing Octave. | |
240 | |
241 @item @var{prefix}/info | |
242 Info files describing Octave. | |
243 | |
244 @item @var{prefix}/share/octave/@var{version}/m | |
245 Function files distributed with Octave. This includes the Octave | |
246 version, so that multiple versions of Octave may be installed at the | |
247 same time. | |
248 | |
249 @item @var{prefix}/lib/octave/@var{version}/exec/@var{arch} | |
250 Executables to be run by Octave rather than the user. | |
251 | |
252 @item @var{prefix}/lib/octave/@var{version}/oct/@var{arch} | |
253 Object files that will be dynamically loaded. | |
254 | |
255 @item @var{prefix}/share/octave/@var{version}/imagelib | |
256 Image files that are distributed with Octave. | |
257 @end table | |
258 @end itemize | |
259 | |
260 @menu | |
261 * Installation Problems:: | |
262 @end menu | |
263 | |
4167 | 264 @node Installation Problems |
3294 | 265 @appendixsec Installation Problems |
266 | |
267 This section contains a list of problems (and some apparent problems | |
268 that don't really mean anything is wrong) that may show up during | |
269 installation of Octave. | |
270 | |
271 @itemize @bullet | |
272 @item | |
273 On some SCO systems, @code{info} fails to compile if | |
8325
b93ac0586e4b
spelling corrections
Brian Gough<bjg@network-theory.co.uk>
parents:
7144
diff
changeset
|
274 @code{HAVE_TERMIOS_H} is defined in @file{config.h}. Simply removing |
3294 | 275 the definition from @file{info/config.h} should allow it to compile. |
276 | |
277 @item | |
278 If @code{configure} finds @code{dlopen}, @code{dlsym}, @code{dlclose}, | |
279 and @code{dlerror}, but not the header file @file{dlfcn.h}, you need to | |
280 find the source for the header file and install it in the directory | |
281 @file{usr/include}. This is reportedly a problem with Slackware 3.1. | |
282 For Linux/GNU systems, the source for @file{dlfcn.h} is in the | |
283 @code{ldso} package. | |
284 | |
285 @item | |
286 Building @file{.oct} files doesn't work. | |
287 | |
288 You should probably have a shared version of @code{libstdc++}. A patch | |
289 is needed to build shared versions of version 2.7.2 of @code{libstdc++} | |
290 on the HP-PA architecture. You can find the patch at | |
291 @url{ftp://ftp.cygnus.com/pub/g++/libg++-2.7.2-hppa-gcc-fix}. | |
292 | |
293 @item | |
3464 | 294 On some alpha systems there may be a problem with the @code{libdxml} |
295 library, resulting in floating point errors and/or segmentation faults in | |
296 the linear algebra routines called by Octave. If you encounter such | |
297 problems, then you should modify the configure script so that | |
298 @code{SPECIAL_MATH_LIB} is not set to @code{-ldxml}. | |
299 | |
300 @item | |
3294 | 301 On FreeBSD systems Octave may hang while initializing some internal |
302 constants. The fix appears to be to use | |
303 | |
304 @example | |
305 options GPL_MATH_EMULATE | |
306 @end example | |
307 | |
308 @noindent | |
309 rather than | |
310 | |
311 @example | |
312 options MATH_EMULATE | |
313 @end example | |
314 | |
315 @noindent | |
316 in the kernel configuration files (typically found in the directory | |
317 @file{/sys/i386/conf}. After making this change, you'll need to rebuild | |
318 the kernel, install it, and reboot. | |
319 | |
320 @item | |
321 If you encounter errors like | |
322 | |
6670 | 323 @example |
3294 | 324 @group |
325 passing `void (*)()' as argument 2 of | |
326 `octave_set_signal_handler(int, void (*)(int))' | |
327 @end group | |
6670 | 328 @end example |
3294 | 329 |
330 @noindent | |
331 or | |
332 | |
6670 | 333 @example |
7081 | 334 warning: ANSI C++ prohibits conversion from `(int)' |
335 to `(...)' | |
6670 | 336 @end example |
3294 | 337 |
338 @noindent | |
339 while compiling @file{sighandlers.cc}, you may need to edit some files | |
340 in the @code{gcc} include subdirectory to add proper prototypes for functions | |
341 there. For example, Ultrix 4.2 needs proper declarations for the | |
342 @code{signal} function and the @code{SIG_IGN} macro in the file | |
343 @file{signal.h}. | |
344 | |
345 On some systems the @code{SIG_IGN} macro is defined to be something like | |
346 this: | |
347 | |
348 @example | |
349 #define SIG_IGN (void (*)())1 | |
350 @end example | |
351 | |
352 @noindent | |
353 when it should really be something like: | |
354 | |
355 @example | |
356 #define SIG_IGN (void (*)(int))1 | |
357 @end example | |
358 | |
359 @noindent | |
360 to match the prototype declaration for the @code{signal} function. This | |
361 change should also be made for the @code{SIG_DFL} and @code{SIG_ERR} | |
362 symbols. It may be necessary to change the definitions in | |
363 @file{sys/signal.h} as well. | |
364 | |
365 The @code{gcc} @code{fixincludes} and @code{fixproto} scripts should | |
366 probably fix these problems when @code{gcc} installs its modified set of | |
367 header files, but I don't think that's been done yet. | |
368 | |
369 @strong{You should not change the files in @file{/usr/include}}. You | |
370 can find the @code{gcc} include directory tree by running the command | |
371 | |
372 @example | |
373 gcc -print-libgcc-file-name | |
374 @end example | |
375 | |
376 @noindent | |
377 The directory of @code{gcc} include files normally begins in the same directory | |
378 that contains the file @file{libgcc.a}. | |
379 | |
380 @item | |
381 Some of the Fortran subroutines may fail to compile with older versions | |
382 of the Sun Fortran compiler. If you get errors like | |
383 | |
6670 | 384 @example |
3294 | 385 zgemm.f: |
386 zgemm: | |
387 warning: unexpected parent of complex expression subtree | |
388 zgemm.f, line 245: warning: unexpected parent of complex | |
389 expression subtree | |
390 warning: unexpected parent of complex expression subtree | |
391 zgemm.f, line 304: warning: unexpected parent of complex | |
392 expression subtree | |
393 warning: unexpected parent of complex expression subtree | |
394 zgemm.f, line 327: warning: unexpected parent of complex | |
395 expression subtree | |
396 pcc_binval: missing IR_CONV in complex op | |
397 make[2]: *** [zgemm.o] Error 1 | |
6670 | 398 @end example |
3294 | 399 |
400 @noindent | |
401 when compiling the Fortran subroutines in the @file{libcruft} | |
402 subdirectory, you should either upgrade your compiler or try compiling | |
403 with optimization turned off. | |
404 | |
405 @item | |
406 On NeXT systems, if you get errors like this: | |
407 | |
408 @example | |
7081 | 409 /usr/tmp/cc007458.s:unknown:Undefined local |
410 symbol LBB7656 | |
411 /usr/tmp/cc007458.s:unknown:Undefined local | |
412 symbol LBE7656 | |
3294 | 413 @end example |
414 | |
415 @noindent | |
416 when compiling @file{Array.cc} and @file{Matrix.cc}, try recompiling | |
417 these files without @code{-g}. | |
418 | |
419 @item | |
420 Some people have reported that calls to shell_cmd and the pager do not | |
421 work on SunOS systems. This is apparently due to having | |
422 @code{G_HAVE_SYS_WAIT} defined to be 0 instead of 1 when compiling | |
423 @code{libg++}. | |
424 | |
425 @item | |
426 On NeXT systems, linking to @file{libsys_s.a} may fail to resolve the | |
427 following functions | |
428 | |
429 @example | |
430 _tcgetattr | |
431 _tcsetattr | |
432 _tcflow | |
433 @end example | |
434 | |
435 @noindent | |
436 which are part of @file{libposix.a}. Unfortunately, linking Octave with | |
437 @code{-posix} results in the following undefined symbols. | |
438 | |
439 @example | |
440 .destructors_used | |
441 .constructors_used | |
442 _objc_msgSend | |
443 _NXGetDefaultValue | |
444 _NXRegisterDefaults | |
445 .objc_class_name_NXStringTable | |
446 .objc_class_name_NXBundle | |
447 @end example | |
448 | |
449 One kluge around this problem is to extract @file{termios.o} from | |
450 @file{libposix.a}, put it in Octave's @file{src} directory, and add it | |
451 to the list of files to link together in the makefile. Suggestions for | |
452 better ways to solve this problem are welcome! | |
453 | |
454 @item | |
455 If Octave crashes immediately with a floating point exception, it is | |
456 likely that it is failing to initialize the IEEE floating point values | |
457 for infinity and NaN. | |
458 | |
459 If your system actually does support IEEE arithmetic, you should be able | |
460 to fix this problem by modifying the function @code{octave_ieee_init} in | |
461 the file @file{lo-ieee.cc} to correctly initialize Octave's internal | |
462 infinity and NaN variables. | |
463 | |
464 If your system does not support IEEE arithmetic but Octave's configure | |
465 script incorrectly determined that it does, you can work around the | |
466 problem by editing the file @file{config.h} to not define | |
467 @code{HAVE_ISINF}, @code{HAVE_FINITE}, and @code{HAVE_ISNAN}. | |
468 | |
469 In any case, please report this as a bug since it might be possible to | |
470 modify Octave's configuration script to automatically determine the | |
471 proper thing to do. | |
472 | |
7144 | 473 @item |
474 If Octave is unable to find a header file because it is installed in a | |
475 location that is not normally searched by the compiler, you can add the | |
476 directory to the include search path by specifying (for example) | |
477 @code{CPPFLAGS=-I/some/nonstandard/directory} as an argument to | |
478 @code{configure}. Other variables that can be specified this way are | |
479 @code{CFLAGS}, @code{CXXFLAGS}, @code{FFLAGS}, and @code{LDFLAGS}. | |
480 Passing them as options to the configure script also records them in the | |
481 @file{config.status} file. By default, @code{CPPFLAGS} and | |
482 @code{LDFLAGS} are empty, @code{CFLAGS} and @code{CXXFLAGS} are set to | |
483 @code{"-g -O"} and @code{FFLAGS} is set to @code{"-O"}. | |
484 | |
3294 | 485 @end itemize |