Contributing to Windows (MXE) and Linux versions: cannot find the sources on MXE

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Contributing to Windows (MXE) and Linux versions: cannot find the sources on MXE

Rafael
Hi,

I read the contributing guidelines page and was reading octave's sources trying to figure out how things are connected and have a few ideas to implement, mainly on libgui. Did that on octave's source code and saw my changes on the Linux build (even submitted a small patch). Then I proceeded to clone and build mxe-octave to do the same on a Windows build, but I could not find the sources.

There are two folders here:

- ~/mxe-octave
- ~/octave

Both build fine. I feel dumb asking this: where are the sources for mxe-octave?

The folder ~/mxe-octave/src contains lots of .mk files, whereas ~/octave/libgui/src/ (for example) contains the GUI source files. I cannot find any of them on the mxe-octave subfolders. What I am missing? How can I have a mxe-octave folder where I can perform the cicle "change sources --> run make --> test -->", like I can do on the native octave build? I'm not used to mercurial, still have to learn.

Perhaps someone is already doing Windows/Linux development and can shed some light here. :)

Thanks in advance.

Best regards,

Rafael Monteiro
Reply | Threaded
Open this post in threaded view
|

Re: Contributing to Windows (MXE) and Linux versions: cannot find the sources on MXE

Jordi Gutiérrez Hermoso-2
On Sat, 2015-06-20 at 11:54 -0300, Rafael Monteiro wrote:
> *I feel dumb asking this: where are the sources for mxe-octave?*

Scattered across all the greater webternets.

MXE-Octave is "just" a collection of Makefiles that has instructions
on how to download and compile Octave and all of its dependencies. It
does not have the source code itself.

- Jordi G. H.




Reply | Threaded
Open this post in threaded view
|

Re: Contributing to Windows (MXE) and Linux versions: cannot find the sources on MXE

Rafael
Thanks, Jordi.

That makes sense, but I thought it would keep the downloaded files somewhere. Is there any way I can tell it to "keep the sources", so I can change them and run make to see the effects on a Windows build? Or else: can I tell MXE-Octave to get the sources from my local ~/octave folder? Perhaps I could setup a Mercurial server and tell MXE-Octave to look at my local repository. Does that make sense? Is there a simpler approach?

I'm curious to know how Octave Windows developers do it.

Regards,

Rafael Monteiro

2015-06-20 13:01 GMT-03:00 Jordi Gutiérrez Hermoso <[hidden email]>:
On Sat, 2015-06-20 at 11:54 -0300, Rafael Monteiro wrote:
> *I feel dumb asking this: where are the sources for mxe-octave?*

Scattered across all the greater webternets.

MXE-Octave is "just" a collection of Makefiles that has instructions
on how to download and compile Octave and all of its dependencies. It
does not have the source code itself.

- Jordi G. H.




Reply | Threaded
Open this post in threaded view
|

Re: Contributing to Windows (MXE) and Linux versions: cannot find the sources on MXE

Philip Nienhuis
In reply to this post by Rafael
Rafael wrote
Hi,

I read the contributing guidelines
<http://www.gnu.org/software/octave/doc/interpreter/Contributing-Guidelines.html>
page and was reading octave's sources trying to figure out how things are
connected and have a few ideas to implement, mainly on libgui. Did that on
octave <http://hg.octave.org/octave/>'s source code and saw my changes on
the Linux build (even submitted a small patch). Then I proceeded to clone
and build mxe-octave <http://hg.octave.org/mxe-octave/> to do the same on a
Windows build, but I could not find the sources.

There are two folders here:

- ~/mxe-octave
- ~/octave

Both build fine. *I feel dumb asking this: where are the sources for
mxe-octave?*

The folder ~/mxe-octave/src contains lots of .mk files,
whereas ~/octave/libgui/src/ (for example) contains the GUI source files. I
cannot find any of them on the mxe-octave subfolders. What I am missing?
How can I have a mxe-octave folder where I can perform the cicle "change
sources --> run make --> test -->", like I can do on the native octave
build? I'm not used to mercurial, still have to learn.

Perhaps someone is already doing Windows/Linux development and can shed
some light here. :)
Perhaps, yes.

