[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Here is the procedure for installing Octave from scratch on a Unix system. For instructions on how to install the binary distributions of Octave, see Binary Distributions.
Here is a summary of the configure options that are most frequently used when building Octave:
--prefix=prefix
Install Octave in subdirectories below prefix. The default value of prefix is ‘/usr/local’.
--srcdir=dir
Look for Octave sources in the directory dir.
--with-f2c
Use f2c even if Fortran compiler is available.
--enable-dld
Use DLD to make Octave capable of dynamically linking externally compiled functions. This only works on systems that have a working port of DLD.
--enable-lite-kernel
Compile smaller kernel. This currently requires DLD so that Octave can load functions at run time that are not loaded at compile time.
--help
Print a summary of the options recognized by the configure script.
See the file INSTALL for more information about the command line options used by configure. That file also contains instructions for compiling in a directory other than where the source is located.
You will need a recent version of GNU make. Modifying Octave’s Makefiles to work with other make programs is probably not worth your time. We recommend you get and compile GNU make instead.
For plotting, you will need to have gnuplot installed on your system. Gnuplot is a command-driven interactive function plotting program. Gnuplot is copyrighted, but freely distributable. The ‘gnu’ in gnuplot is a coincidence—it is not related to the GNU project or the FSF in any but the most peripheral sense.
For version {No value for ‘VERSION’}, you must have the GNU C++ compiler (gcc) version 2.6.3 or later to compile Octave. You will also need version 2.6.1 of the GNU C++ class library (libg++). If you plan to modify the parser you will also need GNU bison and fles. If you modify the documentation, you will need GNU Texinfo, along with the patch for the makeinfo program that is distributed with Octave.
GNU make, gcc, and libg++, gnuplot, bison, flex, and Texinfo are all available from many anonymous ftp archives, including ftp.che.utexas.edu, ftp.uu.net, prep.ai.mit.edu, and wuarchive.wustl.edu.
If you don’t have a Fortran compiler, or if your Fortran compiler doesn’t work like the traditional Unix f77, you will need to have the Fortran to C translator f2c. You can get f2c from any number of anonymous ftp archives. The most recent version of f2c is always available from research.att.com.
On an otherwise idle SPARCstation II, it will take somewhere between 60 and 90 minutes to compile everything, depending on whether you are compiling the Fortran libraries with f2c or using the Fortran compiler directly. You will need about 50 megabytes of disk storage to work with (considerably less if you don’t compile with debugging symbols). To do that, use the command
make CFLAGS=-O CXXFLAGS=-O LDFLAGS=
instead of just ‘make’.
This will install a copy of octave, its libraries, and its documentation in the destination directory. As distributed, Octave is installed in the following directories:
Octave and other binaries that people will want to run directly.
Libraries like libcruft.a and liboctave.a.
Include files distributed with Octave.
Unix-style man pages describing Octave.
Info files describing Octave.
Function files distributed with Octave. This includes the Octave version, so that multiple versions of Octave may be installed at the same time.
Executables to be run by Octave rather than the user.
Object files that will be dynamically loaded.
Image files that are distributed with Octave.
where prefix defaults to ‘/usr/local’, version stands for the current version number of the interpreter, and host_type is the type of computer on which Octave is installed (for example, ‘i486-unknown-gnu’).
A.1 Installation Problems | ||
A.2 Binary Distributions |
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This section contains a list of problems (and some apparent problems that don’t really mean anything is wrong) that may show up during installation of Octave.
make NO_IMPLICIT_TEMPLATES=
signal()
and the SIG_IGN
macro in the
file ‘signal.h’.
On some systems the SIG_IGN
macro is defined to be something like
this:
#define SIG_IGN (void (*)())1
when it should really be something like:
#define SIG_IGN (void (*)(int))1
to match the prototype declaration for signal()
.
The gcc fixincludes/fixproto script should probably fix this when gcc installs its modified set of header files, but I don’t think that’s been done yet.
You can get more information about NPSOL and QPSOL from
Stanford University
Office of Technology Licensing
857 Serra Street
Stanford CA 94305-6225
Tel: (415) 723-0651
Fax: (415) 725-7295
Octave may soon support FSQP, an NLP solver from Andre Tits (andre@src.umd.edu) of the University of Maryland. FSQP is available free of charge to academic sites, but can not be redistributed to third parties.
zgemm.f: zgemm: warning: unexpected parent of complex expression subtree zgemm.f, line 245: warning: unexpected parent of complex expression subtree warning: unexpected parent of complex expression subtree zgemm.f, line 304: warning: unexpected parent of complex expression subtree warning: unexpected parent of complex expression subtree zgemm.f, line 327: warning: unexpected parent of complex expression subtree pcc_binval: missing IR_CONV in complex op make[2]: *** [zgemm.o] Error 1
when compiling the Fortran subroutines in the ‘libcruft’ subdirectory, you should either upgrade your compiler or try compiling with optimization turned off.
/usr/tmp/cc007458.s:unknown:Undefined local symbol LBB7656 /usr/tmp/cc007458.s:unknown:Undefined local symbol LBE7656
when compiling ‘Array.cc’ and ‘Matrix.cc’, try recompiling
these files without -g
.
G_HAVE_SYS_WAIT
defined to be 0 instead of 1 when compiling
libg++.
_tcgetattr _tcsetattr _tcflow
which are part of ‘libposix.a’. Unfortunately, linking Octave with
-posix
results in the following undefined symbols.
.destructors_used .constructors_used _objc_msgSend _NXGetDefaultValue _NXRegisterDefaults .objc_class_name_NXStringTable .objc_class_name_NXBundle
One kludge around this problem is to extract ‘termios.o’ from ‘libposix.a’, put it in Octave’s ‘src’ directory, and add it to the list of files to link together in the Makefile. Suggestions for better ways to solve this problem are welcome!
as: /tmp/cc005254.s:4057: Local symbol LBB103 never defined. as: /tmp/cc005254.s:4057: Local symbol LBE103 never defined.
A possible workaround for this is to compile without -g
.
If your system actually does support IEEE arithmetic, you should be able
to fix this problem by modifying the function octave_ieee_init
in
the file ‘sysdep.cc’ to correctly initialize Octave’s internal
infinity and NaN variables.
If your system does not support IEEE arithmetic but Octave’s configure
script incorrectly determined that it does, you can work around the
problem by editing the file ‘config.h’ to not define
HAVE_ISINF
, HAVE_FINITE
, and HAVE_ISNAN
.
In any case, please report this as a bug since it might be possible to modify Octave’s configuration script to automatically determine the proper thing to do.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This section contains instructions for creating and installing a binary distribution.
A.2.1 Installing Octave from a Binary Distribution | ||
A.2.2 Creating a Binary Distribution |
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
sh ./doinstall.sh
in the top level directory of the distribution.
Binary distributions are normally compiled assuming that Octave will be installed in the following subdirectories of ‘/usr/local’.
Octave and other binaries that people will want to run directly.
Unix-style man pages describing Octave.
Info files describing Octave.
Function files distributed with Octave. This includes the Octave version, so that multiple versions of Octave may be installed at the same time.
Executables to be run by Octave rather than the user.
Image files that are distributed with Octave.
where version stands for the current version number of the interpreter, and host_type is the type of computer on which Octave is installed (for example, ‘i486-unknown-gnu’).
If these directories don’t exist, the script ‘doinstall.sh’ will create them for you.
If this is possible for you to install Octave in ‘/usr/local’, or if you would prefer to install it in a different directory, you can specify the name of the top level directory as an argument to the doinstall.sh script. For example:
sh ./doinstall.sh /some/other/directory
Octave will then be installed in subdirectories of the directory ‘/some/other/directory’
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Here is how to build a binary distribution for others.
[Top] | [Contents] | [Index] | [ ? ] |
This document was generated on January 15, 2023 using texi2html 5.0.
The buttons in the navigation panels have the following meaning:
Button | Name | Go to | From 1.2.3 go to |
---|---|---|---|
[ << ] | FastBack | Beginning of this chapter or previous chapter | 1 |
[ < ] | Back | Previous section in reading order | 1.2.2 |
[ Up ] | Up | Up section | 1.2 |
[ > ] | Forward | Next section in reading order | 1.2.4 |
[ >> ] | FastForward | Next chapter | 2 |
[Top] | Top | Cover (top) of document | |
[Contents] | Contents | Table of contents | |
[Index] | Index | Index | |
[ ? ] | About | About (help) |
where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:
This document was generated on January 15, 2023 using texi2html 5.0.