Building FlightGear - Cross Compiling: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(→‎*.MK file: add *.mk template)
Line 145: Line 145:
     cd '$(1).build' && cmake '$(1)' \
     cd '$(1).build' && cmake '$(1)' \
         -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \
         -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \
         -DENABLE_QUX=ON
         -DENABLE_BAR=ON \
        -DENABLE_BAZ=OFF


     $(MAKE) -C '$(1).build' -j '$(JOBS)' install VERBOSE=1
     $(MAKE) -C '$(1).build' -j '$(JOBS)' install VERBOSE=1

Revision as of 18:32, 28 May 2015

This article describes content/features that may not yet be available in the latest stable version of FlightGear (2020.3).
You may need to install some extra components, use the latest development (Git) version or even rebuild FlightGear from source, possibly from a custom topic branch using special build settings: .

This feature is scheduled for FlightGear 4.x. 30}% completed

If you'd like to learn more about getting your own ideas into FlightGear, check out Implementing new features for FlightGear.

This article is a stub. You can help the wiki by expanding it.
WIP.png Work in progress
This article or section will be worked on in the upcoming hours or days.
See history for the latest developments.
Cross Compiling FlightGear on Linux for Windows using mxe (mingw64)
Started in 05/2015
Description Windows binaries created using a cross compiler on Linux
Maintainer(s) hamzaalloush and hooray
Contributor(s) hamzaalloush, FlyHigh (since 05/2015)
Status Under active development as of 05/2015 40}% completed
Changelog https://github.com/hamzaalloush/mxe-clone

Background

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

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.


Cquote2.png
Cquote1.png most people on Windows are unlikely to even install a compiler/build environment at all.

And those few who do, can still make up their own minds about what tool chain to use.
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.
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.


Cquote2.png
Cquote1.png I agree completely, introducing cross-compiling support could be a good idea.
Cquote2.png

Idea

Cquote1.png 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
Cquote2.png
Cquote1.png I also think is better using free software tools to compile it and incidentally make it easier
Cquote2.png

Testing & Development

1rightarrow.png See Howto:Cross platform development for the main article about this subject.

We may benefit from getting access to the Suse build service (or the gcc compile farm) for testing/running and developing the mxe specific parts.

MXE

What is MXE

MXE is essentially a set of useful tools and a Makefile, that provides a compact, command-line driven environment for which to cross-compile Windows binaries on Unix-like platforms.

MXE's Makefile

the Makefile provides a set of Unix portable target-rules for the native GNU make utility.

for the full set of targets that can be passed as arguments to the GNU make utility, visit: http://mxe.cc/#usage

for example, a simple:

$ cd mxe/
$ make

by use of native tools such as the GNU Make Standard Library functions and simple substitution, the Makefile parses through a list of package names, that are contained within an index.html file, and stores them into a white-space separated string.

MXE's Makefile, Line:47

PKGS       := $(call set_create,\
           $(shell $(SED) -n 's/^.* class="package">\([^<]*\)<.*$$/\1/p' '$(TOP_DIR)/index.html'))

packages are contained in index.html as html table elements, the name of the package is the value of html subtype "package":

<tr>
        <td class="package">simgear</td>
        <td class="website"><a href="https://sourceforge.net/projects/flightgear/">SimGear - Simulator Construction Tools</a></td>
</tr>
<tr>
        <td class="package">fgfs</td>
        <td class="website"><a href="https://sourceforge.net/projects/flightgear/">FlightGear Flight Simulator</a></td>
</tr>

MXE's Makefile build process

MXE's Makefile, does not build software by itself. or rather, it does not generate configuration for software.

For example, if you were to pass the name of a package to be cross-compiled to the GNU make utility in MXE, such as:

$ make fgfs

a file in the src/ directory will be invoked that matches the name of the package followed by a suffix of ".mk", this ".mk" file does the necessary configuration and Makefile generation of software.

*.MK file template

a CMake-based template would look like this.

# This file is part of MXE.
# See index.html for further information.

PKG             := foo
$(PKG)_IGNORE   :=
$(PKG)_VERSION  := 9000
$(PKG)_CHECKSUM := 5c666531f7d487075fd692d89f1e05036306192a
$(PKG)_SUBDIR   := foo-$($(PKG)_VERSION)
$(PKG)_FILE     := foo-$($(PKG)_VERSION).tar.gz
$(PKG)_URL      := http://www.foo.org/downloads/developer_releases/$($(PKG)_FILE)
$(PKG)_DEPS     := gcc bar baz

