Wednesday, December 12, 2012

Compile octave



Latest version of octave needs texinfo and newer version of gcc.

1.  Install gcc 4.7.1. gcc needs additional 3 components which have to be downloaded separatedly:

unzip and copy them to gmp mpfr and mpc or gcc-4.7.1 source dir

mkdir ~/gcc-4.7.1
cd ~/gcc-4.7.1
~/downloads/gcc-4.7.1/configure  --enable-languages=all
make
sudo make install

2. Install texinfo
./configure
make
sudo make install

3. Install blas and lapack. On my environment, this is done by:

yum install blas
yum install lapack

And for me, I have to manually create a sym link libblas.so and liblapack.so as octave configuration cannot find the versioned so.

sudo ln -s libblas.so.3.0.3 /usr/lib64/libblas.so
sudo ln -s liblapack.so.3.0.3 /usr/lib64/liblapack.so

4. Install gnuplot-4.4

5. Install octave
cd octave-3.6.2
LD_RUN_PATH=/usr/local/lib64 LDFLAGS=-L/usr/local/lib64 ./configure --without-curl
LD_RUN_PATH=/usr/local/lib64 make -j 8

You may need to use different directories other than /usr/local/lib64 depending on where your blas/lapack/gfortran  libraries are located. If error happens, look at config.log to get more detail.