| 1 |
[This file is mirrored in both the FlightGear and SimGear packages.] |
| 2 |
|
| 3 |
You *must* have OpenSceneGraph (OSG) installed to build this version of |
| 4 |
FlightGear. |
| 5 |
|
| 6 |
Notice that FlightGear 2.6.0 requires at least version 3.0.0. |
| 7 |
|
| 8 |
You can get the latest version of OSG from: |
| 9 |
|
| 10 |
http://www.openscenegraph.org/ |
| 11 |
|
| 12 |
Build notes: |
| 13 |
|
| 14 |
Unzip the file OpenSceneGraph-x.x.zip and install using the following |
| 15 |
commands: |
| 16 |
|
| 17 |
unzip OpenSceneGraph-x.x |
| 18 |
cd OpenSceneGraph |
| 19 |
ccmake . |
| 20 |
|
| 21 |
[ While running ccmake: press 'c' to configure, press 'c' once more, and |
| 22 |
then press 'g' to generate and exit ] |
| 23 |
|
| 24 |
make |
| 25 |
sudo make install |
| 26 |
|
| 27 |
Also later release versions of OpenSceneGraph can be obtained by |
| 28 |
svn, or you can use the OSG development svn 'trunk', but be warned, |
| 29 |
OSG is always in heavy development, and at certain moments |
| 30 |
in time, it may not compile completely, so, as usual, it is |
| 31 |
recommended that you stay with released versions. |
| 32 |
|
| 33 |
Installation notes: |
| 34 |
|
| 35 |
In some unix/linux distributions, particularly 64-bit |
| 36 |
systems, OSG may install its shared libraries in other than |
| 37 |
/usr/lib, /usr/local/lib or $prefix/lib! |
| 38 |
|
| 39 |
This does not seem to effect binary installation, which is |
| 40 |
to $prefix/bin, nor header installation, which remains |
| 41 |
$prefix/include. Just the shared libraries, and perhaps |
| 42 |
only for 64-bit systems, or higher as, and when available. |
| 43 |
|
| 44 |
The default is /usr/local/lib64 or $prefix/lib64 in |
| 45 |
64-bit systems. This may cause problems with the auto-conf |
| 46 |
tools when configuring and compiling FlighGear, since |
| 47 |
even using the configure option --with-osg=$prefix |
| 48 |
will not 'fix' the problem. |
| 49 |
|
| 50 |
The are various ways to deal with this, which mainly depend |
| 51 |
on whether you just want one version of OSG 'globally' |
| 52 |
installed, or desire to be able to build, and run, FlightGear |
| 53 |
against 'different' versions of OSG. |
| 54 |
|
| 55 |
There is a parameter, -D LIB_POSTFIX= or -D LIB_POSTFIX="" |
| 56 |
which can be passed to cmake OSG to force the OSG library |
| 57 |
installation into the 'standard' "$prefix/lib". |
| 58 |
|
| 59 |
OSG cmake advises of a post installation step - |
| 60 |
$ sudo make install_ld_conf |
| 61 |
which, if available, will add an openscenegraph.conf file |
| 62 |
to the /etc/ld.so.conf.d folder, with the line - |
| 63 |
${CMAKE_INSTALL_PREFIX}lib${LIB_POSTFIX} |
| 64 |
and run 'ldconfig' to add this to the 'cache'. But this |
| 65 |
option does not always seem available. |
| 66 |
|
| 67 |
Configuring SimGear and Flightgear notes: |
| 68 |
|
| 69 |
If you install OSG in other than the 'standard' directories, |
| 70 |
you must add --with-osg=$prefix when configuring |
| 71 |
SimGear and FlightGear. This will cause the auto-conf |
| 72 |
tools to look in $prefix/include for headers, and |
| 73 |
$prefix/lib for libraries, but _NOT_ in 'lib64'! |
| 74 |
|
| 75 |
If the OSG is installed to a unique $prefix directory, then |
| 76 |
it is also possible to make a 'link' entry lib -> lib64 to |
| 77 |
get over this, but obviously this is not available if |
| 78 |
$prefix/lib already exists, and contains entries. |
| 79 |
|
| 80 |
Running fgfs, and others, with OSG shared libraries: |
| 81 |
|
| 82 |
You must also deal with the executable loader being |
| 83 |
able to find the OSG shared libraries when running fgfs, |
| 84 |
and others, through perhaps using :- |
| 85 |
$ export LD_LIBRARY_PATH=/path/to/osg/lib[64][:/other/paths] |
| 86 |
or more permanently using a '.conf' file in the |
| 87 |
/etc/ld.so.conf.d directory, and running |
| 88 |
$ sudo ldconfig -v to update the 'cache'. |