define $(PKG)_UPDATE
    echo 'TODO: write update script for $(PKG).' >&2;
    echo $($(PKG)_VERSION)
endef

define $(PKG)_BUILD
    mkdir '$(1).build'

    cd '$(1).build' && cmake '$(1)' \
        -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \
        -DENABLE_BAR=ON \
        -DENABLE_BAZ=OFF

    $(MAKE) -C '$(1).build' -j '$(JOBS)' install VERBOSE=1
endef

1rightarrow.png See [Creating mxe packages] for the main article about this subject.

Project inspiration

Note  In its current form, this section/article is largely based on quotes collected from various related discussions/channels (devel list, forum etc) using the Instant-Cquotes script. Wiki users and other contributors are encouraged to help rewrite/edit contents accordingly to help get rid of unnecessary quoting (i.e. while the wiki is not intended to be a collection of quotes, quotes are sometimes the best/easiest way to bootstrap new articles, while also providing a good way to link back to related discussions in the archives).

While rewriting usually only entails changing first person speech to 3rd person. However, please try to retain references/links to the original discussion whenever possible.

Cquote1.png Your best would then be, mxe: http://mxe.cc/

It's a massive compiler suite for cross-compiling Windows stuff on Linux - and comes with a ton of dependencies already.
On a multi-core server the whole build proceeds fairly quickly still.

And it should be possible to adapt the build script accordingly. But even the Superbuild should work without too much work.


Cquote2.png
Cquote1.png mxe is based on mingw, and comes with all libraries required for cross-compilation included, including even OSG 3.x
Cquote2.png
Cquote1.png 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/c7deb ... 1486926850


(this even includes Qt5 support)

The cross-compiler used is http://mingw-w64.yaxm.org/doku.php

Detalis on setting up mxe are at: http://mxe.cc/#tutorial


Cquote2.png
Cquote1.png plib is already supported in master (see /src/plib.mk)


simgear would make sense - and once SG&FG work, we should also explore adding osgEarth as a supported dependency.
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.


Cquote2.png

Status

OSG Shared library support done : Wednesday, May 27, 2015

