Board index FlightGear Support osgEarth

[SOLVED] Install osgEarth feature on Win7 64b with FG git  Topic is solved

osgEarth renders the terrain scene by building the textured geometry at runtime from raw source imagery and elevation data. An experimental FlightGear integration is currently available.

Re: Help me! Install osgEarth feature on Win7 64b with FG gi

Postby hamzaalloush » Wed Apr 08, 2015 5:25 pm

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 :wink:
hamzaalloush
 
Posts: 632
Joined: Sat Oct 26, 2013 9:31 am
OS: Windows 10

Re: Help me! Install osgEarth feature on Win7 64b with FG gi

Postby Hooray » Wed Apr 08, 2015 5:53 pm

hamzaalloush wrote in Wed Apr 08, 2015 5:25 pm: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 :wink:


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.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11317
Joined: Tue Mar 25, 2008 8:40 am

Re: Help me! Install osgEarth feature on Win7 64b with FG gi

Postby Catalanoic » Wed Apr 08, 2015 7:29 pm

I also think is better using free software tools to compile it and incidentally make it easier :D
User avatar
Catalanoic
 
Posts: 1052
Joined: Mon Mar 05, 2012 12:33 am
Location: Barcelona (LEBL)
Callsign: Catalanoic
Version: 2017.3
OS: Lubuntu/Windows 7

Re: Help me! Install osgEarth feature on Win7 64b with FG gi

Postby Hooray » Wed Apr 08, 2015 7:39 pm

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
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11317
Joined: Tue Mar 25, 2008 8:40 am

Re: Help me! Install osgEarth feature on Win7 64b with FG gi

Postby elgaton » Wed Apr 08, 2015 9:21 pm

