Difference between revisions of "Build from source"

From Octave
Jump to navigation Jump to search
(Redirected page to Building)
 
(19 intermediate revisions by 8 users not shown)
Line 1: Line 1:
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:
+
#REDIRECT [[Building]]
 
 
* C
 
* C++ (ISO)
 
* Fortran
 
 
 
The best supported compilers for the job are the [http://gcc.gnu.org/ 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.
 
 
 
=Introduction=
 
 
 
Building Octave can be as simple as downloading the source and running the following three commands in your Linux shell:
 
 
 
./configure
 
make
 
make install
 
 
 
[http://www.gnu.org/software/octave/doc/interpreter/Installation.html#Installation More detailed instructions]
 
for building from source are included in the Octave manual.
 
 
 
=Test=
 
 
 
To run all tests, change to the octave directory and type
 
 
 
make check
 
 
 
This requires dejagnu.
 
 
 
To run a specific set of tests, change to the directory test/octave.test/<part> and type
 
 
 
runtest <part>.exp
 
 
 
To run your own tests use the [[RunInPlace]] shell script.
 
 
 
=Install=
 
 
 
Finally, to install Octave on your system run
 
 
 
make install
 
 
 
Alternatively, If you have checkinstall on your system issue
 
 
 
checkinstall -D
 
 
 
This will create a deb from the sources and register the installation with dpkg.
 
 
 
checkinstall -R
 
 
 
will create RPM package which you can install using your package manager in RPM based
 
distributions.
 
 
 
=System Specific Instructions=
 
 
 
*[[PaulKienzleIrixConf|SGI/IRIX]]
 
*[[Octave for Mac|Mac OS X]]
 
*[[Octave_for_GNU_Linux:_Binary_Octave_packages_for_GNU_Linux#Debian_Development_Sources|Debian]]
 
 
 
=Distributed building=
 
 
 
==Requirements==
 
 
 
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
 
 
 
 
 
distcc
 
ccache
 
 
 
Install distcc on all machines taking part in the compilation. List them in <nowiki>~/.distcc/hosts</nowiki>:
 
 
 
localhost
 
pc1.mynet.org
 
pc2.mynet.org
 
 
 
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 <nowiki>-j<simultaneous-jobs></nowiki> flag, two jobs per CPU available, i.e. for 5 machines
 
 
 
make -j10
 

Latest revision as of 05:37, 2 June 2015

Redirect to: