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: Philip Nienhuis
Subject: Re: update: cross compiling Octave for MinGW systems
Date: Wed, 16 Jan 2013 16:04:46 -0800 (PST)

John W. Eaton wrote
> Here is another update about my experiences cross compiling Octave for
> Windows systems with MinGW using MXE (http://mxe.cc).  

Thank you very much for this.

Yesterday I finally found time to upgrade Linux on my main build box so I
could have a go at MXE.


> 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.
> <snip>
>     If you have more than one core available, you can run
> 
>       ./mk-dist --jobs 4
> 
>     or similar to do parallel builds.

Nice to see a Windows build including dependencies in ~2.5 hours where under
MinGW it would take several consecutive evenings if not a week. Just
building Qt4 under MinGW took 4 hours....


> :
> <snip>
> 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.

A workaround could be a .BAT file. IIRC Benjamin Lindner did this for the
3.2.4 MinGW binary too.


> 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.

I noted the io package was included too.
The spreadsheet I/O scripts need to be patched for the new core Java
interface. I'm working on that. But for the time being the required Java
interface doesn't work yet.


> :
> <snip>
> 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 simply copied fig2dev from one of the older MinGW binaries and copied the
path update stanza in the related .octaverc file over. I couldn't try it yet
as plotting doesn't work (see below) but based on experience with other
MinGW binaries it should work.


> 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

There are win32 binaries for ghostscript that are easily installed by Joe
Average User.
The only issue is adding it to the PATH. The .bat file mentioned above can
might here as well. 
AFAIU only the gswin32.exe executable is needed.


>  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?

You mean, Java in Linux (build env) or in Windows (target env)?
That's a tricky one. I'd say for octave.jar it shouldn't matter, but the
.oct file is a different issue.

BTW I saw that Java support isn't built but the Java m-files are included
anyway.


> 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.

Having all dependencies built (and fast too!) is already a great benefit.
Perhaps building just Octave itself "natively" (i.e., under MinGW) using
those dependencies might do the trick for now (it would also help solving
the Java issue).
I'll see if I can get that far in the coming weeks.

In the meantime my current build cannot find various __<func>__ functions,
e.g. __init_fltk__ and __init_gnuplot__ so many things just don't work yet.
The workspace pane isn't updated and several other things don't work. But
all that may be related to some issues building the dependencies (a.o., the
autoconf version as noted by Andreas, etc.).
I'll start over later this week.

Philip




--
View this message in context: 
http://octave.1599824.n4.nabble.com/update-cross-compiling-Octave-for-MinGW-systems-tp4648526p4648922.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

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