*** PLEASE NOTE: This information is mostly out of date.  It would be
*** useful for someone who uses Octave on Windows to take over
*** mainenance of this and other files related to running Octave on
*** Windows systems.


Octave has been ported to Windows NT and Windows 95 using the gnu-win32
tools from Cygnus Support.  If you would like to volunteer to work on
improving this port, please contact bug-octave@bevo.che.wisc.edu.

The directory ftp://ftp.che.wisc.edu/pub/octave/BINARIES/gnu-win32
contains a binary distribution of Octave for Windows NT/95 along with
installation instructions.  Unless you are interested in doing some
hacking, you should use the binary releases.

Here is a list of current problems (and workarounds, where available).

* To compile and install Octave on a Windows NT/95 system,
  you will need to get the beta 19 release of the gnu-win32 tools.
  They are available from ftp://ftp.cygnus.com/pub/gnu-win32.

* You will need to have f2c and libf2c.a or g77 installed.  I would
  recommend using g77.  Mumit Khan has directions for building g77 at
  http://www.xraylith.wisc.edu/~khan/software/gnu-win32/g77.html.
  Another solution is to use egcs, which includes g77.  The egcs
  compiler is available from http://www.cygnus.com/egcs.

* You will also need a termcap library.  The GNU termcap library seems
  to work.  You can get it from any GNU archive site, including 
  ftp://ftp.gnu.org/pub/gnu/termcap-1.3.tar.gz.

* It is possible to cross-compile Octave for Windows NT/95 systems.
  On the same hardware, it's generally much faster to use gcc as a
  cross compiler under Linux than as a native compiler under Windows.

  Here are some instructions for building a cross version of gcc and
  then using it to compile Octave.  I've done this using a Linux
  system as the host, but it should work equally well on other systems
  that can run gcc).

    + install cdk on your Windows system

    + build a cross version of binutils:

      tar zxf binutils-2.9.tar.gz
      cd binutils-2.9
      ./configure --target=i386-pc-cygwin32 --prefix=/usr/local/cross-gcc
      make
      make install

      (You can choose whatever value for prefix that you prefer, of
      course, just remember to also make the corresponding changes in the
      following steps as well.)

    + copy libraries and include files from cdk.  You'll need the
      library files from the following directory trees:

	b19/H-i386-pc-cygwin32/lib
	b19/H-i386-pc-cygwin32/i386-cygwin32/lib

      Copy them to /usr/local/cross-gcc/i386-pc-cygwin32/lib.

      You'll also need the include files from the following directory
      trees:

	b19/include
	b19/H-i386-pc-cygwin32/include

      Copy them to /usr/local/cross-gcc/i386-pc-cygwin32/include.

    + build cross version of egcs:

      tar zxf egcs-1.0.2.tar.gz
      cd egcs-1.0.2
      export PATH=/usr/local/cross-gcc/bin:$PATH
      ./configure --target=i386-pc-cygwin32 --prefix=/usr/local/cross-gcc
      make
      make install

    + cross-compile libtermcap:

      export PATH=/usr/local/cross-gcc/i386-pc-cygwin32/bin:$PATH
      tar zxf termcap-1.3.tar.gz
      cd termcap-1.3
      ./configure --host=i386-pc-cygwin3
      make
      cp termcap.h /usr/local/cross-gcc/i386-pc-cygwin32/include
      cp libtermcap.a /usr/local/cross-gcc/i386-pc-cygwin32/lib

    + cross-compile Octave using the compiler you just built:

      export PATH=/usr/local/cross-gcc/i386-pc-cygwin32/bin:$PATH
      tar zxf octave-2.0.12.tar.gz
      cd octave-2.0.10
      ./configure --host=i386-pc-cygwin3
      make

    + make a binary distribution to copy to your Windows system:

      make -f octMakefile binary-dist

    + copy the binary distribution to your Windows system and install
      using the intall-octave shell script

* Octave requires gnuplot for plotting, but the normal Windows version
  of gnuplot will not work because it only reads from the GUI and refuses
  to read input from stdin.  Mumit Khan has written a patch that fixes
  the problem, but the gnuplot license does not allow us to distribute
  modified versions of gnuplot in binary form.  The patch is available
  from http://www.xraylith.wisc.edu/~khan/software/gnu-win32.

* If Octave takes a long time to find function files, you may have to
  modify your LOADPATH to avoid device names specified using the
  `//DEV/subdir' syntax.  To map the D: drive (for example) to
  /D_DRIVE, do the following:

    cd /
    mkdir /D_DRIVE
    mount d: /D_DRIVE

  Then you can set your LOADPATH to include /D_DRIVE/subdir instead of
  //d/subdir.

* If you see error messages like the following:

    The heap has been split, CYGWIN can't fork this process. Increase
    the heap_chunk_size in the registry and try again.

  you can increase the heap size by saving the follwoing text to a
  file (delete the leading white space) and then double click on the
  file.  Try changing the value to something larger than 4 (MB).

    REGEDIT4

    [HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0]
    "heap_chunk_in_mb"=dword:00000004


If you know of solutions for any of the problems mentioned above,
please contact bug-octave@bevo.che.wisc.edu.

More information about the gnu-win32 project is available via the WWW
at http://www.cygnus.com/gnu-win32.

John W. Eaton
jwe@bevo.che.wisc.edu
University of Wisconsin-Madison
Department of Chemical Engineering

Thu Apr 16 23:39:13 1998