To roll your own octave for windows version, do what I do (since almost 2 years):

1. Make the cross-build environment for Octave (=mxe-octave)
2. Build an Octave dist archive in Linux
3. Move that into mxe-octave and cross-build Octave + windows installer.

1. Just clone http://hg/octave.org/mxe-octave
Do:
.autoconf
./configure <options you want>
make nsis-installer JOBS=<some number>

and that will make you an Octave Windows installer based on stable release (currently 4.0.0)

2. To build your own Octave version:
- build Octave on Linux (in separate source and build trees).
- once Octave runs fine in Linux (using make check and trying your mods using ./run-octave & from the build dir), do:
- make all dist
- openssl sha1 octave-<version>.tar.gz (the dist source archive) => checksum
- move the archive to the <mxe-octave>/src folder (or symlink to it from there)
- adapt <mxe-octave>/src/octave.mk to the checksum (or enter  ## No Checksum) + octave version and archive type (tar.gz rather than tar.bz2)
- adapt in the top of the main Makefile "stable-octave" =>  "octave"  (that name refers to the .mk filename in the src folder).

3. -... and then run (in the <mxe-octave> folder)  
make nsis-installer <options>
- move the installer in <mxe-octave>/dist/ to the Windows side (USB thumb drive, LAN copy, whatever).
-install it there.

Philip
Reply | Threaded
Open this post in threaded view
|

Re: Contributing to Windows (MXE) and Linux versions: cannot find the sources on MXE

Jordi Gutiérrez Hermoso-2
In reply to this post by Rafael
On Sat, 2015-06-20 at 13:23 -0300, Rafael Monteiro wrote:
> That makes sense, but I thought it would keep the downloaded files
> somewhere. Is there any way I can tell it to "keep the sources", so
> I can change them and run make to see the effects on a Windows
> build?

It does not currently do this. As far as MXE-Octave is concerned,
Octave is just another thing to download and install, and if you want
to modify it, you have to write patches for it. Look at src/octave.mk
and src/octave*.patch

It would be convenient if MXE could work as you suggest. Why don't you
attempt to write new Makefile rules for octave.mk that allow this?

The idea was for MXE-Octave to some day merge back to the MXE it has
forked off from, but so far this hasn't happened.

- Jordi G. H.



Reply | Threaded
Open this post in threaded view
|

Re: Contributing to Windows (MXE) and Linux versions: cannot find the sources on MXE

Andreas Weber-4
In reply to this post by Rafael
Am 20.06.2015 um 18:23 schrieb Rafael Monteiro:

> That makes sense, but I thought it would keep the downloaded files
> somewhere. Is there any way I can tell it to "keep the sources",

See KEEP_BUILD in Makefile.in:
http://hg.octave.org/mxe-octave/file/e114dbf6ba1e/Makefile.in#l101

-- Andy

Reply | Threaded
Open this post in threaded view
|

Re: Contributing to Windows (MXE) and Linux versions: cannot find the sources on MXE

Rafael
Thanks everyone! :)

I'll try Andreas' suggestion to set KEEP_BUILD to 1, because of it's simplicity. If that doesn't work, I'll try using Philip's workflow.

Philip: were you aware of the KEEP_BUILD flag? Perhaps it's a good hint for you too.

Best regards,

Rafael Monteiro
Reply | Threaded
Open this post in threaded view
|

Re: Contributing to Windows (MXE) and Linux versions: cannot find the sources on MXE

Philip Nienhuis
Rafael wrote
Thanks everyone! :)

I'll try Andreas' suggestion to set KEEP_BUILD to 1, because of it's simplicity. If that doesn't work, I'll try using Philip's workflow.

Philip: were you aware of the KEEP_BUILD flag? Perhaps it's a good hint for you too.
Sure I am but I usually try fixes and mods on Linux first:

- *much* easier and faster

- I use Octave on both Linux and Windows so I have to try both anyway

- I can try in Linux immediately, while for Windows I first have to build an installer or binary archive, transplant it to Windows and install it there. That's ~20-30 mins. for each tiny step  versus  1-2 mins. on Linux
Were you aware of that, Rafael?  ;-)

Philip