Here is the procedure for installing Octave from scratch on a Unix system.
Here is a summary of the configure options that are most frequently used when building Octave:
--prefix=
prefix--srcdir=
dir--enable-bounds-check
--enable-64
If you use --enable-64
, you must ensure that your Fortran
compiler generates code with 8 byte signed INTEGER
values, and
that your blas and lapack libraries are compiled to use 8 byte
signed integers for array dimensions and indexing.
--enable-shared
You may also want to build a shared version of libstdc++
, if your
system doesn't already have one.
--enable-dl
dlopen
and friends to make Octave capable of dynamically
linking externally compiled functions (this is the default if
--enable-shared
is specified). This option only works on systems
that actually have these functions. If you plan on using this feature, you
should probably also use --enable-shared
to reduce the size of
your .oct files.
--without-blas
--with-blas=lib
to specify a particular blas library
that configure doesn't check for automatically.
--without-ccolamd
--without-colamd
--without-curl
urlread
and urlwrite
functions.
--without-cxsparse
--without-umfpack
--without-fftw
--without-glpk
--without-hdf5
--without-zlib
--without-lapack
--with-blas=lib
to specify a particular blas library
that configure doesn't check for automatically.
--without-framework-carbon
--with-framework-carbon
). This is a platform specific configure
option for Mac systems.
--without-framework-opengl
--with-framework-opengl
). This is a
platform specific configure option for Mac systems.
--help
See the file INSTALL for more general 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.
To compile Octave, you will need a recent version of GNU Make. You will
also need a recent version of g++
or other ANSI C++ compiler. You
will also need a Fortran 77 compiler or f2c
. If you use
f2c
, you will need a script like fort77
that works like a
normal Fortran compiler by combining f2c
with your C compiler in
a single script.
If you plan to modify the parser you will also need GNU bison
and
flex
. 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 libstdc++
, gnuplot
,
bison
, flex
, and Texinfo are all available from many
anonymous ftp archives. The primary site is ftp.gnu.org, but it
is often very busy. A list of sites that mirror the software on
ftp.gnu.org is available by anonymous ftp from
ftp://ftp.gnu.org/pub/gnu/GNUinfo/FTP.
You will need about 1 gigabyte of disk storage to work with when building Octave from source (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. In the table below, prefix defaults to /usr/local, version stands for the current version number of the interpreter, and arch is the type of computer on which Octave is installed (for example, i586-unknown-gnu).