Note  as of now, mxe-clone is able to cross-compile OSG 3.2.1 with shared library support on Ubuntu 14.04.2 distributions. so i'm raising the roadmap objective to 70% until i get the OSG examples and applications working. -- Hamzaalloush (talk) 16:06, 27 May 2015 (EDT)
$ find . -iname "*osg*"
./i686-w64-mingw32.shared/bin/libosgText.dll
./i686-w64-mingw32.shared/bin/libosgTerrain.dll
./i686-w64-mingw32.shared/bin/libosgVolume.dll
./i686-w64-mingw32.shared/bin/libosgGA.dll
./i686-w64-mingw32.shared/bin/libosgDB.dll
./i686-w64-mingw32.shared/bin/libosgParticle.dll
./i686-w64-mingw32.shared/bin/libosg.dll
./i686-w64-mingw32.shared/bin/libosgShadow.dll
./i686-w64-mingw32.shared/bin/libosgPresentation.dll
./i686-w64-mingw32.shared/bin/libosgManipulator.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_bvh.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_rot.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_exr.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_lwo.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_osc.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_deprecated_osgfx.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_tga.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_osgtgz.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_dxf.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_pic.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_ive.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_deprecated_osg.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_serializers_osgmanipulator.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_p3d.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_deprecated_osganimation.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_deprecated_osgtext.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_jpeg.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_jp2.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_ogr.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_ktx.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_txp.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_osgterrain.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_qfont.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_serializers_osgparticle.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_serializers_osganimation.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_serializers_osgga.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_ffmpeg.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_png.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_gta.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_logo.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_dot.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_trk.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_sdl.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_pnm.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_stl.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_serializers_osgtext.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_vtf.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_obj.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_pvr.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_serializers_osgfx.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_bsp.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_rgb.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_openflight.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_txf.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_serializers_osg.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_hdr.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_bmp.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_dds.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_dw.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_lws.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_dicom.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_deprecated_osgwidget.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_gz.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_osga.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_md2.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_osgshadow.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_tiff.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_3ds.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_deprecated_osgsim.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_3dc.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_gif.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_deprecated_osgshadow.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_serializers_osgterrain.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_curl.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_serializers_osgviewer.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_serializers_osgshadow.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_x.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_deprecated_osgviewer.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_mdl.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_serializers_osgvolume.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_normals.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_pov.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_serializers_osgsim.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_zip.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_shp.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_pdf.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_trans.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_tgz.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_ac.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_ply.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_gdal.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_deprecated_osgterrain.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_cfg.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_deprecated_osgparticle.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_osg.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_deprecated_osgvolume.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_scale.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_glsl.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_osgviewer.dll
./i686-w64-mingw32.shared/bin/osgPlugins-3.2.1/mingw_osgdb_revisions.dll
./i686-w64-mingw32.shared/bin/libosgQt.dll
./i686-w64-mingw32.shared/bin/libosgAnimation.dll
./i686-w64-mingw32.shared/bin/libosgSim.dll
./i686-w64-mingw32.shared/bin/libosgUtil.dll
./i686-w64-mingw32.shared/bin/libosgViewer.dll
./i686-w64-mingw32.shared/bin/libosgWidget.dll
./i686-w64-mingw32.shared/bin/libosgFX.dll
./i686-w64-mingw32.shared/lib/libosgViewer.dll.a
./i686-w64-mingw32.shared/lib/libosgPresentation.dll.a
./i686-w64-mingw32.shared/lib/libosgTerrain.dll.a
./i686-w64-mingw32.shared/lib/libosgManipulator.dll.a
./i686-w64-mingw32.shared/lib/libosg.dll.a
./i686-w64-mingw32.shared/lib/libosgAnimation.dll.a
./i686-w64-mingw32.shared/lib/libosgQt.dll.a
./i686-w64-mingw32.shared/lib/libosgWidget.dll.a
./i686-w64-mingw32.shared/lib/libosgParticle.dll.a
./i686-w64-mingw32.shared/lib/libosgText.dll.a
./i686-w64-mingw32.shared/lib/libosgDB.dll.a
./i686-w64-mingw32.shared/lib/libosgSim.dll.a
./i686-w64-mingw32.shared/lib/libosgVolume.dll.a
./i686-w64-mingw32.shared/lib/libosgUtil.dll.a
./i686-w64-mingw32.shared/lib/libosgFX.dll.a
./i686-w64-mingw32.shared/lib/libosgGA.dll.a
./i686-w64-mingw32.shared/lib/pkgconfig/openscenegraph-osgDB.pc
./i686-w64-mingw32.shared/lib/pkgconfig/openscenegraph-osgViewer.pc
./i686-w64-mingw32.shared/lib/pkgconfig/openscenegraph-osgGA.pc
./i686-w64-mingw32.shared/lib/pkgconfig/openscenegraph-osgShadow.pc
./i686-w64-mingw32.shared/lib/pkgconfig/openscenegraph-osgSim.pc
./i686-w64-mingw32.shared/lib/pkgconfig/openscenegraph-osg.pc
./i686-w64-mingw32.shared/lib/pkgconfig/openscenegraph-osgAnimation.pc
./i686-w64-mingw32.shared/lib/pkgconfig/openscenegraph-osgTerrain.pc
./i686-w64-mingw32.shared/lib/pkgconfig/openscenegraph-osgUtil.pc
./i686-w64-mingw32.shared/lib/pkgconfig/openscenegraph-osgWidget.pc
./i686-w64-mingw32.shared/lib/pkgconfig/openscenegraph-osgVolume.pc
./i686-w64-mingw32.shared/lib/pkgconfig/openscenegraph-osgText.pc
./i686-w64-mingw32.shared/lib/pkgconfig/openscenegraph-osgQt.pc
./i686-w64-mingw32.shared/lib/pkgconfig/openscenegraph-osgParticle.pc
./i686-w64-mingw32.shared/lib/pkgconfig/openscenegraph-osgManipulator.pc
./i686-w64-mingw32.shared/lib/pkgconfig/openscenegraph-osgFX.pc
./i686-w64-mingw32.shared/lib/libosgShadow.dll.a
./i686-w64-mingw32.shared/include/osgShadow
./i686-w64-mingw32.shared/include/osgViewer
./i686-w64-mingw32.shared/include/osgWidget
./i686-w64-mingw32.shared/include/osgVolume
./i686-w64-mingw32.shared/include/osgSim
./i686-w64-mingw32.shared/include/osgParticle
./i686-w64-mingw32.shared/include/osgGA
./i686-w64-mingw32.shared/include/osgUtil
./i686-w64-mingw32.shared/include/osgManipulator
./i686-w64-mingw32.shared/include/osgText
./i686-w64-mingw32.shared/include/osgFX
./i686-w64-mingw32.shared/include/osg
./i686-w64-mingw32.shared/include/osgAnimation
./i686-w64-mingw32.shared/include/osgDB
./i686-w64-mingw32.shared/include/osgDB/DotOsgWrapper
./i686-w64-mingw32.shared/include/osgTerrain
./i686-w64-mingw32.shared/include/osgPresentation
./i686-w64-mingw32.shared/include/osgQt

