Board index FlightGear Support Compiling

Building for Windows 10, VS, is FGMeta still recommended?

Building FlightGear from source, and in the need for help?

Building for Windows 10, VS, is FGMeta still recommended?

Postby chriscalef » Sat Nov 03, 2018 6:24 pm

I ask because it appears to me that my FGMeta clone might be using OSG 3.2, and I read elsewhere that we need at least 3.4 now. But on further analysis I'm now less sure which version I am actually on, because 3.6 is also mentioned in my console output. Here is the relevant output:

Code: Select all
1>-- Avoiding repeated git clone, stamp file is up to date: 'F:/FlightGear/FlightGear_2018.2.2/flightgear_build/src/OSG-stamp/OSG-gitclone-lastrun.txt'
1>Performing update step for 'OSG'
1>From https://github.com/openscenegraph/osg
1>   0341d6f87..e819ea9c0  OpenSceneGraph-3.6 -> origin/OpenSceneGraph-3.6
1>   7729d38b2..252d600a4  master             -> origin/master
1>Current branch OpenSceneGraph-3.2 is up to date.
1>No patch step for 'OSG'
1>Performing configure step for 'OSG'


So I don't really know if that means I am up to date, or not.

In any event, my build problem is in the plugins section - I died on osgdb_curl, osgdb_gdal, osgdb_ktx, osgdb_ogr, and osgdb_tiff.

Missing headers mostly, but not entirely:

Code: Select all
(osgdb_curl)
src\osg\src\osgplugins\curl\readerwritercurl.cpp(25): fatal error C1083: Cannot open include file: 'curl/curl.h': No such file or directory
...
(osgdb_gdal)
src\osg\src\osgplugins\gdal\datasetlayer.h(20): fatal error C1083: Cannot open include file: 'gdal_priv.h': No such file or directory
...
(osgdb_ktx)
src\osg\src\osgplugins\ktx\readerwriterktx.h(17): error C2371: 'int8_t': redefinition; different basic types
...
(osgdb_ogr)
src\osg\src\osgplugins\ogr\readerwriterogr.cpp(32): fatal error C1083: Cannot open include file: 'gdal_priv.h': No such file or directory
...
(osgdb_tiff)
src\osg\src\osgplugins\tiff\readerwritertiff.cpp(13): fatal error C1083: Cannot open include file: 'tiffio.h': No such file or directory


Any insights or assistance would be most welcome.
Thanks, and keep up the good work!
chriscalef
 
Posts: 279
Joined: Wed Feb 20, 2013 10:28 pm

Re: Building for Windows 10, VS, is FGMeta still recommended

Postby wkitty42 » Sun Nov 04, 2018 12:15 am

chriscalef wrote in Sat Nov 03, 2018 6:24 pm:I ask because it appears to me that my FGMeta clone might be using OSG 3.2, and I read elsewhere that we need at least 3.4 now. But on further analysis I'm now less sure which version I am actually on, because 3.6 is also mentioned in my console output.

OSG 3.6 is problematic... OSG 3.4.2 should be fine... OSG 3.2 is the minimum...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Building for Windows 10, VS, is FGMeta still recommended

Postby Alant » Sun Nov 04, 2018 12:45 am

I have both fg-from-scratch (from fgmeta) and Jenkins based build running here on WIndows. Both use OSG3.4.2. fg-from-scratch downloads and builds OSG as part of its script. I have my own download compiled for the Jenkins based build. The same applies to Boost.
I am using the same installation of Qt5.9.4 for both builds.
I am on Windows 10, MSVC 2017.

I recommend that you put something like this at the start of fg-from-scratch.cmd. It reduces the risk of library Path conflicts.

rem SET PATH=%ROOT_DIR%/vcpkg-git/installed/x64-windows/bin;%PATH%
set PATH=%ROOT_DIR%/Stage/bin;%ROOT_DIR%/vcpkg-git/installed/x64-windows/bin;%PATH%

For daily use I use the Jenkins build system, but may migrate to full time use of fg-from-scratch in order to keep just one set of hopefully consistent 3rd party libraries (maintained by vcpkg) on my system, for use in other projects.
Fg-from-scratch with vcpkg is the only way I have had sucess in getting a working set 3rd party dependancies to build Terragear.
Alant
 
Posts: 1219
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: Building for Windows 10, VS, is FGMeta still recommended

Postby chriscalef » Sun Nov 04, 2018 9:11 pm

