Compiling Octave 3.8 for Ubuntu 12.04 – 13.10

For those looking for 64-bit Octave, which is not currently available in the PPA (As of Jan 2015), please examine:

http://calaba.tumblr.com/post/107087607479/octave-64

————————————————————————–

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  (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 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 Pre-Built Binaries

Note: Ubuntu 14.04 has Octave 3.8 by default – yay!

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

36 thoughts on “Compiling Octave 3.8 for Ubuntu 12.04 – 13.10”

  1. Great instructions. It’s a rare thing to follow web instructions and have something work the first time. I really appreciate your efforts. Octave is really a great tool.

  2. I used your ppa directions for octave 3.6.4. That was great thanks.
    Do you suppose you could set up a similar ppa for octave 3.8.0,
    if you don’t mind asking?
    That would be AWESOME! :-)

    Thanks in advance

  3. Thank you a tons!! That went superb without a hitch! Very nice of you to help folks like me who rely on Ubuntu software center to do everything for us.

  4. Thanks, it was so easy to compile!
    I just had to wait a bit on my old laptop.

    Have one question though, I am not sure if you have any idea. When plotting I can use tex such as \pi or subscripts and non-ascii such as åäö, which show up correctly, but when printing to pdf I get either just pi or gibberish. Any idea if it is related to octave, fltk or ghostscript?

    1. Hello Hans,

      The TeX parser for plotting with FLTK toolkit is new for Octave 3.8.0, however, it is known that TeX is only shown for screen display, and TeX is NOT printable with Octave 3.8.0.

      Reference: http://www.gnu.org/software/octave/NEWS-3.8.html

      You can check if you’re using FLTK or Gnuplot for plotting in Octave 3.8 by typing in Octave:

      graphics_toolkit

    1. Hello Nick,
      How do you prefer to install the packages? To my knowledge, they will install under the $HOME directory if running non-sudo.

  5. Thanks a trillion, Mike.
    A few tweaks —
    1. Added bison to the list of installs (sudo apt-get …);
    2. Added to .bashrc:
    export JAVA_HOME=$(readlink -f /usr/bin/javac | sed “s:/bin/javac::”);
    Ran source .bashrc AFTER the ‘sudo apt-get install … ‘
    3. Instead of a script, added the following line to .bash_aliases:
    alias octave=”octave3.8 –force-gui & ”
    Voila! Type ‘octave’ in the command line and you get the GUI.

  6. Thanks for posting the build directions. The default Ubuntu package is horribly out of date.

    The directions above seem to work for many of the other folks who posted comments, but while build seems to go OK for me, make check against 12.04.4 gives me

    —-
    make[2]: Leaving directory `/home/cstarkweather/archives/octave-3.8.0/octave-3.8.0′
    make[1]: Leaving directory `/home/cstarkweather/archives/octave-3.8.0/octave-3.8.0′
    make -C test check
    make[1]: Entering directory `/home/cstarkweather/archives/octave-3.8.0/octave-3.8.0/test’
    Makefile:2552: warning: overriding commands for target `check’
    Makefile:2140: warning: ignoring old commands for target `check’
    ../run-octave –norc –silent –no-history ./fntests.m .
    make[1]: *** [check] Segmentation fault
    —-

    ./run-octave likewise segfaults.

    Where does one go from there?

    1. Hi Collin, I would consider compiling within a virtual machine. Maybe your 12.04 and 13.10 upgrade had something installed that somehow conflicts with a prerequisite.

  7. Dear Michael
    I follow our procedure for installation with Ubuntu12.04. The make process stop with the following console msgs:
    ….
    make[2]: quittant le répertoire « /octave-3.8.0/libgui »
    Making all in src
    make[2]: entrant dans le répertoire « /octave-3.8.0/src »
    g++ -DHAVE_CONFIG_H -I. -I.. -I../liboctave/array -I../liboctave/cruft/misc -I../liboctave/numeric -I../liboctave/system -I../liboctave/util -I../libinterp -I../libinterp/corefcn -I../libinterp/corefcn -I../libgnu -I../libgnu -I../libgui/src -mieee-fp -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -g -O2 -pthread -MT octave_gui-main-gui.o -MD -MP -MF .deps/octave_gui-main-gui.Tpo -c -o octave_gui-main-gui.o `test -f ‘main-gui.cc’ || echo ‘./’`main-gui.cc
    mv -f .deps/octave_gui-main-gui.Tpo .deps/octave_gui-main-gui.Po
    /bin/bash ../libtool –tag=CXX –mode=link g++ -mieee-fp -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -g -O2 -pthread -no-undefined -o octave-gui octave_gui-main-gui.o ../libgui/liboctgui.la ../libinterp/liboctinterp.la ../liboctave/liboctave.la -lutil -lm
    libtool: link: g++ -mieee-fp -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -g -O2 -pthread -o .libs/octave-gui octave_gui-main-gui.o ../libgui/.libs/liboctgui.so ../libinterp/.libs/liboctinterp.so ../liboctave/.libs/liboctave.so -lutil -lm -pthread -Wl,-rpath -Wl,/opt/octave3.8/lib/octave/3.8.0
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zpthemm’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cgemv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zhemv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_sscal’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_strmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_scasum’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dtrmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_drotg’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zptsyrk’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cmoveConj’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dgbmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dspr2′
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dsbmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ctrmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dsymv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dtpmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ssyreflect’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zhbmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_izamax’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_srot’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ztpmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cGetNB’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_srotg’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_scopy’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ztpsv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dgemv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dscal’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cscalConj’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_strsv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zhpr’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cptsyr2k’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_sspr’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dptsyrk’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cher2′
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_stbmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dptgemm’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zptherk’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zpttrsm’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_icamax’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_drotmg’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zhpr2′
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cher’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dspr’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dtbmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_stpmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cpther2k’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_sasum’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_sswap’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_srotmg’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ccopyConj’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_srotm’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dptsymm’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zptsymm’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cpttrmm’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zpttrmm’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_drotm’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cswap’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ccplxinvert’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cptsyrk’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dger’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cdotc_sub’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dsyr2′
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zcplxinvert’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cgeru’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ssymv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_chemv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zGetNB’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cpttrsm’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zaxpy’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cpthemm’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_stbsv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dtbsv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dset’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zgemv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dtrsv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ctbmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zgbmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_sger’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_sdsdot’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ssbmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_sspr2′
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_chbmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dznrm2′
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zptsyr2k’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_chpr2′
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dsdot’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_daxpy’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_sgbmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zgerc’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_sgemv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dswap’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zscalConj’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zher’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_saxpby’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_sGetNB’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cdotu_sub’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_csrot’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cgbmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ztrsv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_saxpy’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_chpr’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zgeru’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zrotg’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zset’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_xerbla’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_stpsv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cptgemm’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dzasum’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dsyr’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zmoveConj’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ddot’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ctpmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ztbsv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zdotu_sub’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ctrsv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dGetNB’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dsyreflect’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ztbmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_sptsyr2k’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ctpsv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_spttrmm’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zcopy’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_spttrsm’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_idamax’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dpttrsm’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dtpsv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dcopy’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zaxpby’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_sdot’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zscal’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_daxpby’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zsyreflect’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_isamax’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dasum’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_chpmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dptsyr2k’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dspmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ssyr2′
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_caxpby’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_sset’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zdrot’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_csyreflect’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zpther2k’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zptgemm’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zher2′
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cset’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_drot’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_scnrm2′
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dpttrmm’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_sptsyrk’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_snrm2′
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zswap’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_crotg’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ccopy’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_sptgemm’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cptsymm’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cptherk’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zdotc_sub’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zhpmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_caxpy’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_dnrm2′
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zcopyConj’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cscal’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cgerc’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_sspmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_sptsymm’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ctbsv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ztrmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ssyr’
    collect2: ld returned 1 exit status
    make[2]: *** [octave-gui] Erreur 1
    make[2]: quittant le répertoire « /home/lautridou/Public/octave-3.8.0/src »
    make[1]: *** [all-recursive] Erreur 1
    make[1]: quittant le répertoire « /home/lautridou/Public/octave-3.8.0 »
    make: *** [all] Erreur 2

    Can you give me any information on what to do?
    Best regards
    Pascal

  8. Dear Michael
    I follow our procedure for installation with Ubuntu12.04. The make process stop with the following msgs:
    ….
    make[2]: entrant dans le répertoire « /Public/octave-3.8.0/src »
    g++ -DHAVE_CONFIG_H -I. -I.. -I../liboctave/array -I../liboctave/cruft/misc -I../liboctave/numeric -I../liboctave/system -I../liboctave/util -I../libinterp -I../libinterp/corefcn -I../libinterp/corefcn -I../libgnu -I../libgnu -I../libgui/src -mieee-fp -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -g -O2 -pthread -MT octave_gui-main-gui.o -MD -MP -MF .deps/octave_gui-main-gui.Tpo -c -o octave_gui-main-gui.o `test -f ‘main-gui.cc’ || echo ‘./’`main-gui.cc
    mv -f .deps/octave_gui-main-gui.Tpo .deps/octave_gui-main-gui.Po
    /bin/bash ../libtool –tag=CXX –mode=link g++ -mieee-fp -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -g -O2 -pthread -no-undefined -o octave-gui octave_gui-main-gui.o ../libgui/liboctgui.la ../libinterp/liboctinterp.la ../liboctave/liboctave.la -lutil -lm
    libtool: link: g++ -mieee-fp -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -g -O2 -pthread -o .libs/octave-gui octave_gui-main-gui.o ../libgui/.libs/liboctgui.so ../libinterp/.libs/liboctinterp.so ../liboctave/.libs/liboctave.so -lutil -lm -pthread -Wl,-rpath -Wl,/opt/octave3.8/lib/octave/3.8.0
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zpthemm’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_cgemv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_zhemv’
    ….
    ….
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ctbsv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ztrmv’
    /usr/lib/liblapack.so.3gf: undefined reference to `ATL_ssyr’
    collect2: ld returned 1 exit status
    make[2]: *** [octave-gui] Erreur 1
    make[2]: quittant le répertoire « /home/lautridou/Public/octave-3.8.0/src »
    make[1]: *** [all-recursive] Erreur 1
    make[1]: quittant le répertoire « /home/lautridou/Public/octave-3.8.0 »
    make: *** [all] Erreur 2

    Can you give me any information on what to do?
    Best regards
    Pascal

  9. Great tutorial all went well until I tried to plot, surf(peaks) this would give segmentation fault with command line and gui, using elementary OS which is Ubuntu 12.04 based.

    The problem appears to be the default fltk toolkit if I change to gnuplot as follows graphics_toolkit (‘gnuplot’) everything seems to be ok. I created an .octaverc file in my home directory with the graphics_toolkit(“gnuplot”) command to fix my issue.

    The strange thing is once I have done a plot with gnuplot I can change back to the fltk toolkit and it will now work.

    I posted this just in case anyone else is having the same problem and to say thank you for a great tutorial.

    1. Hello Ian — thanks! I notice exactly the same thing, that I get Segmentation Fault upon executing
      surf(peaks)
      or
      surf(rand(100))
      etc.
      And, as you noted, that manually typing (or as you do, putting in .octaverc)
      graphics_toolkit(‘gnuplot’)
      and then
      surf(peaks)
      will work. I would consider submitting a bug report.

  10. Hey MIchael,

    also big thank you from me! Nick DeMarco (comment) nails exactly what I thought – you rarely find such a non-trivial process description which actually works exactly like that! I am new to Ubuntu and I don’t think I could have figured this out myself without putting a lot of time into it!

    I am curious about a few points:

    a) Why does Octave complain about Java?
    b) What subjects should I read about to be able to figure out those compilation/installation steps myself without having to become a C++ programmer?

    Kind regards

    Raffael

    1. Hi Raffael,
      This JAVA_HOME error is because JAVA_HOME isn’t set in your environment. I.e.
      echo $JAVA_HOME
      returns nothing.
      In our case, Octave installer searches and finds Java anyway.

      I think practice at compiling programs is a good way to learn about what can go wrong — usually it is not a problem with the program (hopefully!), but rather that you don’t have the needed version of some dependency installed.

  11. Hi Michael,
    on ubuntu 12.04 ‘sudo apt-get install gfortran debhelper automake dh-autoreconf texinfo ………….’ I get
    Unable to locate package llvm-3.2-dev
    Downloading and untaring into octave-3.8.0 does not help.
    Similar problem with PCRE.
    How deal with these libearies

    Ulrich

  12. it needed ‘sudo aptitude install’ rather than sudo ‘apt-get install’. but zhen ok. good instructions.

    ulrich

  13. Thnx man everything worked just fine!
    Running octave 3.8 with gui on Linux Mint 16 Cinnamon!
    (Followed the Ubuntu 13.10 instructions)

    :D

  14. Hi,

    I have two prerequisite packages that I can’t install on Ubuntu 12.04, because they are conflicting with an another software (ROS – http://www.ros.org). The two packages are libfltk1.3-dev libcurl4-gnutls-dev.

    Based on the LLVM 3.2 solution you provided, I tried to pull off the same for the former two packages. Downloaded the .deb packages from Ubuntu Package Archive, and extracted them next to the octave3.8.1 folder. I looked at the configure script, and based on what I had found, I created the following configure command:

    ./configure –enable-jit –prefix=/opt/octave3.8 –with-curl-libdir=/home/rope/bin/octave/gnutls/bin/ –with-curl-includedir=/home/rope/bin/octave/gnutls/include/ –with-fltk-prefix=/home/rope/bin/octave/fltk/ –with-fltk-exec-prefix=/home/rope/bin/octave/fltk/bin/ LLVM_CONFIG=/home/rope/bin/octave/llvm/bin/llvm-config

    After this, make successfully completed after ~30-35 mins.

    However, make check fails as there is something wrong with the fltk. Do you have any comments on how should I configure the build process?

    Thanks in advance,
    rope

  15. On my system, all went well, through “make check” But upon invoking $ octave3.8, the system responded with “command not found.” The directory in /opt does not exist, although the symbolic link was created to /usr/local/bin.
    What can I do? I am willing to remove 3.6 and/or install 3.8 in the standard search path, if that’s what it takes.

  16. Thanks Michael, for taking the time to create this article, plus your instructions to build and install octave were easy to carry-out. Running it on Ubuntu 13.10.

  17. Excellent! I initially had the same problem as Robert Kopp encountered. So I basically started over by first completely removing Octave 3.6 and qtoctave.
    It took 2-3 more hours on a single-core laptop but eventually v3.8 is now working.
    I have Mint 13.04 so I used your 13.10 instructions. However, to get things from PPA: they only have 12.04 and 13.10 so I didn’t know which one I could use and couldn’t exploit that easy way.

  18. I got this problem during make:
    could not find a Qt installation of ””

    I solved installing also this package:
    sudo apt-get install qt5-default

  19. I just built Octave 3.8.2 under Debian ver 7 (Wheezy), and when I try to run Octave from the command line in an XTerm with ./run-octave –force-gui
    I get:

    octave: no graphical display found
    octave: disabling GUI features
    GNU Octave, version 3.8.2

    What must be done to get the GUI to work? Thank you.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>