Octave for Debian systems: Difference between revisions

→‎Compiling from source: describe and mention fix for hdf5 issue with debian Jessie and later
(→‎Building development version: add portaudio as dependency for default branch)
(→‎Compiling from source: describe and mention fix for hdf5 issue with debian Jessie and later)
Line 22: Line 22:


== Compiling from source ==
== Compiling from source ==
The only ''tricky'' part is to install the dependencies. Once that is solved, installing from source should be as easy as {{Codeline|./configure && make && make install}}. See the manual for the [http://www.gnu.org/software/octave/doc/interpreter/Running-Configure-and-Make.html#Running-Configure-and-Make configure options].
The only ''tricky'' part is to install the dependencies. Once that is solved, installing from source should be as easy as {{Codeline|./configure && make && make install}}. See the manual for the [http://www.gnu.org/software/octave/doc/interpreter/Running-Configure-and-Make.html configure options].
 
=== HDF5 issue ===
With new Debian versions you may get the following when building from source:
 
{{warning|HDF5 library not found.  Octave will not be able to save or load HDF5 data files.}}
 
The problem is that there are multiple versions of the hdf5 package.  Octave was written with the serial version in mind but it is likely to work with the others (OpenMPI and Mpich). Due to the naming scheme done in Debian, it is required to specify the location of the libraries.  See bug {{bug|38928}} for details but basically, use the following when running configure:
 
./configure --with-hdf5-includedir=/usr/include/hdf5/serial/ --with-hdf5-libdir=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/hdf5/serial/


=== Dependencies ===
=== Dependencies ===
{{Note|different Debian and Ubuntu versions may have slightly different package names but their differences should be pretty small, mostly limited to version numbers.}}
{{Note|different Debian and Ubuntu versions may have slightly different package names but their differences should be pretty small, mostly limited to version numbers.}}
==== The easy way ====
 
==== The easy way (but possibly incomplete) ====
The easy way to install ''most'' of the necessary dependencies is to {{Codeline|sudo apt-get build-dep octave}}. This will install all packages necessary to build and prepare a Debian package for the octave version available on your system repositories. However:
The easy way to install ''most'' of the necessary dependencies is to {{Codeline|sudo apt-get build-dep octave}}. This will install all packages necessary to build and prepare a Debian package for the octave version available on your system repositories. However:
* will install unnecessary packages related to the building of a Debian package;
* will install unnecessary packages related to the building of a Debian package;