Editing Building on Cygwin platform

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 save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
#REDIRECT [[Octave for Microsoft Windows#GNU Octave on cygwin]]
+
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:
 +
# The Octave libs and binaries have been generated, they will be copied into their final destination directory.
 +
# 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!
 +
 
 +
[[Category:Installation]]
 +
[[Category:Building]]
 +
[[Category:Microsoft Windows]]

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)