Added support for ATI viewport hack
[flightgear-website.git] / fgcom.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3 <head>
4         <title>Quix0r&#39;s FlightGear Webpage - Compilation hints for FGCOM</title>
5         <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
6         <meta http-equiv="content-style-type" content="text/css" />
7         <meta http-equiv="content-script-type" content="text/javascript" />
8         <meta http-equiv="content-language" content="en-US" />
9         <meta http-equiv="imagetoolbar" content="no" />
10         <meta name="resource-type" content="document" />
11         <meta name="distribution" content="global" />
12         <meta name="copyright" content="2013, Roland Haeder, CC-BY-SA 3.0" />
13         <meta name="keywords" content="FlightGear, Flight, Gear, Aircraft, Airplane, Plane, Flight, Sim, Simulator, FlightSimulator, GPL, FG, FGFS, Earth, Free, Opensource, YASim, JSBSim, Help, Support" />
14         <meta name="description" content="Quix0r&#39;s FlightGear Webpage" />
15
16         <link rel="search" type="application/opensearchdescription+xml" title="YaCy Search 'zulu289'" href="http://yacy-websuche.mxchange.org:8090/opensearchdescription.xml" />
17         <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
18 </head>
19
20 <body>
21
22 <center><big><big><strong>Compilation hints for FGCOM</strong></big></big></center>
23
24 <p>
25         I had some trouble compiling <a rel="external" target="_blank" href="http://wiki.flightgear.org/index.php/FGCOM">FGCOM</a>
26         on my machine and which tag/branch/trunk I <i>should</i> compile. Here I would like to share my experiences with you and to
27         save you a lot time.
28 </p>
29
30 <p>
31         First of all, I cannot give you support for FGCOM. I am not a C++ hacker, so please understand me. But I did fix some parts
32         in FGCOM where you might not know how to continue. I have a Debian Unstable (sqeeze/sid at the moment of creating this
33         document) with GCC 4.3.4 (works great for compiling FGFS, FGCOM!). So you might check first, which compiler you have.
34 </p>
35
36 <p>
37         Then I have found out, you need some extra packages and my fix for a successfull compilation of FGCOM. But wait! Which one
38         now? The trunk is in bad shape (revision 226). So I took the branch <strong>fgcom3</strong> here. But before you can begin,
39         you need to check-out the repository:
40 </p>
41
42 <p>
43         <pre>svn co https://appfgcom.svn.sourceforge.net/svnroot/fgcom/branches/fgcom3</pre>
44 </p>
45
46 <p>
47         The next thing is the extra packages. I need <strong>libgnet2, libgnet-dev, liboggz2_1, liboggz2-dev</strong> to get
48         installed before I can finish compilation. That wasn't very hard for now. :-) So let's head over to compilation:
49 </p>
50
51 <p>
52         <pre>cd fgcom3
53 $EDITOR Makefile</pre>
54 </p>
55
56 <p>
57         Insert any favorite text editor for $EDITOR. For my setup, I need to change the installation path and the LDFLAGS variable.
58         The shown values below are only new values
59 </p>
60
61 <p>
62         <pre>[...]
63 INSTALL_BIN:=/opt/bin
64 INSTALL_DIR:=/opt/fgcom
65 [...]
66 LDFLAGS:=-L$(INSTALL_DIR)/lib
67 [...]</pre>
68 </p>
69
70 <p>
71         The LDFLAGS line contains a space in the unmodified version which my linker doesn't like. So I need to hack that away.
72 </p>
73
74 <p>
75         Now it is time to compile. Do a <i>make</i> in the fgcom3 directory. If you run in trouble, e.g. of missing or wrong spaces
76         between -L and /some/foo/path (maybe /opt/fgcom/lib?) then add or remove it like requested by the linker. Do a
77         <i>make clean</i> to cleanup everthing. Simply <i>make</i> won't give you what you want (you need cleanup). After
78         successfully building fgcom (no error line at the end) you should now see an executable file &quot;fgcom&quot; in the path
79         (do a <i>ls -l</i>). Well done! :-) Now, do a <i>make install</i> as a user with proper permission to write to the
80         installation paths) and you are nearly done.
81 </p>
82
83 <p>
84         If you have changed installation paths, you maybe will get an error message complaining about missing library files. YICKS!
85         We forgot to tell the dynamic linker, where our libs are, they went to /opt/fgcom/lib which is an unknown lookup path to
86         the linker.
87 </p>
88
89 <p>
90         We need to help the linker finding the libs by creating a new file for ldconfig, let's say fgcom.conf, so the new library
91         path <i>/opt/fgcom/lib</i> is known to the dynamic linker. Here you can find my version (very simple):
92 </p>
93
94 <p><pre>
95 /opt/fgcom/lib
96 </pre></p>
97
98 <p>
99         Place that file into /etc/ld.conf.d/ as root. Now re-run <strong>ldconfig</strong> and fgcom (placed in /opt/bin) should not
100         complain about missing libraries. Now, try the loop-back test as described <a rel="external" target="_blank"
101          href="http://wiki.flightgear.org/index.php/FGCOM_Testing">here</a>.
102 </p>
103
104 <p>
105         <big><strong>Meet you in FGFS. :)</strong></big>
106 </p>
107
108 <p>
109         PS: My manually mirrored download archive for FlightGear can be found
110         <a href="pub/" target="_blank">here</a>. So take a look around. :)
111 </p>
112
113 <p align="center">
114         <small>
115                 Created: <strong>2009-12-06</strong> |
116                 Last update: <strong>2013-02-22</strong> |
117                 Author: <a href="mailto:roland_NOSPAM_@_REMOVE_THIS_mxchange_AND_THIS_.org">Roland H&auml;der</a><br />
118                 <a href="index.html">Home</a> |
119                 <a href="flights.html">My flights</a> |
120                 <a href="fgdata-bundle.html">fgdata.bundle</a> |
121                 <em>FGCOM</em> |
122                 <a href="rsync.html">Rsync howto</a> |
123                 <a href="links.html">Links collection</a> |
124                 <a href="imprint.html">Imprint</a>
125         </small>
126 </p>
127
128 <p>
129         <a rel="license" target="_blank"
130          href="http://creativecommons.org/licenses/by-sa/3.0/deed.en_US"><img
131          alt="Creative Commons License" style="border-width:0"
132          src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br />
133         <span xmlns:dct="http://purl.org/dc/terms/" href="http://purl.org/dc/dcmitype/Text"
134          property="dct:title" rel="dct:type">Quix0r&#39;s FlightGear Website</span> by <a
135          xmlns:cc="http://creativecommons.org/ns#" href="http://flightgear.mxchange.org"
136          property="cc:attributionName" rel="cc:attributionURL">Roland Haeder</a> is
137         licensed under a <a rel="license" target="_blank"
138          href="http://creativecommons.org/licenses/by-sa/3.0/deed.en_US">Creative Commons
139         Attribution-ShareAlike 3.0 Unported License</a>.<br />
140         Based on a work at <a xmlns:dct="http://purl.org/dc/terms/" target="_blank" rel="dct:source"
141          href="http://flightgear.mxchange.org/repos/flightgear/trunk/">http://flightgear.mxchange.org/repos/flightgear/trunk/</a>.
142 </p>
143
144 </body>
145 </html>