Help installing Octave (linux-generic)

Last modified: Mon Jan 7 10:54:39 EST 2013


Overview

These instructions were last validated on 2013-01-05 with gcc 4.7.2 for the versions of software indicated below on 32- and 64-bit Slackware Linux 14.0.

You will need the Fortran compiler that is an optional install with GCC.

Lapack 3.4.2 (released 2012-09-25)

Source:  http://www.netlib.org/lapack/

Download the lapack-3.4.2.tgz file to /tmp but don't unpack.  It's handled by the Atlas build process now.

Atlas 3.10.0 (released 2012-07-10)

Source:  http://math-atlas.sourceforge.net/

The build process for Atlas runs benchmarks to determine the best way to compile something for your hardware.  For more consistent results, disable hyperthreading and all BIOS features and kernel drivers that dynamically change the CPU frequency before starting the build.  The installation guide at ATLAS/doc/atlas_install.pdf provides help on how to do this.  For even more consistent results, do the build in single-user mode.

The installation guide recommends the use of –DPentiumCPS=[CPU frequency in MHz] on x86 hardware.  Alternatives can be found in ATLAS/tune/sysinfo/ATL_walltime.c.

Configure options that are not self-explanatory:

The special configuration for Octave is to add the –fPIC compiler switch, but not to build or install shared libs.  The shared libs don't include "full LAPACK," which breaks the Octave build (at least, it did the last time I tried it, which was Atlas 3.8.4 and Octave 3.4.3).

32-bit, 1-core, 3.2 GHz CPU

mkdir foo
cd foo
../ATLAS/configure -b 32 -t 0 -D c -DPentiumCPS=3200 -Fa alg -fPIC \
  --prefix=/usr/local/atlas-3.10.0 \
  --with-netlib-lapack-tarfile=/tmp/lapack-3.4.2.tgz
make                    # with plenty of ignored errors
make check              # optional, all pass
make lapack_test_al_ab  # optional, lots of failures
su
make install            # more ignored errors

You get:

bash-4.2$ l /usr/local/atlas-3.10.0/lib
total 17116
drwxr-xr-x 2 root root    4096 Jan  5 16:55 .
drwxr-xr-x 4 root root    4096 Jan  5 16:55 ..
-rw-r--r-- 1 root root 7229094 Jan  5 16:55 libatlas.a
-rw-r--r-- 1 root root  423948 Jan  5 16:55 libcblas.a
-rw-r--r-- 1 root root  533608 Jan  5 16:55 libf77blas.a
-rw-r--r-- 1 root root 9325478 Jan  5 16:55 liblapack.a

64-bit, 8-core, 3.0 GHz CPU

Don't use make –j.  The build process uses it automatically where applicable.

mkdir foo
cd foo
../ATLAS/configure -b 64 -t 8 -D c -DPentiumCPS=3000 -Fa alg -fPIC \
  --prefix=/usr/local/atlas-3.10.0 \
  --with-netlib-lapack-tarfile=/tmp/lapack-3.4.2.tgz
make                    # with plenty of ignored errors
make check              # optional, all pass
make ptcheck            # optional, all pass
make lapack_test_al_ab  # optional, lots of failures
su
make install            # more ignored errors

You get:

bash-4.2$ l /usr/local/atlas-3.10.0/lib
total 23880
drwxr-xr-x 2 root root     4096 Jan  7 09:52 .
drwxr-xr-x 4 root root     4096 Jan  7 09:52 ..
-rw-r--r-- 1 root root 11759570 Jan  7 09:52 libatlas.a
-rw-r--r-- 1 root root   491972 Jan  7 09:52 libcblas.a
-rw-r--r-- 1 root root   581616 Jan  7 09:52 libf77blas.a
-rw-r--r-- 1 root root 10523222 Jan  7 09:52 liblapack.a
-rw-r--r-- 1 root root   492538 Jan  7 09:52 libptcblas.a
-rw-r--r-- 1 root root   582012 Jan  7 09:52 libptf77blas.a

Fltk 1.3.2 (released 2012-12-09)

Source:  http://www.fltk.org/

Fltk is for optional native graphics in Octave.  It will build against Nvidia's GL libs if they are present.

./configure --prefix=/usr/local/fltk-1.3.2 CFLAGS="-fPIC" CXXFLAGS="-fPIC"
make  # -j 8 if 8 cores
su
make install

For ~/.bash_profile:

export PATH=/usr/local/fltk-1.3.2/bin:${PATH}
export MANPATH=/usr/local/fltk-1.3.2/share/man:${MANPATH}

Octave 3.6.3 (released 2012-09-04)

Source:  http://www.octave.org/

Any errors output by configure can be highly misleading.  You must read the log to find out what actually happened.

Configure finds the serial Atlas libraries automatically, but not the threaded ones.  Supply the ––with-blas option shown below only if the threaded libraries were built.

./configure --prefix=/usr/local/octave-3.6.3                    \
  --with-fltk-prefix=/usr/local/fltk-1.3.2                      \
  --with-blas="-lptcblas -lptf77blas -latlas" `: IF APPLICABLE` \
  CPPFLAGS="-I/usr/local/atlas-3.10.0/include"                  \
  LDFLAGS="-L/usr/local/atlas-3.10.0/lib"
make          # -j 8 if 8 cores
make check    # optional, all pass
su
make install  # builds more stuff??

Many optional dependencies were skipped, with the following consequences:

configure: WARNING: UMFPACK not found.  This will result in some lack of functionality for sparse matrices.
configure: WARNING: qrupdate not found.  The QR & Cholesky updating functions will be slow.
configure: WARNING: AMD library not found.  This will result in some lack of functionality for sparse matrices.
configure: WARNING: COLAMD library not found.  This will result in some lack of functionality for sparse matrices.
configure: WARNING: CCOLAMD library not found.  This will result in some lack of functionality for sparse matrices.
configure: WARNING: CHOLMOD library not found.  This will result in some lack of functionality for sparse matrices.
configure: WARNING: CXSparse library not found.  This will result in some lack of functionality for sparse matrices.
configure: WARNING: GLPK library not found.  The glpk function for solving linear programs will be disabled.
configure: WARNING: GraphicsMagick++ library not found.  The imread function for reading image files will not be fully functional.
configure: WARNING: HDF5 library not found.  Octave will not be able to save or load HDF5 data files.
configure: WARNING: Qhull library not found -- this will result in loss of functionality of some geometry functions.
configure: WARNING: I didn't find ghostscript, so reconstructing figures for the manual will fail, and saving graphics in some output formats will fail when using Octave

For ~/.bash_profile:

export PATH=/usr/local/octave-3.6.3/bin:${PATH}
export MANPATH=/usr/local/octave-3.6.3/share/man:${MANPATH}
export INFOPATH=/usr/local/octave-3.6.3/share/info:${INFOPATH}

Extra packages can be obtained from http://octave.sourceforge.net/ and installed by doing pkg install whatever.tar.gz from the Octave prompt (as root).


KB
Home