Octave for Debian systems: Difference between revisions

Add "texlive-generic-recommended" to packages for Ubuntu 18.10
(Linuxbrew option)
(Add "texlive-generic-recommended" to packages for Ubuntu 18.10)
(14 intermediate revisions by 9 users not shown)
Line 27: Line 27:
=== Linuxbrew ===
=== Linuxbrew ===


It is possible to install the current stable version of Octave and any needed dependencies within your home directory, particularly useful if you have an old Linux distribution or do not have root access, using [http://linuxbrew.sh Linuxbrew]:
: ''See [[Octave for GNU/Linux#Linuxbrew]]''
 
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)"
echo 'export PATH="$HOME/.linuxbrew/bin:$PATH"' >>~/.bash_profile
brew install homebrew/science/octave


== Compiling from source ==
== Compiling from source ==
Line 56: Line 52:
==== The right way ====
==== The right way ====


The right way is to select and install all the dependencies as listed in the {{Path|INSTALL.OCTAVE}} file. The following are their package names in Debian repositories (they will have their own dependencies which your package manager will solve automatically). If you are building development versions, you'll require some more packages as listed on {{Path|etc/HACKING}} and {{Path|INSTALL}}. Many of them will already be installed on your system. Install the dependencies by typing
The right way is to select and install all the dependencies as listed in the {{Path|INSTALL.OCTAVE}} file (if it is not in your source tree build it doing <code>make INSTALL.OCTAVE</code>). The following are their package names in Debian repositories (they will have their own dependencies which your package manager will solve automatically). If you are building development versions, you'll require some more packages as listed on {{Path|etc/HACKING.md}} and {{Path|INSTALL}}. Many of them will already be installed on your system. Install the dependencies by typing


  sudo apt-get install
  sudo apt-get install
Line 289: Line 285:
To install all of these on Ubuntu 16.04, type
To install all of these on Ubuntu 16.04, type
  sudo apt-get install gcc g++ gfortran make libblas-dev liblapack-dev libpcre3-dev libarpack2-dev libcurl4-gnutls-dev epstool libfftw3-dev transfig libfltk1.3-dev libfontconfig1-dev libfreetype6-dev libgl2ps-dev libglpk-dev libreadline-dev gnuplot-x11 libgraphicsmagick++1-dev libhdf5-serial-dev openjdk-8-jdk libsndfile1-dev llvm-dev lpr texinfo libgl1-mesa-dev libosmesa6-dev pstoedit portaudio19-dev libqhull-dev libqrupdate-dev libqscintilla2-dev libqt4-dev libqtcore4 libqtwebkit4 libqt4-network libqtgui4 libqt4-opengl-dev libsuitesparse-dev texlive libxft-dev zlib1g-dev autoconf automake bison flex gperf gzip icoutils librsvg2-bin libtool perl rsync tar
  sudo apt-get install gcc g++ gfortran make libblas-dev liblapack-dev libpcre3-dev libarpack2-dev libcurl4-gnutls-dev epstool libfftw3-dev transfig libfltk1.3-dev libfontconfig1-dev libfreetype6-dev libgl2ps-dev libglpk-dev libreadline-dev gnuplot-x11 libgraphicsmagick++1-dev libhdf5-serial-dev openjdk-8-jdk libsndfile1-dev llvm-dev lpr texinfo libgl1-mesa-dev libosmesa6-dev pstoedit portaudio19-dev libqhull-dev libqrupdate-dev libqscintilla2-dev libqt4-dev libqtcore4 libqtwebkit4 libqt4-network libqtgui4 libqt4-opengl-dev libsuitesparse-dev texlive libxft-dev zlib1g-dev autoconf automake bison flex gperf gzip icoutils librsvg2-bin libtool perl rsync tar
or, for Debian stable,
 
 
To install all of these on Ubuntu 18.10, type  (Needs more testing)
sudo apt-get install gcc g++ gfortran make libblas-dev liblapack-dev libpcre3-dev libarpack2-dev libcurl4-gnutls-dev epstool libfftw3-dev transfig libfltk1.3-dev libfontconfig1-dev libfreetype6-dev libgl2ps-dev libglpk-dev libreadline-dev gnuplot-x11 libgraphicsmagick++1-dev libhdf5-serial-dev openjdk-8-jdk libsndfile1-dev llvm-dev lpr texinfo libgl1-mesa-dev libosmesa6-dev pstoedit portaudio19-dev libqhull-dev libqrupdate-dev libqscintilla2-dev libsuitesparse-dev texlive texlive-generic-recommended libxft-dev zlib1g-dev autoconf automake bison flex gperf gzip icoutils librsvg2-bin libtool perl rsync tar qtbase5-dev qttools5-dev qttools5-dev-tools libqscintilla2-qt5-dev
 
or, for Debian 8 stable,
  sudo apt-get install gcc g++ gfortran make libblas-dev liblapack-dev libpcre3-dev libarpack2-dev libcurl4-gnutls-dev epstool libfftw3-dev transfig libfltk1.3-dev libfontconfig1-dev libfreetype6-dev libgl2ps-dev libglpk-dev libreadline-dev gnuplot libgraphicsmagick++1-dev libhdf5-serial-dev openjdk-7-jdk libsndfile1-dev llvm-dev lpr texinfo libgl1-mesa-dev libosmesa6-dev pstoedit portaudio19-dev libqhull-dev libqrupdate-dev libqscintilla2-dev libqt4-dev libqtcore4 libqtwebkit4 libqt4-network libqtgui4 libqt4-opengl-dev libsuitesparse-dev texlive libxft-dev zlib1g-dev autoconf automake bison flex gperf gzip icoutils librsvg2-bin libtool perl rsync tar
  sudo apt-get install gcc g++ gfortran make libblas-dev liblapack-dev libpcre3-dev libarpack2-dev libcurl4-gnutls-dev epstool libfftw3-dev transfig libfltk1.3-dev libfontconfig1-dev libfreetype6-dev libgl2ps-dev libglpk-dev libreadline-dev gnuplot libgraphicsmagick++1-dev libhdf5-serial-dev openjdk-7-jdk libsndfile1-dev llvm-dev lpr texinfo libgl1-mesa-dev libosmesa6-dev pstoedit portaudio19-dev libqhull-dev libqrupdate-dev libqscintilla2-dev libqt4-dev libqtcore4 libqtwebkit4 libqt4-network libqtgui4 libqt4-opengl-dev libsuitesparse-dev texlive libxft-dev zlib1g-dev autoconf automake bison flex gperf gzip icoutils librsvg2-bin libtool perl rsync tar
or, for Debian 9 stable,
sudo apt-get install gcc g++ gfortran make libblas-dev liblapack-dev libpcre3-dev libarpack2-dev libcurl4-gnutls-dev epstool libfftw3-dev transfig libfltk1.3-dev libfontconfig1-dev libfreetype6-dev libgl2ps-dev libglpk-dev libreadline-dev gnuplot libgraphicsmagick++1-dev libhdf5-serial-dev openjdk-8-jdk libsndfile1-dev llvm-dev texinfo libgl1-mesa-dev libosmesa6-dev pstoedit portaudio19-dev libjack-jackd2-dev libqhull-dev libqrupdate-dev libqscintilla2-dev libqt4-dev libqtcore4 libqtwebkit4 libqt4-network libqtgui4 libqt4-opengl-dev libsuitesparse-dev texlive libxft-dev zlib1g-dev autoconf automake bison flex gperf gzip icoutils librsvg2-bin libtool perl rsync tar


{{Warning|<ul><li>The Debian repositoriy has several libraries for dealing with HDF data files. The recommended is {{Codeline|libhdf5-serial-dev}}. However, the {{Forge|msh|msh package}} requires [http://www.geuz.org/gmsh/ gmsh] which is incompatible with it.</li>
{{Warning|<ul><li>The Debian repositoriy has several libraries for dealing with HDF data files. The recommended is {{Codeline|libhdf5-serial-dev}}. However, the {{Forge|msh|msh package}} requires [http://www.geuz.org/gmsh/ gmsh] which is incompatible with it.</li>
<li>The GraphicsMagick++ library (libgraphicsmagick++1-dev) on the Debian repositories was compiled with quantum 8 which limits reading images to 8 bit. The solution is to recompile [[GraphicsMagick]] with quantum 16 or 32 before building Octave.</li></ul>}}
<li>The GraphicsMagick++ library (libgraphicsmagick++1-dev) on the Debian repositories was compiled with quantum 8 which limits reading images to 8 bit. The solution is to recompile [[GraphicsMagick]] with quantum 16 or 32 before building Octave.</li>
<li>For debian9 using openjdk-9-jdk (even providing  {{Codeline|JAVA_HOME}}) could *not* be used for the java interface! Use openjdk-8-jdk instead.</li>
<li>When configure decides to use QT5 instead of QT4, make might fail because lrelease is missing (see [https://savannah.gnu.org/bugs/?50580 bug 50580]).  It can be fixed by installing {{Codeline|qttools5-dev-tools}}</li>
</ul>}}
 
=== Obtaining the Source ===
 
The source code for Octave releases can be obtained as a tarball from [https://ftp.gnu.org/gnu/octave/ https://ftp.gnu.org/gnu/octave/].  The source code for development versions is available by cloning the [[Mercurial|mercurial repository]].
 
=== Bootstrap ===
 
If you are building development versions instead of an actual Octave release, you will need to run the {{Codeline|./bootstrap}} script.


=== Configuration ===
=== Configuration ===
Line 301: Line 315:
==== 64 bit ====
==== 64 bit ====


To get [https://www.gnu.org/software/octave/doc/interpreter/Compiling-Octave-with-64_002dbit-Indexing.html 64-bit] 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>
<code>./configure LD_LIBRARY_PATH=/opt/OpenBLAS/lib CPPFLAGS=-I/opt/OpenBLAS/include LDFLAGS=-L/opt/OpenBLAS/lib --enable-64</code>
209

edits