octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: update: cross compiling Octave for MinGW systems


From: John W. Eaton
Subject: Re: update: cross compiling Octave for MinGW systems
Date: Mon, 14 Jan 2013 21:10:30 -0500

Here is another update about my experiences cross compiling Octave for
Windows systems with MinGW using MXE (http://mxe.cc).  I now have
nearly all the Octave dependencies building this way, along with a
recent snapshot of the current Octave development sources and also
the current release candidate for the next stable release of Octave.

If you build the development version now, you will get a version of
Octave that includes the experimental GUI.

To see the current state of the project, here is what you need to do
(on a GNU/Linux system; I've used Debian, it should also work on
Fedora and the other systems listed on the MXE requirements page):
 
  * install the required packages as described here:
    http://mxe.cc/#requirements

  * clone my fork of mxe:

      hg clone http://hg.octave.org/mxe-octave

  * build the cross tools and Octave, including necessary dependencies
    and create a zip file containing everything that is needed to run
    Octave on a Windows system:

      cd mxe-octave
      ./mk-dist

    If you have more than one core available, you can run

      ./mk-dist --jobs 4

    or similar to do parallel builds.

Once this is done (it may take several hours depending on how fast
your system is and how many CPUs you have available to use in
parallel) you will have a file with a name like

  dist/octave-2013-01-14-16-54.zip

Copy that file to a Windows system and unpack it.

Using the control panel, add the directory that contains the
octave.exe file to your PATH environment variable.  For example, this
will be something like

  c:\Users\jwe\Desktop\octave-2013-01-14-16-54\bin

I'm working to eliminate the need for this step, but for now it is
required.

With this version, I've included the sources for some widely used
Octave Forge packages (optim, signal, communications, image,
statistics, and control) plus their dependencies.  To build them, do
the following:  navigate to the bin directory and start octave-cli (to
start the command-line version of Octave in a terminal window) or
octave (to start the experimental GUI).  Inside Octave, cd to the src
directory and build the included packages 

  octave:1> cd ../src
  octave:2> build_packages

The build_packages command is a .m file script in the src directory
that runs "pkg install ..." for each of the packages included in the
src directory.

To build the test release of Octave 3.6.4 instead of the development
snapshot, execute

  ./mk-dist --stable --jobs 4

instead.  You should do this in a clean directory tree because there
is currently no way to cleanly build both the stable and the
development versions in the same tree.

If you choose to try the stable version, the command-line version of
Octave is called "octave" and there is no octave-cli binary.

Note that everything needed to run Octave should be included in the
zip file, so you should *not* need to have MinGW or MSyS installed
separately from Octave to make this work.

The only missing dependencies that I know of are ghostscript and
fig2dev, both of which are optional and only needed for printing
figures in formats other than PostScript, and Java, which is only
needed for the experimental Java interface that will be included in an
upcoming release of Octave.

I'm not sure what to do about these last few missing dependencies.
The ghostscript build system does not seem to be friendly to the
typical GNU cross-compiling conventions and fig2dev (part of the
transfig package) is built with imake (!), which I'm pretty sure is
not friendly to cross compiling, but maybe someone will tell me how
that can work.  Which Java should we be building?  Does anyone here
have experience with that?

Instead of building many of the development tools like make, gawk,
find, diffutils, coreutils, etc., I simply copy and install versions
from mingw/msys.  That works well enough for now.  To comply with the
terms of the GPL we will need to be sure to distribute the
corresponding source files for all these utilities, not just the
binaries.

Previously, I had said that I wanted to modify MXE so that it could be
used to manage building Octave on Windows, not just as a
cross-compiler environment.  I started working on that, but ran into
some problems.  So for now, that part of the project is on hold and I
don't know when I will return to it.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]