Note: The octave stable PPA finally (Apr 20 2014) has Octave 3.8.1.
https://launchpad.net/~octave/+archive/stable
I would recommend the normal user on Ubuntu 12.04 to consider using the PPA above, it will be much easier than the manual process below.
——————————————————————————————————————–
Download source:
wget -P ~/Downloads http://ftp.gnu.org/pub/gnu/octave/octave-3.8.2.tar.bz2
Extract to directory:
tar -C ~/Downloads -xvf ~/Downloads/octave-3.8*.tar.bz2
Prerequisites
sudo apt-get install gfortran debhelper automake dh-autoreconf texinfo texlive-latex-base texlive-generic-recommended epstool transfig pstoedit libreadline-dev libncurses5-dev gperf libhdf5-serial-dev libblas-dev liblapack-dev libfftw3-dev texi2html less libpcre3-dev flex libglpk-dev libsuitesparse-dev gawk ghostscript libcurl4-gnutls-dev libqhull-dev desktop-file-utils libfltk1.3-dev libgl2ps-dev libgraphicsmagick++1-dev libftgl-dev libfontconfig1-dev libqrupdate-dev libarpack2-dev dh-exec libqt4-dev libqscintilla2-dev default-jdk dpkg-dev gnuplot-x11 libbison-dev libxft-dev llvm-dev
Prerequisites (Ubuntu 12.04.4):
sudo apt-get install gfortran debhelper automake dh-autoreconf texinfo texlive-latex-base texlive-generic-recommended epstool transfig pstoedit libreadline-dev libncurses5-dev gperf libhdf5-serial-dev libblas-dev liblapack-dev libfftw3-dev texi2html less libpcre3-dev flex libglpk-dev libsuitesparse-dev gawk ghostscript libcurl4-gnutls-dev libqhull-dev desktop-file-utils libfltk1.3-dev libgl2ps-dev libgraphicsmagick++1-dev libftgl-dev libfontconfig1-dev libqrupdate-dev libarpack2-dev dh-exec libqt4-dev libqscintilla2-dev default-jdk dpkg-dev gnuplot-x11 libbison-dev libxft-dev
Note: for Ubuntu 12.04, you will have to get
E.g.
wget -P ~/Downloads http://llvm.org/releases/3.2/clang+llvm-3.2-x86_64-linux-ubuntu-12.04.tar.gz
tar -C ~/Downloads xvf ~/Downloads/clang+llvm-3.2-x86_64-linux-ubuntu-12.04.tar.gz
——–
cd ~/Downloads/octave-3.8.1
(Ubuntu 13.10)
./configure --enable-jit --prefix=/opt/octave3.8
(Ubuntu 12.04.4)
./configure --enable-jit --prefix=/opt/octave3.8 LLVM_CONFIG=~/Downloads/clang+llvm-3.2-x86_64-linux-ubuntu-12.04/bin/llvm-config
You may get the error:
configure: WARNING: JAVA_HOME environment variable not initialized. Auto-detection will proceed but is unreliable.
On my Ubuntu 13.10 PCs, Java was found automatically despite this error.
make
This takes about 30 minutes to compile on a Sandy Bridge i7-2600 CPU.
make check
I get:
PASS 11503
FAIL 0
XFAIL 7
sudo make install
sudo ln -s /opt/octave3.8/bin/octave /usr/local/bin/octave3.8
Now to run Octave 3.8 with GUI, at Terminal type:
octave3.8 --force-gui
You can of course make a bash alias to always add that –force-gui for you.
nano ~/.bash_aliases
and add the line
alias octave38="octave3.8 --force-gui"
Notes re: LLVM version:
Ubuntu 13.10 llvm-dev is currently LLVM 3.2. As of this comment from mtmiller on January 2014, Octave 3.8 requires LLVM 3.2 or 3.3 to compile:
https://savannah.gnu.org/bugs/?41061#comment9
Ubuntu 12.04 defaults to LLVM 2.9, which is now too old for Octave 3.8. I would suggest considering the
Note: Ubuntu 14.04 has Octave 3.8 by default – yay!
Note: As Ian notes in the comments, surf()
graphics_toolkit('gnuplot')
Reference (Jordi G. H.):
http://octave.1599824.n4.nabble.com/Please-release-RC1-to-octave-unstable-PPA-td4659924.html