Compiling Octave 3.8 for Ubuntu 12.04

Instead of this, use either:


  1. Prerequisites
     apt install gfortran debhelper automake dh-autoreconf texinfo texlive-latex-base texlive-generic-recommended epstool transfig pstoedit libreadline-dev libncurses5-dev gperf libhdf5-dev 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
    

    For Ubuntu 12.04, get LLVM 3.2 Binaries and extract. These will be manually linked in the configure step below.

  2. Download Octave source and extract
    tar -xf octave-*.tar.bz2
    
  3. Configure Octave
    ./configure --enable-jit
    

    You may get the error:

    configure: WARNING: JAVA_HOME environment variable not initialized. Auto-detection will proceed but is unreliable.

    For me, Java was found automatically despite this error.

    Ubuntu 12.04 only

    get the LLVM 3.2 binaries and add to the ./configure command:

    --prefix=/opt/octave3.8 LLVM_CONFIG=~/Downloads/clang+llvm-3.2-x86_64-linux-ubuntu-12.04/bin/llvm-confige
    
  4. Compile Octave-takes about 30 minutes to compile on a Sandy Bridge i7-2600 CPU.
    make
    
    make check
    

    PASS 11503 FAIL 0 XFAIL 7

     make install
    
     ln -s /opt/octave3.8/bin/octave $HOME/.local/bin/octave3.8
    

Octave 3.8 with GUI

octave3.8 --force-gui

Edit ~/.bash_aliases to always use GUI with Octave 3.8, add the line

alias octave38="octave3.8 --force-gui"

Notes

http://octave.1599824.n4.nabble.com/Please-release-RC1-to-octave-unstable-PPA-td4659924.html

LLVM version

Per mtmiller, Octave 3.8 requires LLVM 3.2 or 3.3 to compile.

Ubuntu 12.04 defaults to LLVM 2.9, which is now too old for Octave 3.8. I would suggest considering the Pre-Built Binaries

surf() FLTK plotting bug

When you need surf(), workaround by falling back to gnuplot in Octave:

graphics_toolkit('gnuplot')  

Leave a Comment