Difference between revisions of "Build from source"

From Octave
Jump to navigation Jump to search
Line 19: Line 19:
[http://www.gnu.org/software/octave/doc/interpreter/Installation.html#Installation More detailed instructions]
[http://www.gnu.org/software/octave/doc/interpreter/Installation.html#Installation More detailed instructions]
for building from source are included in the Octave manual.
for building from source are included in the Octave manual.
=System Specific Instructions=
*[[Octave for Mac|Mac OS X]]
=Distributed building=
=Distributed building=

Revision as of 15:02, 1 March 2012

Compiling from source is probably the most effective way of installing Octave on your system. To do this you will require compilers for the following languages:

  • C
  • C++ (ISO)
  • Fortran

The best supported compilers for the job are the GNU Compiler Collection. You will require at least GCC 4.3 or later, although GCC 4.4 or later is recommended.

To compile Octave, you will also need a recent version of GNU Make. You must have GNU Make to compile octave. Octave's Makefiles use features of GNU Make that are not present in other versions of make. GNU Make is very portable and easy to install.


Building Octave can be as simple as downloading the source and running the following three commands in your Linux shell:

make install

More detailed instructions for building from source are included in the Octave manual.

Distributed building


The following seems to be out of date for my Ubuntu setup. My suggestion would be to look at the latest info for distcc and follow the instructions from there. Make sure the different machines have the same software. DAS


Install distcc on all machines taking part in the compilation. List them in ~/.distcc/hosts:


The first machines listed are given higher priority -- place 'localhost' as you see fit.

Set the environment variables CCACHE_PREFIX, CXX and CC:

export CCACHE_PREFIX="distcc"
export CXX="ccache g++"
export CC="ccache gcc"
./configure <options>

Compile using the -j<simultaneous-jobs> flag, two jobs per CPU available, i.e. for 5 machines

make -j10