Though I'm (in general) a fan of GCC, I must say I'm against switching to MinGW/MXE as such a switch would make debugging much more difficult under Windows. Specifically, Visual Studio (the Community Edition of which has become free - albeit not FOSS - for open source projects, individual developers and small businesses) has support for the following features:
  • Minidump debugging - VS is able to analyze minidumps (the equivalent of core dumps in the Windows world, and part of the crash reports we're currently getting) natively; as far as I know, no GCC-based tool is able to interpret them.
  • Edit and continue - it is possible to edit C++ code in the IDE, while the program is running, and have it executed immediately without recompiling the whole executable completely.
  • Intelligent tooltips showing variable values/structures/method signatures. (The closest I've come so far in a Linux environment is the debugging support in Qt Creator.)
Moreover, the headers in the Windows SDK are more commented than their MinGW counterparts (which is, in my opinion, a nice advantage).

In short, switching to a different toolchain would probably kill post-mortem debugging under Windows and make "normal" debugging more difficult. (The X-Plane developers themselves used to compile their tools using MinGW, but they recently switched to Visual Studio for these reasons).

Regarding the VS2013 compilation errors in Boost and OSG, upgrading those libraries should fix them as the versions in use by the Windows build were published before the compiler was released (I'm going to get the latest sources tomorrow, when I'll be on a broadband connection, to test this personally; I've already compiled FG using their latest stable versions under Arch Linux with no problems). I've also encountered some unrelated errors, but I think they can be fixed with some small patching.

The main issue is getting the superbuild to manage and handle all dependencies correctly - I'll be posting a thread to the -devel mailing list with some requests for feedback.
NIATCA 2nd admin, regular ATC at LIPX and creator of the LIPX custom scenery
elgaton
 
Posts: 1107
Joined: Tue Mar 19, 2013 4:58 pm
Callsign: I-ELGA/LIPX_TW
Version: Git
OS: Windows + Arch Linux

Re: Help me! Install osgEarth feature on Win7 64b with FG gi

Postby wlbragg » Thu Apr 09, 2015 1:08 am

such a switch would make debugging much more difficult under Windows

Not only that, but your also asking a good number of users of MSVC to install another set of programming tools.
Maybe MinGW/MXE in addition to VS2013 would be a real plus.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4772
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Help me! Install osgEarth feature on Win7 64b with FG gi

Postby Hooray » Thu Apr 09, 2015 1:38 am

I wasn't suggesting a "switch" at all - I was merely responding to the previous comments that building FG is obviously so much easier on Linux than it is on Windows.
Your feedback is entirely valid - however, I'd say that 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.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11317
Joined: Tue Mar 25, 2008 8:40 am

Re: Help me! Install osgEarth feature on Win7 64b with FG gi

Postby elgaton » Thu Apr 09, 2015 12:39 pm

I agree completely, introducing cross-compiling support could be a good idea.
NIATCA 2nd admin, regular ATC at LIPX and creator of the LIPX custom scenery
elgaton
 
Posts: 1107
Joined: Tue Mar 19, 2013 4:58 pm
Callsign: I-ELGA/LIPX_TW
Version: Git
OS: Windows + Arch Linux

Re: Help me! Install osgEarth feature on Win7 64b with FG gi

Postby hamzaalloush » Fri Apr 17, 2015 5:45 am

hello, there seems to be a growing interest in including osgEarth in the superbuild recently, check mailing list

so where are we currently, unfortunatly i was unable to do my part because the SDK has failed to even download the required lib's using the online installer, that's my quip. but i'll try again and can even fall back to VM if neccessary.

so has there been any other progress? we know elgaton has intention of porting the superbuild to be compiled using a recent version of VS. does this conflict with our effort, so we have to participate there instead?

p.s: i tried using mingw, it was amazing, but i didn't feel to compile even OSG since that requires a ton of libraries that made it a chore personally. but it is do-able(i did this in the Arch days), i can keep going untill i have an FG binary if you guys encourage me to do so. obviously not undermining the debuging features of VS... but alot of people were content with running GCC and fallback to GDB for debugging in Linux, so it isn't the "worst" thing to do.
hamzaalloush
 
Posts: 632
Joined: Sat Oct 26, 2013 9:31 am
OS: Windows 10

Re: Help me! Install osgEarth feature on Win7 64b with FG gi

Postby Hooray » Fri Apr 17, 2015 10:01 am

hamzaalloush wrote in Fri Apr 17, 2015 5:45 am: i tried using mingw, it was amazing, but i didn't feel to compile even OSG since that requires a ton of libraries that made it a chore personally. but it is do-able(i did this in the Arch days), i can keep going untill i have an FG binary if you guys encourage me to do so. obviously not undermining the debuging features of VS... but alot of people were content with running GCC and fallback to GDB for debugging in Linux, so it isn't the "worst" thing to do.


mxe is based on mingw, and comes with all libraries required for cross-compilation included, including even OSG 3.x as far as I can tell
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11317
Joined: Tue Mar 25, 2008 8:40 am

Re: Help me! Install osgEarth feature on Win7 64b with FG gi

Postby elgaton » Fri Apr 17, 2015 10:12 am

hamzaalloush wrote in Fri Apr 17, 2015 5:45 am:so where are we currently, unfortunatly i was unable to do my part because the SDK has failed to even download the required lib's using the online installer, that's my quip. but i'll try again and can even fall back to VM if neccessary.

The Windows 7.1 SDK (the version currently supported by the FG build process) is available as an ISO image. On the contrary, the Windows 8.1 SDK is available only via Web download, but you can install it offline by:
  • running the setup program on a machine with a good connection and choosing to "Download the files for installation on another computer", or
  • extracting the "setup manifest" from the setup program and downloading the files manually (let me know if you want to go that route so that I can prepare the full list of files).

hamzaalloush wrote in Fri Apr 17, 2015 5:45 am:so has there been any other progress? we know elgaton has intention of porting the superbuild to be compiled using a recent version of VS. does this conflict with our effort, so we have to participate there instead?

Right now I'm working on a VS2010 + Windows 7 SDK VM to fix some minor issues/cosmetic additions. Regarding the superbuild and VS2013 compilation fixes, I think I'll work on a temporary fork for now and include the changes at the beginning of the next build cycle (unfortunately, fixing compilation problems under VS involves switching to more recent OpenSceneGraph and Boost versions, which is not exactly optimal at this point in time, considering that we're going to enter the feature freeze phase in two months; moreover, I'm also working on my master's thesis right now, which means I can't devote much time to FG). Therefore, feel free to work on the existing CMake infrastructure.
NIATCA 2nd admin, regular ATC at LIPX and creator of the LIPX custom scenery
elgaton
 
Posts: 1107
Joined: Tue Mar 19, 2013 4:58 pm
Callsign: I-ELGA/LIPX_TW
Version: Git
OS: Windows + Arch Linux

Re: Help me! Install osgEarth feature on Win7 64b with FG gi

Postby hamzaalloush » Sat Apr 18, 2015 6:06 pm

@wlbragg, we haven't heard from you, have you been able to build FG osgEarth branch?

@poweroftwo, i see you project on SF, you still don't have sources uploaded other than fgmeta-osgearth, you mentioned that you ported to 3.4 on the mailing-list, but i only see commit refrences leading to pre 3.2 in that fork of fgmeta(ex. flightgear @ 98c053792e1)
https://gitlab.com/poweroftwo/fgmeta-osgearth/tree/OsgEarthNext

@hooray, thank you for your advice on mxe, i was able to retrieve all packages on my linux, ready to cross compile, now attempting to either build osg as static libs, or dynamic libs with SIMGEAR initially as a start, i have a Windows box aside my to test right now. mxe only provides OSG 3.1.9 though, so won't pass the least version check for Simgear 3.5( Could NOT find OpenSceneGraph: Found unsuitable version "3.1.9", but
required is at least "3.2.0" )

mxe is beautiful, i can simply upgrade my lib packages in a config file, here is an example of what is the OSG package in MXE:

openscenegraph.mk
Code: Select all
# This file is part of MXE.
# See index.html for further information.

PKG             := openscenegraph
$(PKG)_IGNORE   :=
$(PKG)_VERSION  := 3.1.9
$(PKG)_CHECKSUM := 400794c0a4a568110f28ad89513df66f2f8121b3
$(PKG)_SUBDIR   := OpenSceneGraph-$($(PKG)_VERSION)
$(PKG)_FILE     := OpenSceneGraph-$($(PKG)_VERSION).zip
$(PKG)_URL      := http://www.openscenegraph.org/downloads/developer_releases/$($(PKG)_FILE)
$(PKG)_DEPS     := gcc boost curl dcmtk ffmpeg freetype gdal giflib gta jasper jpeg libpng openal openexr poppler qt tiff xine-lib zlib

define $(PKG)_UPDATE
    $(WGET) -q -O- 'http://www.openscenegraph.org/downloads/developer_releases/?C=M;O=D' | \
    $(SED) -n 's,.*OpenSceneGraph-\([0-9][^<]*\)\.zip.*,\1,p' | \
    $(SORT) -V | \
    tail -1
endef

define $(PKG)_BUILD
    cd '$(1)' && cmake . \
        -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \
        -DCMAKE_CXX_FLAGS=-D__STDC_CONSTANT_MACROS \
        -DCMAKE_HAVE_PTHREAD_H=OFF \
        -DPKG_CONFIG_EXECUTABLE='$(PREFIX)/bin/$(TARGET)-pkg-config' \
        -DDYNAMIC_OPENTHREADS=OFF \
        -DDYNAMIC_OPENSCENEGRAPH=OFF \
        -DBUILD_OSG_APPLICATIONS=OFF \
        -DPOPPLER_HAS_CAIRO_EXITCODE=0 \
        -D_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS_EXITCODE=1
    $(MAKE) -C '$(1)' -j '$(JOBS)' install VERBOSE=1
endef

$(PKG)_BUILD_x86_64-w64-mingw32 =
$(PKG)_BUILD_i686-w64-mingw32 =


my toolchain is all setup with CMake too!
Code: Select all
set(CMAKE_SYSTEM_NAME Windows)
set(MSYS 1)
set(BUILD_SHARED_LIBS OFF)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_FIND_ROOT_PATH /home/hamza/build/mxe/usr/i686-pc-mingw32)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_C_COMPILER /home/hamza/build/mxe/usr/bin/i686-pc-mingw32-gcc)
set(CMAKE_CXX_COMPILER /home/hamza/build/mxe/usr/bin/i686-pc-mingw32-g++)
set(CMAKE_Fortran_COMPILER /home/hamza/build/mxe/usr/bin/i686-pc-mingw32-gfortran)
set(CMAKE_RC_COMPILER /home/hamza/build/mxe/usr/bin/i686-pc-mingw32-windres)
set(HDF5_C_COMPILER_EXECUTABLE /home/hamza/build/mxe/usr/bin/i686-pc-mingw32-h5cc)
set(HDF5_CXX_COMPILER_EXECUTABLE /home/hamza/build/mxe/usr/bin/i686-pc-mingw32-h5c++)
set(PKG_CONFIG_EXECUTABLE /home/hamza/build/mxe/usr/bin/i686-pc-mingw32-pkg-config)
set(QT_QMAKE_EXECUTABLE /home/hamza/build/mxe/usr/i686-pc-mingw32/qt/bin/qmake)
set(CMAKE_INSTALL_PREFIX /home/hamza/build/mxe/usr/i686-pc-mingw32 CACHE PATH "Installation Prefix")
set(CMAKE_BUILD_TYPE Release CACHE STRING "Debug|Release|RelWithDebInfo|MinSizeRel")
Last edited by hamzaalloush on Sat Apr 18, 2015 6:13 pm, edited 1 time in total.
hamzaalloush
 
