Download source: wget -P ~/Downloads
http://ftp.gnu.org/pub/gnu/octave/octave-3.8.1.tar.bz2
Extract to directory:tar -C ~/Downloads -xvf
~/Downloads/octave-3.8.1.tar.bz2
Prerequisites (Ubuntu 13.10):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 LLVM
3.2 Binaries and extract somewhere — you’ll manually link to these in the
configure step below.
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 linealias
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 Pre-Built Binaries
Note: Ubuntu 14.04 has Octave 3.8 by default – yay! If this all is too hard, consider just using the Octave 3.6 PPA or upgrading to Ubuntu 14.04.
Note: As Ian notes in the comments, surf()
seems to be broken
with the otherwise fast and great FLTK plotting. As Ian notes, when you need
surf(), circumvent this problem by falling back to gnuplot by typing in
Octave: graphics_toolkit(‘gnuplot‘)
Reference (Jordi G. H.):
http://octave.1599824.n4.nabble.com/Please-release-RC1-to-octave-unstable-PPA-td4659924.html
转载自: http://blogs.bu.edu/mhirsch/2013/12/compiling-octave-3-8/