Okay, cool, thanks for the responses! Never just simple and easy, is it? :lol: But I didn't try fg-from-scratch yet, I'll definitely give that a shot.

Also, for the benefit of anybody else traveling these roads, here is a helpful response I received from Jonathon R on the devel mailing list:

Hi Chris,
Did you use the fg-from-scratch script contained in fgmeta?

It works very well - I had trouble with the .DLLs, and OSG - what I did was, after I got the working build, but with issues such as not-working OSG-text, I

a) copied every .DLL in a nightly build I downloaded, and copied them into the new bin folder, but only copying the ones that were not already present.
b) copied the OSGPLUGINS and all the OSG DLLs into the bin folder, this time replacing any already present.

You will also need to copy the QT libraries folders from a nightly to your new build if you want the launcher to work.

After I did all this, everything worked, and I have a script that automatically pulls SG and FG, then builds them - then after that, I copy any files modified by the new build.

Hope this helps,
Jonathan
chriscalef
 
Posts: 279
Joined: Wed Feb 20, 2013 10:28 pm

Re: Building for Windows 10, VS, is FGMeta still recommended

Postby Hooray » Sun Nov 04, 2018 10:12 pm

oh well, the joys of building software on Windows. ;-)
Anyway, just for the sake of completeness: A few of us have been tinkering with using a Linux based cross-compiler to build fgfs and its dependencies for Windows using mxe (obviously, we didn't play with some of the more problematic/esoteric build options like the Qt5 launcher yet):

http://wiki.flightgear.org/Building_Fli ... _Compiling
Image

However, last I checked, things looked rather promising - i.e. you can set up mxe to build openscenegraph (e.g. using a VM or docker image) and afterwards, you can just build simgear/flightgear accordingly.

OSG, I actually built a few weeks ago using mxe (on Linux for Windows). SimGear/FlightGear, I haven't yet looked at again. However, some of us have even built osgEarth that way a while ago:

Image

Again, depending on your build settings, YMMV - but compared to the usual pitfalls of building fgfs on/for Windows, you might want to give this a try, with a bit of Linux experience (and horsepower in terms of bandwidth/CPU and RAM), mxe is actually up and running rather quickly, and from then on building osg and sg/fg is comparatively straightforward, because it's "just" a Linux build after all (targeting Windows).

Obviously, any feedback and/or wiki updates would be appreciated. The goal here is to ensure that fgfs and its main dependencies can be built via mxe, and to provide a docker image to get people like you started more easily.

Note that building mxe (and osg) should not require any custom scripts etc - it should just work out of the box. So you should end up with build environment to build osg apps within a few hours (leaving the PC unattended)
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Building for Windows 10, VS, is FGMeta still recommended

Postby chriscalef » Mon Nov 05, 2018 5:51 pm

Ah, cool, thanks Hooray!

That might be my best option, given that I have a dual boot into Ubuntu sitting right here. I don't need the launcher, and I have no strong attachment to building in Windows, I just need a modified executable. (It's not that I *like* beating my head against bricks walls... I only do it when necessary.) :-p
chriscalef
 
Posts: 279
Joined: Wed Feb 20, 2013 10:28 pm

Re: Building for Windows 10, VS, is FGMeta still recommended

Postby Hooray » Mon Nov 05, 2018 6:52 pm

Okay, great - feel free to get in touch should you get stuck somewhere. As you may remember, I tend to favor using the public forum/wiki whenever possible, so that others can contribute and benefit - but don't hesitate to send me a PM if you prefer that.

Should you not have sufficient horsepower available right now, I could probably also hook you up with a shell account on a dedicated root server to build everything there, and just download the binaries.

That being said, I do seem to recall that the mxe build builds entirely static binaries, i.e. no DSOs (DLLs) for now, unless I am am missing something. Obviously, that simplifies things quite a bit.

Anyway, we would love to have more people involved in testing/refining the mxe build, so that windows binaries can be provided more easily. So let us know if you should get stuck at some point.
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Building for Windows 10, VS, is FGMeta still recommended

Postby Hooray » Wed Jun 10, 2020 5:09 pm

Just a little update for people interested in cross compiling FG for Window on Linux: mxe now includes up to date support for:

  • OSG 3.6.3
  • OsgEarth 2.10
  • Plib 1.8.5-rc1
  • Qt 4.8.7

Note that this includes i686/x86_64 builds, including statically and dynamically linked libs.

For details, see: https://mxe.cc/build-matrix.html
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU


Return to Compiling

Who is online

Users browsing this forum: No registered users and 2 guests