Posts: 632
Joined: Sat Oct 26, 2013 9:31 am
OS: Windows 10

Re: Help me! Install osgEarth feature on Win7 64b with FG gi

Postby hamzaalloush » Sat Apr 18, 2015 6:10 pm

@elgaton, thank you for the informative answer, the offline installer is the way to go for me now, i didn't know then.

what do you mean about working the CMake infrastructure? are there specific changes you want to do?
hamzaalloush
 
Posts: 632
Joined: Sat Oct 26, 2013 9:31 am
OS: Windows 10

Re: Help me! Install osgEarth feature on Win7 64b with FG gi

Postby Hooray » Sat Apr 18, 2015 6:12 pm

hamzaalloush wrote in Sat Apr 18, 2015 6:06 pm:I was able to retrieve all packages on my linux, ready to cross compile, now attempting to either build osg as static libs, or dynamic libs with SIMGEAR initially as a start, i have a Windows box aside my to test right now. mxe only provides OSG 3.1.9 though, so won't pass the least version check( Could NOT find OpenSceneGraph: Found unsuitable version "3.1.9", but
required is at least "3.2.0" )


You need to use the non-stable branch (=master), as per:
Subject: Help me! Install osgEarth feature on Win7 64b with FG git
Hooray wrote: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)
https://github.com/mxe/mxe


