Octave for GNU/Linux: Difference between revisions

Line 62: Line 62:


=Ubuntu=
=Ubuntu=
Note that on Ubuntu 10.04 and above, the default command to get packages is apt-get instead of aptitude (unless you have installed aptitude). Therefore the command to search the available packages is


    $ apt-cache search octave
To Build from Mercurial Sources on a new install of Ubuntu12.04.1


The rest of the commands are the same but replacing aptitude with apt-get.
Fist some extra packages are needed.
Next some extra compilation instructions are given.


To build newer releases of octave some extra packages may be needed. Next some extra compilation instructions are given.
To compile software in your Ubuntu system, install the essential tools.
  $ sudo apt-get install build-essential
After these you can proceed to get the dependencies.


If you plan to compile stuff in your Ubuntu system is not unwise to get the essential tools.
Even though it says 3.2 it is also used for the later versions of octave.
  $ sudo apt-get build-dep octave3.2


    $ sudo apt-get install build-essential
  $ sudo apt-get install bison libfontconfig-dev


After these you can proceed to get the dependencies as explained before.
  $ sudo apt-get install gnuplot


    $ sudo apt-get build-dep octave3.2
  $ sudo apt-get install mercutial
 
  $ sudo apt-get install git


After this, it should be possible to follow the [[Build from source]] instructions. However, you may notice that the <code>configure</code> script says that '''bison''' and '''libfontconfig-dev''' are still missing so you need to get them too.
  $ sudo apt-get install libtool


    $ sudo apt-get install bison libfontconfig-dev
  $ sudo apt-get install automake


After this you can compile (which takes some time, 1:30 hr in a 2.0 Ghz PC). Even though make check may work perfectly, you may still find a problem when trying to plot. This is due to missing x11 for gnuplot. Gnuplot will tell you <code>Terminal set to unknown</code>. To fix it get the full gnuplot package
  $ sudo apt-get install qtcreator


    $ sudo apt-get install gnuplot
  $ sudo apt-get install libqscintilla2-8 libqscintilla2-dev


Make sure that gnuplot-x11 is in the list of installed packages.
Now create a folder to work with octave.
CD to this folder.
 
Now download the source files.
 
    $ hg clone http://www.octave.org/hg/octave
 
now in the repository folder
 
    ./bootstrap
    ./configure
    make -j6  # this will use up to 6 cores in the cpu.
    make check  # to look for errors.
    ./run-octave  # To try the new version


You may still find a problem when plotting: <code>Gtk-WARNIN **: Unable to locate theme engine in module_path: "pixmap"</code> To fix this do
You may still find a problem when plotting: <code>Gtk-WARNIN **: Unable to locate theme engine in module_path: "pixmap"</code> To fix this do
6

edits