Simgear Build

external: index
internal: preamble build downloads ... end

Preamble:

2011-05-09: A relative minor, but quite important update. The previous build of the separate SimGear libraries was using the MS DLL libraries, that is /MD and /MDd. This build is using ONLY the static MS runtime, /MT and /MTd. This coincided with building OSG, PLIB, zlib, etc - that is all the dependencies using the SAME runtime. Failure to ENSURE the SAME runtime is used leads to multiple LINK problems.

2010-12-10: A few times, over the years, I have regretted that SimGear is normally compiled as one big library in Win32, but have always put up with the minor problems this can cause. In other ports it is compiled into some 24 separate libraries, and I have seen some recent moves in the windows build set in the same direction. The advantage of this library 'separation' is that for certain projects, using some of the simgear libraries, the externals like 'boost', 'PLIB', 'OSG',... can be avoided if only certain simgear libraries are used...

The list of simgear libraries is -
bucket, debug, environment, ephem, io, magvar, math, misc, nasal, props, route, scene/bvh, scene/material, scene/model, scene/sky, scene/tgdb, scene/util, screen, serial, sound, structure, threads, timing, xml...

top


The Build

To do the WIN32 MSVC build, I chose to use my amsrcs.pl perl scripts to generate the MSVC build files. This means I am no longer in need of an updated MSVC7, 8, 9, 10, ... set of build files, although, thanks to an increasing number of developers using and running windows, the SG build set is usually quite up-to-date. But I like this independence, rather than the game of chasing your tail ;=))

My 'amsrcs04' script is a massive re-write of the venerable am2dsp.pl, written by Curt yonks ago, that I think, has now been (sadly) removed from the GIT repository. It starts by reading, and parsing the configure.ac (or configure.in), seeking out the AC_OUTPUT(), and other things, to get the Makefile.am set. Each Makefile.am is then processed, and a DSP file written to build its components, libraries or binaries... then puts all that into a DSW file that can be loaded by any version of MSVC, and converted...

Of course, Curt's original am2dsp.pl only output a single SimGear.dsp, and dsw file, while this new amsrcs.pl version works on the same principles as the unix auto-tools... it writes a DSP file for each 'binary' designated in the particular Makefile.am file... even makes some effort to understand library dependencies, and adds these to the DSW output... so in effect splits simgear into all its parts...

Now that I have all the Makefile.am 'project' information in a set of perl hashes, it would also be relatively easy to have the script output a particular version of the later MSVC build file sets, but that has not been done. However, it would have to be done to support windows 64-bit compiling, since this option is not available in the now old MSVC6 DSW/DSP build files. Maybe when I get my new Windows 7 64-bit machine for the Dec/Jan holiday season ;=))

The build went relatively smoothly, after I remembered to make a simgear_config.h file ;=)). Just copied one of the simgear_config.h.[???] files for this... Ran into some trouble with some of the windows 'test' executables, like a missing SRC_DIR define... The script had done a reasonable job with many of the SG library dependencies, but some others like zlib, ... have to be accounted for...

And I could not help adding some code to decode_binobj to show how easy it is in SG to convert Cartesian coordinate to wsg84... to me the output looks 'better' than just a set of numbers... but this increased the dependence to include libsgmath, and libsgstructure... so that took a little longer to work out...

Test Binaries : bvhtest, decode_binobj, lowtest, openal_test1, openal_test2, openal_test3, openal_test4, propertyObject_test, props_test, routetest, SGGeometryTest, SGMathTest, socktest, tcp_client, tcp_server, testmagvar, testserial, waytest, ...

I did not do much testing of these, except as mentioned the mods in decode_binobj. Starting tcp_server, then tcp_client showed these had 'connected' and pass the 'hello' message... started to modify the openal test set to NOT be dependant on a fixed location of 'jet.wav' file, so I could run them... at least heard the sound in the first test, but did not fully pursue the others...

Now of course it remains to be seen how much use I get out of using these separate libraries ;=)) but the build experience was fun...

top


Downloads

RUN WEB EXECUTABLES AT YOUR OWN RISK!
Also each of these is using the /MT /MTd runtime, but erroneously got named 'MD'

Date Link Size MD5
2011/05/09 SG-01-MD-msvc.zip 139,826 7615e566131014603f51731bac89e74a
2011/04/02 SG-01-MD-bin.zip 5,529,611 c44a0b2b7f700f61692ba7c1f75b0875
2011/04/01 SG-01-MD-lib.zip 29,905,779 0e85a27498cfa3005631a88ad137ea9f
2011/04/01 SG-01-MD-src.zip 1,274,130 ad25fe45a8ba0c0a07b5ecb8e96ae623

Description of downloads...