If there are any remaining issues building osg/sg/fg, I would just report an issue and provide your log file - the mxe folks are usually pretty responsive and can fix things quickly.
In fact, you could even create/provide your own mxe config files for plib/simgear to simplify the whole build setup
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11317
Joined: Tue Mar 25, 2008 8:40 am

Re: Help me! Install osgEarth feature on Win7 64b with FG gi

Postby hamzaalloush » Sat Apr 18, 2015 6:22 pm

Hooray wrote in Sat Apr 18, 2015 6:12 pm:You need to use the non-stable branch (=master), as per:
Subject: Help me! Install osgEarth feature on Win7 64b with FG git
Hooray wrote: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)
https://github.com/mxe/mxe


than makes sense! shame on me for not reading twice!

Hooray wrote in Sat Apr 18, 2015 6:12 pm:If there are any remaining issues building osg/sg/fg, I would just report an issue and provide your log file - the mxe folks are usually pretty responsive and can fix things quickly.
In fact, you could even create/provide your own mxe config files for plib/simgear to simplify the whole build setup


i'm going to be in contact about this ti that crowd, as they seem ecstatic about all project done through their wonderful tool, so let's start with plib/simgear. thanks!
hamzaalloush
 
Posts: 632
Joined: Sat Oct 26, 2013 9:31 am
OS: Windows 10

PreviousNext

Return to osgEarth

Who is online

Users browsing this forum: No registered users and 0 guests