GSoC 2026

Building

Building

Jump to navigation

Jump to search

This article provides general information aboutbuilding GNU Octavefrom source (on Unix-like systems).

If you just want toinstall GNU Octave, seeCategory:Installation.ForMS Windows, readBuilding on Microsoft WindowsandWindows Installer.FormacOS, readOctave for macOS.

General steps

  • Install all build dependencies(see below). - Getting the Octave sources ...

  • (A) ... from the development repository (requires also Mercurial)

  • (A) ... from the development repository (requires also

hg clone[https://www.octave.org/hg/octave]&& \ cd octave && \ ./bootstrap

  • (B) ... from a release

wget[https://ftpmirror.gnu.org/octave/octave-10.3.0.tar.gz]&& \ tar -xzf octave-10.3.0.tar.gz && \ cd octave-10.3.0

    1. Configure, build, check, and install Octave

mkdir .build && \ cd .build && \ ./../configure --prefix=$HOME/my_octave && \make -j2 && [[1]]make check && \ make install[[2]]

Dependencies

Most of the dependencies given in this section can be very conveniently installed on many GNU/Linux systems.

Dependencies marked with green background are required for building Octave. All other tools and libraries are recommended/optional, but very useful features (like the GUI, plotting, etc.) are likely to be disabled.

Build tools

DependencyDescriptionLicense / Copyright

AutomakeC++, C, and Fortran compilersGNU MakeLibtoolBisonFlex### Documentation tools

DependencyDescriptionLicense / Copyright

FTGLGL2PSTexi2HTMLTexinfoTeX Live### External tools and libraries

DependencyDescriptionLicense / Copyright

LAPACKPCREGNU ReadlineARPACK-NGcURLFFTW3FLTKfontconfigFreeTypeGL2PSGLPKgnuplotGraphicsMagick++HDF5OpenJDKOpenGLPortAudioQhullQRUPDATEQScintillaQtRapidJSONSuiteSparseSUNDIALS IDAzlib## Tweaks

Install Octave in home directory

To install multiple versions of GNU Octave on one system, it is recommended to use the --prefix

option of the configure

script. With this option one can determine a custom installation directory, preferably within your user's home directory, to avoid elevated installation privileges. One does not "clutter" the system by running sudo make install

and the custom build Octave can coexist with, for example, your Linux distribution installation of Octave.

In order to start the custom build of Octave almost as convenient as the Linux distribution installation of Octave, one can create an alias within .bashrc:

echo "alias myoctave='$HOME/my_octave/bin/octave'" >> ~/.bashrc

Then update your .bashrc without doing logout and login:

source $HOME/.bashrc

If you simply enter octave

, you'll start your Linux distribution installation of Octave. But when you enter myoctave

, you'll start your custom build of Octave inside your home directory.

Uninstall

  • If you still have the .build folder, just run make uninstall

from it. - Just delete the install folder, e.g. rm -rf $HOME/my_octave

.

In any case, don't forget to remove any created alias entries in ~/.bashrc.

Large array support

See also

andREADME

in the development repository./etc/HACKING.md

https://octave.org/doc/interpreter/Installation.htmlMXE-- a more customized Octave build including many self-compiled tools.

Footnotes

--prefix

determines the installation location, see theTweaks sectionfor details. For more information about configuration options, type./../configure --help

.Depending on your system and processor count, use a larger number of parallel jobs, e.g.-j8

.

Command Palette

Search for a command to run...