Building FlightGear - Cross Compiling: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Created page with " {{Stub}} {{Infobox subsystem |name = Cross Compiling FlightGear on Linux for Windows using mxe (mingw64) <!-- |image = --> |alt = fooo |started = 0...")
 
No edit summary
Line 21: Line 21:


{{WIP}}
{{WIP}}
== Background ==
{{FGCquote
  |Linux/Unix users are generally more accustomed to building software from source - on Unix-based platforms it isn't rare even for non-developers to regularly configure/compile and install software - whereas it is much less common on Windows, which is why you need to install a bunch of things to even end up with a working build environment, whereas a Unix-based system will often have everything pre-installed. In addition, FlightGear is a complex piece of software, especially in terms of build-time/run-time dependencies - so people entirely new to the whole process of building software from source are likely to find this pretty frustrating. Personally, I also find setting up a build environment on Linux much easier than doing the same on Windows, despite being pretty familiar with the required workflows - but that doesn't have to do much with FG - the superbuild should help automate most of the required steps these days.<br/>
Then again, like I said previously, people struggling with even just building stock FG from source, will definitely not appreciate having to deal with git and other command line tools to build a customized FG versions, such as the osgEarth branch.
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=238025#p238025
    |title=<nowiki>Re: Help me! Install osgEarth feature on Win7 64b with FG gi</nowiki>
    |author=<nowiki>Hooray</nowiki>
    |date=<nowiki>Mon Apr 06</nowiki>
  }}
}}
{{FGCquote
  |most people on Windows are unlikely to even install a compiler/build environment at all.<br/>
And those few who do, can still make up their own minds about what tool chain to use.<br/>
Like you say, supporting mingw/mxe as an option would be a good thing for the code base, but it would also simplify providing pre-built binaries using a cross-compiler - i.e. we do have "power users" around here who are on *nix based systems who reguarly build custom fgfs binaries from source, but who cannot easily provide such binaries to Windows folks.<br/>
So supporting a mingw/mxe-based cross compiler would be a good thing, because not only could the *nix-based community more easily provide binaries for Windows folks. but also the build server could do this is an automated fashion, without necessarily requiring a VM with a full-blown MS windows environment just to run a compiler. Overall, I guess the first step really is understanding and extending the superbuild script to add osgEarth support to it - once that  is the case, the changed superbuild script should receive much more testing, and get committed to fgmeta. But afterwards it would make sense to explore supporting either a cross-compiler or adding the superbuild-based osgEarth build to the build server.
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=238202#p238202
    |title=<nowiki>Re: Help me! Install osgEarth feature on Win7 64b with FG gi</nowiki>
    |author=<nowiki>Hooray</nowiki>
    |date=<nowiki>Thu Apr 09</nowiki>
  }}
}}
{{FGCquote
  |I agree completely, introducing cross-compiling support could be a good idea.
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=238222#p238222
    |title=<nowiki>Re: Help me! Install osgEarth feature on Win7 64b with FG gi</nowiki>
    |author=<nowiki>elgaton</nowiki>
    |date=<nowiki>Thu Apr 09</nowiki>
  }}
}}
== Idea ==
{{FGCquote
  |do we really need Windows SDK's? can't we find a similar toolchain like Mingw using GCC for example? i think VS support non-native compilers as well? we can then skip this whole thing and probebly even adopt a modified version of the debian build script
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=238158#p238158
    |title=<nowiki>Re: Help me! Install osgEarth feature on Win7 64b with FG gi</nowiki>
    |author=<nowiki>hamzaalloush</nowiki>
    |date=<nowiki>Wed Apr 08</nowiki>
  }}
}}
{{FGCquote
  |I also think is better using free software tools to compile it and incidentally make it easier
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=238176#p238176
    |title=<nowiki>Re: Help me! Install osgEarth feature on Win7 64b with FG gi</nowiki>
    |author=<nowiki>Catalanoic</nowiki>
    |date=<nowiki>Wed Apr 08</nowiki>
  }}
}}
== MXE ==
{{FGCquote
  |Your best would then be, mxe: [http://mxe.cc/ http://mxe.cc/]<br/>
It's a massive compiler suite for cross-compiling Windows stuff on Linux - and comes with a ton of dependencies already.<br/>
On a multi-core server the whole build proceeds fairly quickly still.<br/>
<br/>
And it should be possible to adapt the build script accordingly. But even the [[Superbuild]] should work without too much work.
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=238162#p238162
    |title=<nowiki>Re: Help me! Install osgEarth feature on Win7 64b with FG gi</nowiki>
    |author=<nowiki>Hooray</nowiki>
    |date=<nowiki>Wed Apr 08</nowiki>
  }}
}}
{{FGCquote
  |mxe is based on mingw, and comes with all libraries required for cross-compilation included, including even OSG 3.x
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=239267#p239267
    |title=<nowiki>Re: Help me! Install osgEarth feature on Win7 64b with FG gi</nowiki>
    |author=<nowiki>Hooray</nowiki>
    |date=<nowiki>Fri Apr 17</nowiki>
  }}
}}
{{FGCquote
  |As of 10/2014, the mxe project also contains updated support for building OSG based applications using OSG 3.2.1 for 64 bit Windows, as per: [https://github.com/mxe/mxe/commit/c7deb709fd4779e778a564c2bf83781486926850 https://github.com/mxe/mxe/commit/c7deb ... 1486926850]<br/>
<br/>
(this even includes Qt5 support)<br/>
<br/>
The cross-compiler used is [http://mingw-w64.yaxm.org/doku.php http://mingw-w64.yaxm.org/doku.php]<br/>
<br/>
Detalis on setting up mxe are at: [http://mxe.cc/#tutorial http://mxe.cc/#tutorial]
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=238178#p238178
    |title=<nowiki>Re: Help me! Install osgEarth feature on Win7 64b with FG gi</nowiki>
    |author=<nowiki>Hooray</nowiki>
    |date=<nowiki>Wed Apr 08</nowiki>
  }}
}}
{{FGCquote
  |plib is already supported in master (see /src/plib.mk)<br/>
<br/>
simgear would make sense - and once SG&amp;FG work, we should also explore adding osgEarth as a supported dependency.<br/>
Once that is the case, the cmake superbuild should be easy to get working using mxe (including even osgEarth) - because all the deps should be there already.
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=239512#p239512
    |title=<nowiki>Re: Help me! Install osgEarth feature on Win7 64b with FG gi</nowiki>
    |author=<nowiki>Hooray</nowiki>
    |date=<nowiki>Sat Apr 18</nowiki>
  }}
}}
== Status ==


{{FGCquote
{{FGCquote

Navigation menu