Building FlightGear - Cross Compiling: Difference between revisions

Jump to navigation Jump to search
→‎Issues: === osg-earth compilation trouble ===
(→‎*.mk file template: comma acts as ELSE.)
(→‎Issues: === osg-earth compilation trouble ===)
Line 630: Line 630:
* For building OSG applications out-of-source-trees, it would make sense to introduce -DCMAKE_INSTALL_PREFIX, so that FindOpenSceneGraph.cmake can easily locate pre-installed OSG versions (as per our docs, and the existing cmake machinery in place in SG/FG), which also means that OSG would not need to be installed system-wide, while also supporting different versions at the same time.
* For building OSG applications out-of-source-trees, it would make sense to introduce -DCMAKE_INSTALL_PREFIX, so that FindOpenSceneGraph.cmake can easily locate pre-installed OSG versions (as per our docs, and the existing cmake machinery in place in SG/FG), which also means that OSG would not need to be installed system-wide, while also supporting different versions at the same time.
* We keep seeing people asking for ways to have an entirely self-contained FlightGear setup that doesn't require any installation (e.g. either all files residing in a single folder or the whole binary linked statically) - we used to support this a few years go, and we even had people using FG on a USB drive, or on boot-able drives - and we commonly suggest that people first try running FG on computers before purchasing any new hardware  - so it would make sense to look at what's needed to still support static builds using the mxe tool chain. This may involve making the static/dynamic configuration options configurable in the corresponding *.mk files.
* We keep seeing people asking for ways to have an entirely self-contained FlightGear setup that doesn't require any installation (e.g. either all files residing in a single folder or the whole binary linked statically) - we used to support this a few years go, and we even had people using FG on a USB drive, or on boot-able drives - and we commonly suggest that people first try running FG on computers before purchasing any new hardware  - so it would make sense to look at what's needed to still support static builds using the mxe tool chain. This may involve making the static/dynamic configuration options configurable in the corresponding *.mk files.
=== osg-earth compilation trouble (you can delete if you solve)===
osg-earth has both CMake and autotools generators provided by source, i'm using a basic CMake config:
<syntaxhighlight lang="make">
PKG            := osgearth
$(PKG)_IGNORE  :=
$(PKG)_VERSION  := 2.6.1
$(PKG)_CHECKSUM := 4c68efb9e413a5d78fffa2142e3e2998d3535939
$(PKG)_SUBDIR  := gwaldron-osgearth-350f1a0
$(PKG)_FILE    := gwaldron-osgearth-350f1a0.tar.gz
$(PKG)_URL      := https://github.com/gwaldron/osgearth/tarball/osgearth-2.6
$(PKG)_DEPS    := gcc openscenegraph curl gdal geos
...
define $(PKG)_BUILD
    mkdir '$(1).build'
    cd '$(1).build' && cmake '$(1)' \
        -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)'
    $(MAKE) -C '$(1).build' -j '$(JOBS)' install VERBOSE=1
endef</syntaxhighlight>
i'm getting GEOS related undefiend references, see: [https://trac.osgeo.org/geos/ticket/552]
<syntaxhighlight lang="bash">CMakeFiles/osgEarthSymbology.dir/objects.a(GEOS.cpp.obj):GEOS.cpp:(.text+0xb0): undefined reference to `geos::geom::PrecisionModel::~PrecisionModel()'
CMakeFiles/osgEarthSymbology.dir/objects.a(GEOS.cpp.obj):GEOS.cpp:(.text+0x20b): undefined reference to `geos::geom::Coordinate::Coordinate(double, double, double)'
CMakeFiles/osgEarthSymbology.dir/objects.a(GEOS.cpp.obj):GEOS.cpp:(.text+0x649): undefined reference to `geos::geom::GeometryFactory::getCoordinateSequenceFactory() const'
CMakeFiles/osgEarthSymbology.dir/objects.a(GEOS.cpp.obj):GEOS.cpp:(.text+0x792): undefined reference to `geos::geom::GeometryFactory::getCoordinateSequenceFactory() const'
CMakeFiles/osgEarthSymbology.dir/objects.a(GEOS.cpp.obj):GEOS.cpp:(.text+0x7d3): undefined reference to `geos::geom::GeometryFactory::getCoordinateSequenceFactory() const'
CMakeFiles/osgEarthSymbology.dir/objects.a(GEOS.cpp.obj):GEOS.cpp:(.text+0x846): undefined reference to `geos::geom::GeometryFactory::getCoordinateSequenceFactory() const'
collect2: error: ld returned 1 exit status
make[4]: *** [lib/libosgEarthSymbology.dll] Error 1</syntaxhighlight>
stock geos.mk shared libraries is bieng built with these options: "-pedantic -ansi", there is also an MXE patch applied to fix static builds too, might be a hint.




{{Building}}
{{Building}}
[[Category:Core developer documentation]]
[[Category:Core developer documentation]]
272

edits

Navigation menu