Building on Cygwin platform

From Octave
Revision as of 22:52, 18 December 2013 by CdeMills (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Octave can be built on cygwin too !

Pre-requisites

Setup your system the same way as described on the page Octave for Debian systems. The next step, required to generate the documentation, is to tweak a bit the texlive configuration file: (remember cygwin has no sudo command)

   vi /usr/share/texmf-dist/web2c
   

Change

   TEXMFLOCAL = $TEXMFROOT/texmf-site

into

   TEXMFLOCAL = $TEXMFROOT/texmf-site:$TEXMFROOT/texmf

Then run

   mktexlsr
    

Configure

Proceed the same way as on a Unix platform. In this case, the procedure requires a kind of bootstrapping, so it is better to put Octave outside the main directory tree; like f.i.

   ./bootstrap
   mkdir compile; cd compile
   ../configure --prefix=${HOME}/usr

This configuration supposes ${HOME}/usr/bin exists and is in your $PATH.

Build

The procedure is a bit more tricky. Start the build as usual:

   make -j 2 

It will fail after a looong time, while trying to launch ./run-octave. This is a well-known problem, partly caused by issues with the fork() call under Windows platforms. At this time, change run-octave to something simpler:

   #! /bin/sh
   octave_executable="${PREFIX}/usr/bin/octave"
   "$octave_executable" "$@"

Where ${PREFIX} matches the form previously used during the configure stage. In fact, we will use the new Octave, which is not yet operationnal. But never mind. Restart the process as follows:

   make install

This way:

  1. The Octave libs and binaries have been generated, they will be copied into their final destination directory.
  2. the doc has still to be built. With the modified "run-octave", the executable which will be called is the version just installed during the previous step. Now the doc generation will succeed, and so will its installation.

Enjoy!