BMK NG - Cross-compile Linux -> Win32

BlitzMax Forums/BlitzMax NG/BMK NG - Cross-compile Linux -> Win32

Brucey(Posted 2009) [#1]
I'm just getting things set up for testing this.

It's a bit fiddly though, since the version of MinGW available through Ubuntu is GCC 4.2 - so I've had to do a full build myself for 3.4.5... ho hum.

Busy tweaking BMK for this, but fortunately (now) there's only a couple of ?linux blocks to convert.
BMK *really* needs a lot of refactoring to make it much nicer to hack around. I have a few ideas, but I'm not sure how far I want to move away from its current incarnation - since if Mark decides to change it and my version is completely different, it'll be a pain to patch... (but hey, that's only for me to worry about :-p )

So, the big question is... Anyone interested in a Linux -> Win32 cross-compile?


Grisu(Posted 2009) [#2]
No :P (j/k)


Brucey(Posted 2009) [#3]
It's doing a full modules build as I type :-)

(Seems I've finally found a use for those 4 cores... as it is happily doing a full Linux build *and* a full win32 build at the same time)
Of course, this was after I realised that my Linux version was only at 1.32 - so it broke during the compile...

However, I've only had to modify the BMK config file to get this working - which is nice.
(well, other than having to install mingw + wine).

(I hear the shouts of discontent now... "but hey! if you're using wine, then you're not really doing it all on Linux", to which I reply... "well, since bcc.exe is a Windows binary, I've got no choice")


Brucey(Posted 2009) [#4]
Oh dear...

Compiling:glgraphics.win32.c
/home/brucey/programming/BlitzMax/mod/brl.mod/glgraphics.mod/glgraphics.win32.c:4:19: gl/gl.h: No such file or directory


On Linux... it's uppercase GL...

Let's hope I can copy include/GL/... to include/gl/... and it sorts it.


DavidDC(Posted 2009) [#5]
since if Mark decides to change it and my version is completely different, it'll be a pain to patch... (but hey, that's only for me to worry about :-p )

Not if Mark changes it by incorporating your changes :-) Which is what we should be lobbying for.


Brucey(Posted 2009) [#6]
well... you can dream :-p

...

I found a "bug" in freeprocess :
/home/brucey/programming/BlitzMax/mod/pub.mod/freeprocess.mod/freeprocess.c:159:22: Tlhelp32.h: No such file or directory

"Tlhelp32.h" should be "tlhelp32.h"

Doesn't matter on Windows or Mac, since they don't care about case... but it's an issue on Linux.. pah!


xlsior(Posted 2009) [#7]
On Linux... it's uppercase GL...

Let's hope I can copy include/GL/... to include/gl/... and it sorts it.


Or make a symbolic link from one to the other?


Brucey(Posted 2009) [#8]
Or make a symbolic link from one to the other?

Well.. I would... but since I own the headers in this copy of mingw I didn't think it would matter too much - there are only 3 .h files in the folder called GL.

I'm hoping that I can simply tar/zip up the mingw folder and make it available as a download somewhere for folks to use - assuming that paths aren't hard-coded, for example.
If that's the case, then it'll save people the hassle of having to download, install and compile it up themselves - which is fiddly, and takes a while.

All the modules (including BaH + wx) compiled okay.
I didn't have time to build an app though, but I'll give it a go later and post the results.

Feeling positive ;-)


Brucey(Posted 2009) [#9]
Just a couple of minor tweaks (to both bmk and maxide) were required to get it building Windows exe's on Linux, which I've rolled into the Mac build too.


If someone wants to volunteer to be a guinea-pig for Linux testing, might I refer you to this post for some basic details.

:-)


plash(Posted 2009) [#10]
I had a feeling the naming-scheme was going to be an issue :(

My rule is to ALWAYS use lower-case for folders and files.


Brucey(Posted 2009) [#11]
My rule is to ALWAYS use lower-case for folders and files.

Me too!

I wish I could say the same for all those library authors though :-p

Well, the freeprocess "bug" is being fixed for the next version, so that's cool. And my GL folder hack on Linux seems to sort out the other issue.
All good here :-)