File Description
SG-01-MD-msvc.zip Contents of my 'msvc' build folder. Contains the MSVC DSW/DSP, and MSVC8 sln/vcproj  build files, and a simgear-config.h, plus other things... Download this and unzip it into the source of SimGear, in the folder 'msvc' and start building, after you have attended to the external dependencies...
SG-01-MD-src.zip My slightly modified source, but only in the 'test' executables. NOT essential or important.
SG-01-MD-lib.zip Set of Debug and Release static SG libraries, built with MSVC8 in windows XP 32-bits, USING the MS 'static' runtime, /MT and /MTd.
SG-01-MD-bin.zip Except for reviewing how-it-is-done in the code, this is a rather does nothing set of 'test' applications that use and test some parts of the SimGear library suite.

A reminder that failure to ensure EACH and EVERY dependency is also built using the MS 'static' runtime, /MT /MTd, leads to catastrophic MSVC LINK errors. Although the linker can suggest this can be 'fixed' by deliberately EXCLUDING certain libraries from the link, this is VERY misleading ;=((. The ONLY solution is to make sure EVERY dependency used in the link process has the SAME 'static' runtime ... the ONLY possibility for full success ;=((.

top


Older DLL (/MD and /MDd versions)

Date Link Size MD5
2010/12/10 SG-01-msvc.zip 63,074 910993d10eaa9d3eea208457d872dd36
2010/12/10 SG-01-bin.zip 3,829,547 4ce8e895ef414a1c571808431aabda72
2010/12/10 SG-01-src.zip 1,153,518 f0dc230e239977132f5b2862dcfa7b1f
2010/12/10 SG-01-3rd.zip 27,804,371 0c391a4625074f8d235807bbb44ce0ef
2010/12/10 SG-01-lib.zip 22,010,731 0bf8101ba75c5ea6d2ced523b0130703

Description of downloads...

File Description
SG-01-msvc.zip Contents of my 'msvc' build folder. Contains the MSVC DSW/DSP build files, and a config.h, plus other things... Download this and unzip it into the source of SimGear, and start building, after you have attended to the external dependencies...
SG-01-src.zip My slightly modified source, but only in the 'test' executables. NOT essential or important.
SG-01-lib.zip Set of Debug and Release static SG libraries, built with MSVC8 in windows XP 32-bits.
SG-01-3rd.zip Zip of my Dell01:C:\FG\28\3rdparty folder, with lots of 'goodies'... includes part boost and osg includes... and simgear, plus examples of the monolithic single simgear.lib...
SG-01-bin.zip Except for reviewing how-it-is-done in the code, this is a rather does nothing set of 'test' applications that use and test some parts of the SimGear library suite.

top


Dependencies

The two main external dependencies are 'Boost', <http://www.boost.org/>, and 'OpenSceneGraph (OSG)', <http://www.openscenegraph.org/>, and these can not really be reduced, although I have tried, especially with boost.

At my last boost trunk update, July 2010, version 1_44, the full boost trunk download was 85000 plus files, 400MB, boost_1_44.zip, so I keep a sub-set, of some 750 files, just 4MB, boost-15.zip, and add to this small sub-set when ever the compiler requests something new... tedious, but the only way to save a few bytes ;=() Also my boost-15.zip contains a small fix to avoid a #pragma comment ( lib, "boostserialization.lib" ) in one of the boost headers.

Others are -
- GLUT - via freeglut static in my case;
- a sound library, here I use the OpenAL SDK to provided <AL/al.h>, alut, in my case built from the ALUT source available when downloading the OpenAL SDK, for <AL/alut.h>;
- png/zlib (libpng, zlib) - included through the SG-01-3rd.zip, but only needed if some of the 'test' applications that are also built.
- PLIB - SimGear has been gradually moving away from PLIB... and in fact one small change was to remove a now not needed <plib/sg.h> reference in one of the 'tests' files, I IRC.

External sources used in this build, but per the links given above, it is better to download from their respective home sties... and thus get any later versions available at the time...

Date Link Size MD5
2010/12/01 boost-15.zip 926,179 ebfd46dc791f182a0dfe964cc653b568
2010/08/03 OSG-2.9.9.zip 3,955,733 0e152a430f98bda9250f442beb8aa67d
2010/07/02 freeglut-src-15.zip 429,237 2c50603d0085eea3bc2b309f19ba3ae7
2010/07/02 alut-src-15.zip 168,200 cb89488d1c5d2495c5b6bbf5fed37a85
2010/07/02 zlib-1.2.3-src-15.zip 587,779 cb4095ac13166bb7b4a750f4a659d6ac
2010/07/02 lpng-src-15.zip 631,823 679f817f4c0c8c8c82d770a5159077b4
2010/07/02 PLIB-src-15.zip 4,154,891 8ea760dda237cefca5f494d90865d516
The full boost zip, to top up anything found missing in boost-15.zip above
2010/07/31 boost_1_44.zip 61,911,411 c5c37f1c2b4d11fd921c7483c5432d61

Onwards, and upwards...

top


EOP - sg-01.htm

checked by tidy  Valid HTML 4.01 Transitional