Compiling Octave 3.8

Instead of this, use either: * easy 10 second Octave install * compile GNU Octave 4

This procedure was not possible to easily complete on Ubuntu 18.04. For those needing to maintain Octave *.m code compatibility with CentOS 7, which has only Octave 3.8 in EPEL, consider using Octave 3.8 on WINE. A partial goal was minimizing need for prereqs, which increase chance of build not working due to old source code vs. current libraries.

This procedure no longer works on current Ubuntu versions, but is retained for reference and to let others know it doesn’t work anymore.

  1. Prerequisites
    apt install g++ gfortran automake libreadline-dev libncurses5-dev gperf libblas-dev liblapack-dev libfftw3-dev less libpcre3-dev flex libglpk-dev libsuitesparse-dev gawk ghostscript libcurl4-gnutls-dev libqhull-dev libgl2ps-dev libftgl-dev libfontconfig1-dev libqrupdate-dev libarpack2-dev default-jdk dpkg-dev gnuplot-x11 libbison-dev libxft-dev llvm-dev
  1. Download Octave 3.8 source and extract
   tar -xf octave-*.tar.bz2
  1. Modern GCC/G++/Gfortran doesn’t compile old Octave 3.8. We recommend GCC 5, which can be enabled through update-alternatives:
   update-alternatives --config g++
   update-alternatives --config gcc
   update-alternatives --config gfortran
  1. edit libinterp/corefcn/ to remove #include "graphics.h"
  2. Configure Octave
   ./configure --prefix=$HOME/.local/octave38 --disable-docs --without-opengl --without-cholmod --without-amd

Cholmod is omitted because current library version is incompatible with Octave 3.8.

The resulting console output. 6. Compile Octave: takes about 30-60 minutes

   make -j -l 4 CFLAGS=-O CXXFLAGS=-O LDFLAGS=

   make check


    make install

    ln -s $HOME/.local/octave38/bin/octave $HOME/.local/bin/octave3.8

Octave 3.8 GUI (if compiled) is used by:

octave3.8 --force-gui


LLVM version

Per Mike Miller, Octave 3.8 requires LLVM 3.2 or 3.3.

surf() FLTK plotting bug

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