Editing Talk:Build from source

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 104: Line 104:
  $ ./bootstrap
  $ ./bootstrap


Running this script will result in the creation of the configure script.  
Running this script will result in the createion of the configure script.  
The bootstrap script comes from gnulib, but is kept in the Octave source archive.  
The bootstrap script comes from gnulib, but is kept in the Octave source archive.  
It should be updated from the gnulib sources as necessary.
It should be updated from the gnulib sources as necessary.
Line 123: Line 123:
It is very recommended that you build Octave in a separate directory tree from the sources.   
It is very recommended that you build Octave in a separate directory tree from the sources.   
For convenience we recommend a subdirectory to the main octave directory.
For convenience we recommend a subdirectory to the main octave directory.
For example, after you finished running the bootstrap script (takes a few seconds), run the
For example, after you finished running the bootstrap script (takes a few secondds), run the
following commands to create a build tree, configure, and build Octave:
following commands to create a build tree, configure, and build Octave:


Line 130: Line 130:
  $ ../configure
  $ ../configure


configure takes many command line arguments that allow some customization of the resulting makefile, and they are detailed in the [http://www.gnu.org/software/octave/doc/interpreter/Running-Configure-and-Make.html manual].
Running configure will take about half a minute. After it's finished, and if you are satisfied with
 
the result, just run make
Running configure will take about half a minute. After it's finished, and if you are satisfied with the result, just run make


  $ make
  $ make


Building octave will take something on the scale of hours,  
Building octave will take something on the scale of hours,  
the exact amount depending on if the programmers or cpu engineers are ahead in the eternal race of performance versus cruft.  
the exact ammount depending on if the programmers or cpu engineers are ahead in the eternal race of performance versus cruft.  
The best thing to do is to leave it over lunch, or possibly overnight if it's late. You probably should sleep more anyway Jonathan.
The best thing to do is to leave it over lunch, or possibly overnight if it's late. You probably should sleep more anyway Jonathan.


Line 153: Line 152:
|}
|}


Beyond these, there are several more optional dependencies that configure will complain about, look in the [http://www.gnu.org/software/octave/doc/interpreter/External-Packages.html manual] for the complete list. If you are installing the dependencies with synaptic, you need to get the development versions of the libraries or configure will not find them.
Beyond these, there are several more optional dependencies that configure will complain about, look in the [http://www.gnu.org/software/octave/doc/interpreter/External-Packages.html manual] for the complete list.


===Run make===
===Run make===
You will need a recent version of GNU Make as Octave relies on certain features not generally available in all versions of make. Octave requires approximately 1.4 GB of disk storage to unpack and compile from source (significantly less, 400 MB, if you don't compile with debugging symbols). To compile without debugging symbols try the command
$ make CFLAGS=-O CXXFLAGS=-O LDFLAGS=
If you encounter errors while compiling Octave, first search the web to see if there is a workaround or solution for your problem. If not, see [http://www.gnu.org/software/octave/doc/interpreter/Reporting-Bugs.html Trouble], for information about how to report bugs.
Once you have successfully compiled Octave, run
$ make install
This will install a copy of Octave, its libraries, and its documentation in the destination directory. As distributed, Octave is installed in the following directories. In the table below, prefix defaults to /usr/local, version stands for the current version number of the interpreter, and arch is the type of computer on which Octave is installed (for example, ‘i586-unknown-gnu’).
{| class="wikitable"
|'''prefix/bin'''|| Octave and other binaries that people will want to run directly.
|-
|'''prefix/lib/octave-version'''||Libraries like libcruft.a and liboctave.a.
|-
|'''prefix/octave-version/include/octave'''||Include files distributed with Octave.
|-
|'''prefix/share'''||Architecture-independent data files.
|-
|'''prefix/share/man/man'''||Unix-style man pages describing Octave.
|-
|'''prefix/share/info'''||Info files describing Octave.
|-
|'''prefix/share/octave/version/m'''||Function files distributed with Octave. This includes the Octave version, so that multiple versions of Octave may be installed at the same time.
|-
|'''prefix/libexec/octave/version/exec/arch'''||Executables to be run by Octave rather than the user.
|-
|'''prefix/lib/octave/version/oct/arch'''||Object files that will be dynamically loaded.
|-
|'''prefix/share/octave/version/imagelib'''||Image files that are distributed with Octave.
|}
Please note that all contributions to Octave may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Octave:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)