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