User Tools

Site Tools


guide:compiling_octave_3_2_4

This is an old revision of the document!


Compiling Octave 3.2.4 from Source (Under Construction)

This guide is written as to aid CHPC users struggling to compile the Octave version 3.2.4 from source on the Sun Tsessbe Cluster. Its recommended that you make you use of temporary or scratch directory to do all the compilation in (i.e. ~/scratch or /tmp/$USER), as to save disk space in your home directory.

Also note that for this guide, all binary and libraries are installed home directory, i.e prefix=$HOME. Add the following lines to the end of your .bashrc file

export PATH=/opt/gridware/gcc-4.3/bin:$PATH
export LD_LIBRARY_PATH=/opt/gridware/gcc-4.3/lib64/:/opt/gridware/gcc-4.3/lib/
export F77=gfortran

Logout and log in again,

$ gcc --version
  gcc (GCC) 4.3.4

Prerequisites

FFTW

“FFTW is a C subroutine library for computing the discrete Fourier transform (DFT)” FFTW Homepage

$ cd ~/scratch
$ wget http://www.fftw.org/fftw-3.3.tar.gz
$ tar -xf fftw-3.3.tar.gz
$ cd fftw-3.3

Make double precision libraries first

$ mkdir BUILD_dp
$ cd BUILD_dp
$ ../configure --prefix=$HOME  --with-pic --with-gnu-ld
$ make
$ make check #test it
$ make install

Make single precision libraries first

$ cd ..
$ mkdir BUILD_sp
$ cd BUILD_sp
$ ../configure --prefix=$HOME  --with-pic --with-gnu-ld --enable-single
$ make
$ make check #test it
$ make install

Download Source

Since the ftp is blocked on the Tsessbe login node, make use of an http mirror to download octave.

$ cd ~/scratch 
$ wget http://www.mirrorservice.org/sites/ftp.gnu.org/gnu/octave/octave-3.2.4.tar.bz2
$ tar -xf octave-3.2.4.tar.bz2

Configuration

 $ cd ~/scratch/octave-3.2.4
 $ mkdir BUILD
 $ cd BUILD
 $ export LDFLAGS="-L$HOME/lib"
 $ export CXXFLAGS="-L$HOME/lib"
 $ ../configure --prefix=$HOME

Options explained

  • — prefix=$HOME, configure for installation into home directory
  • —without-fftw3 –without-fftw3f, Use the included fftpack library for computing Fast Fourier Transforms instead of the fftw3 library. If this option is not chosen the following build was encounter :
/usr/bin/ld: /usr/local/lib/libfftw3f.a(apiplan.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libfftw3f.a: could not read symbols: Bad value
  • –without-umfpack (is the UMFPACK library available?)

After configuration is complete, alot of warning about missing librarys are given

Build

 $ make
 

If errors occur such as

  • g++: Internal error: Killed (program cc1plus)

wait a while and then make again, as the process was killed by the usage limiter which runs on the login node. If nessary try the approach shown in Compiling GCC from Source.

/app/dokuwiki/data/attic/guide/compiling_octave_3_2_4.1323250612.txt.gz · Last modified: 2021/12/09 16:42 (external edit)