OSG Applications/Examples built and tested working. :Thursday, May 28, 2015

Note  examples and the osgviewer in action recorded, was using Wine at the time, but i tried it on Windows dual booted to same machine and it worked! -- Hamzaalloush (talk) 13:25, 28 May 2015 (EDT)



Cquote1.png MXE is such a joy to work with, the folks on the mailing list are helpful in providing patches to get a fellow's toolchain working, but currently they also have some limitations, because they cannot directly maintain errors produced by the upstream mingw back-end compiler. i have carried a successful build of their static toolchain with some local patches that i applied.


now comes the fun part, installing the much sought after shared building toolchain, and i'm having g++ linking errors produced by mingw-g++ upstream, one that i managed to fix and i'm currently dealing with further errors... after that, i don't think build a OSG shared library is so out of reach


Cquote2.png
Cquote1.png mingw has came a long way, and i think the MXE openscenegraph package (currently at 3.2.1 on master!!), is beautifully maintained, now it builds almost all core libraries dynamically with some argument passing, even as a static target(MXE_TARGETS='i686-w64-mingw32.static'), but it's those plugins again, with their linking errors! i think these are because i'm using the i686-w64-mingw32.static-g++ compiler as opposed to the shared one...
Cquote2.png
Cquote1.png so as soon as i can get the shared build environment running and solve all of it's dependancies for OSG, i think we can have a cross compiller in our hands! :)


i have a local branch that i keep all the various commits and bandaids that i apply in order to make an FG friendly build environment, and who knows, i might fork the MXE project and provide a minimum build environment tailored for FG if they didn't accept my patches for it.


Cquote2.png

Issues

OpenSceneGraph

Roadmap

Task Description Progress
mxe 32-bit static tool-chain progress of the static mxe i686-w64-mingw32-based tool-chain Done Done
mxe 32-bit shared tool-chain progress of the shared mxe i686-w64-mingw32-based tool-chain 40}% completed
flightgear specific mxe tool-chain provide minimal set of packages neccessary for the flightgear project, rather than the full 367 packages 40}% completed
Superbuild Update the CMake Superbuild to support mxe Not done Not done
osg-earth update the Superbuild to support osgEarth Not done Not done
packages provide binary mxe packages (deb/ppa) Not done Not done
VM provide virtual appliance with mxe pre-configured and valid sg/fg build environments set up Not done Not done
build server get the FlightGear Build Server updated to support mxe-based cross-builds Not done Not done

Dependencies

This is a list of dependencies (usually, dedicated *.mk modules for mxe):

Task Description Progress
plib provide mxe build scripts for plib Done Done
openrti add OpenRTI support 30}% completed
optional add support for optional dependencies Not done Not done
simgear provide mxe build scripts for simgear (FlyHigh -saiarcot895 hint:focus on SG headless first) Not done Not done
osg shared library support improve/fix up OpenSceneGraph 3.x support (i.e. shared,non-static, builds using plugins) 90}% completed
osg examples/demos ensure that all OSG examples build/link properly via -DBUILD_OSG_EXAMPLES=ON and -DBUILD_OSG_APPLICATIONS=ON 90}% completed
flightgear provide mxe build scripts for flightgear Not done Not done
osg-earth add dedicated osgearth.mk module for mxe Not done Not done
3rdParty ensure 3rd party dependancies are built in the toolchain, and merge their *.mk packages in the clone 30}% completed