Octave for Debian systems: Difference between revisions

m
Move MXE to "See also" section.
(→‎Compiling from source: Strip common content already addressed in Building.)
m (Move MXE to "See also" section.)
Line 43: Line 43:
* may miss some new dependencies;
* may miss some new dependencies;
* may install packages that are no longer octave dependencies.
* may install packages that are no longer octave dependencies.
==== The even easier way (but experimental) ====
The [[MXE|MXE-octave]] package provides a way to compile Octave for different platforms. Dependencies and certain flags are handled automatically.


==== The right way ====
==== The right way ====
Line 307: Line 303:
To get [https://www.gnu.org/software/octave/doc/interpreter/Compiling-Octave-with-64_002dbit-Indexing.html 64-bit] indexing requires all linked libraries to support 64-bit variables. You can omit most of these except BLAS which gives a fatal error. This is remedied by compiling [http://www.openblas.net/ OpenBLAS] with edits to its Makefile.rule so that BINARY=64 INTERFACE64=1.
To get [https://www.gnu.org/software/octave/doc/interpreter/Compiling-Octave-with-64_002dbit-Indexing.html 64-bit] indexing requires all linked libraries to support 64-bit variables. You can omit most of these except BLAS which gives a fatal error. This is remedied by compiling [http://www.openblas.net/ OpenBLAS] with edits to its Makefile.rule so that BINARY=64 INTERFACE64=1.


<code>./configure LD_LIBRARY_PATH=/opt/OpenBLAS/lib CPPFLAGS=-I/opt/OpenBLAS/include LDFLAGS=-L/opt/OpenBLAS/lib --enable-64</code>
./configure LD_LIBRARY_PATH=/opt/OpenBLAS/lib CPPFLAGS=-I/opt/OpenBLAS/include LDFLAGS=-L/opt/OpenBLAS/lib --enable-64


==== Java ====
==== Java ====
Line 313: Line 309:
Autodetection for java should work well on Debian-based systems. A specific Java version can be specified by passing {{codeline|JAVA_HOME}} to configure, for example
Autodetection for java should work well on Debian-based systems. A specific Java version can be specified by passing {{codeline|JAVA_HOME}} to configure, for example


  ./configure JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
./configure JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64


==== HDF5 ====
==== HDF5 ====
Line 323: Line 319:
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 may be required to specify the location of the libraries.  See bug {{bug|38928}} for details (starting with comment #19) but basically, use the following when running configure:
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 may be required to specify the location of the libraries.  See bug {{bug|38928}} for details (starting with comment #19) but basically, use the following when running configure:


  ./configure --with-hdf5-includedir=/usr/include/hdf5/serial --with-hdf5-libdir=/usr/lib/x86_64-linux-gnu/hdf5/serial
./configure --with-hdf5-includedir=/usr/include/hdf5/serial --with-hdf5-libdir=/usr/lib/x86_64-linux-gnu/hdf5/serial


On older versions of Debian and Ubuntu, where only one flavor of the HDF5 library could be installed at a time, you may need to build Octave against one of the MPI-enabled flavors. On these older systems, configuring Octave like this may work:
On older versions of Debian and Ubuntu, where only one flavor of the HDF5 library could be installed at a time, you may need to build Octave against one of the MPI-enabled flavors. On these older systems, configuring Octave like this may work:


  ./configure CPPFLAGS="-I/usr/include/mpi -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX"
./configure CPPFLAGS="-I/usr/include/mpi -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX"
 
== See also ==
 
* [[MXE]] -- a more customized Octave build including many self-compiled tools.


[[Category:Building]]
[[Category:Building]]
[[Category:Installation]]
[[Category:Installation]]
[[Category:GNU/Linux]]
[[Category:GNU/Linux]]