]> git.mxchange.org Git - flightgear.git/blob - README.Linux
da6f0576dc51ec4dff57392da86206abc37ab5a6
[flightgear.git] / README.Linux
1 I.  GENERAL LINUX INSTRUCTIONS
2 ==============================
3
4 This is a short description of the things that need to be done to get
5 FlightGear up and running under Linux.
6
7 1. Prerequisites:
8
9 You need to understand the concepts of 3D acceleration under Linux and
10 the needed libraries. An excellent source of information is the "Linux
11 Quake-HOWTO" which can be found at
12
13        http://www.linuxquake.com
14
15 If anything seem to be wrong with your 3D setup, check there first!
16
17 You need Linux of course (any flavour) and a 3DFX-card (Voodoo1 in my
18 case).  3D rendering without hardware support can force even the
19 fastest PII to its knees.  To make use of the accelerator board you
20 need"
21
22 - the GLIDE library installed. Grab it at:
23
24         http://www.3dfx.com/software/download_glidel.html
25
26   and install. There is even an install script contained that will do
27   things for you. The canonical place for GLIDE is /usr/local/glide,
28   if you prefer another location, you'll have to edit the Makefile for
29   FlightGear by hand. Be sure to read and understand the file
30   /usr/local/glide/README.
31
32 - the MESA library version 3.0 (or greater) installed.
33
34   Grab it at:
35
36                         http://www.mesa3d.org/
37
38   unpack it and run "make linux-glide" in the Mesa directory. Follow
39   the instructions in the README file, take a close look at
40   README.3DFX and play with the demo programs. Relax, rejoice :-)
41
42 - the GLUT library version 3.7 (or greater, aka GameGLUT) installed.
43
44   Grab it at:
45
46         http://reality.sgi.com/opengl/glut3/glut3.html
47
48   Note: glut-3.7 is included with Mesa 3.0 so if you've already
49   grabbed the latest version of mesa, you should have everything you
50   need.
51
52   Alternatively, you can use the 3D-stuff that came along with your
53   Linux distribution. At least RedHat (5.3 and later) and S.u.S.E. 6.0
54   (or later) contain all the things you need.
55
56   - (optional) the 3DFX kernel module.
57
58   Without this thingy installed, access to your accelerator board
59   needs to be SUID root, which bad practice (and a _huge_ security
60   hole). Get the 3DFX module from
61         
62         http://www.xs4all.nl/~carlo17/3dfx/index.html
63
64   and install it:
65
66         mkdir 3dfx
67         cd 3dfx
68         tar xvfz ../Dev3Dfx-2.7.tar.gz 
69         make
70         cp 3dfx.o /lib/modules/`uname -r`/misc
71         mknod /dev/3dfx c 107 0
72         insmod 3dfx
73
74   alternatively, you can get the RPM from there ind use rpm for
75   installation.
76
77   - Steve Baker's plib library.
78
79   get it from    
80
81         http://www.woodsoup.org/projs/plib/ 
82
83   and follow the instructions in README.plib.
84
85   - (optional) the gpc and gfc libraries.
86
87   Read the README.g[fp]c files to understand what they are good for
88   and decide whether you need to download them. If you don't want to
89   build your own sceneries, you might not need them.
90
91 2. Build FlightGear:
92
93 You will need the following files:
94
95         FlightGear-x.xx.tar.gz (source code)
96
97 which can be found under 
98
99               ftp://ftp.flightgear.org/pub/fgfs/Source/
100
101 and the support files located at
102
103              ftp://ftp.flightgear.org/pub/fgfs/Binaries/
104
105 the file is called 
106
107         fgfs-base-x.xx.tar.gz       (data files)
108
109 Ok, now that you got all the stuff, let's proceed towards installation.
110
111 Unpack FlightGear-x.xx.tar.gz using :
112
113         tar xvfz FlightGear-x.xx.tar.gz
114
115 and cd info FlightGear-x.xx. Run:
116
117         ./configure
118
119 and wait a few minutes. configure knows about a lot of options. Have a
120 look at the file INSTALL in the FlightGear source directory to learn
121 about them. If run without options, configure assumes that you will
122 install the data files under /usr/local/lib/FlightGear. Assuming
123 configure finished successfully, simply run
124
125         make
126
127 and wait for the make process to finish. Now become root (for example
128 by using the su command) and type
129
130         make install
131
132 This will install the binaries in /usr/local/bin. Notice that the name
133 of the FlightGear binary is "fgfs".
134
135 Another problem with Linux/Glide is permission-related. All programs
136 accessing the Accelerator board need root permissions (or the kernel
137 module mentioned above installed). I _strongly_ recommend the latter.
138
139
140 3. Install the data files
141
142 Change to /usr/local/lib/FlightGear and unpack the data files:
143
144         tar xvfz WHERE_YOU DOWNLOADED_THE_FILES/fgfs-base-x.xx.tar.gz 
145
146 That's it...
147
148 4. Fly!
149
150 If everything went ok, simply type
151
152         runfgfs
153
154 at the prompt. You should see the FlightGear splash-screen and a few
155 seconds later you'll find youself somewhere in the desert, ready for
156 take-off.
157
158 5. Strange things happen...
159
160 A note on the behaviour of Voodoo boards:
161
162 Your card comes packaged with a loop-through-cable. If you have only
163 one monitor, then the Voodoo will take it over when used. This means
164 that all the applications on your desktop will continue running but
165 you'll only see the FlightGear screen. If your window manager uses a
166 focus-follows-mouse policy, don't move the mouse. If you lose the
167 focus, there's no way to shut down FlightGear graciously! Better
168 solution: Use two monitors, one for your desktop, connect the other
169 one to your accelerator. You'll then get a window on your desktop
170 which manages all keyboard events and you're still able to see your
171 desktop.
172
173 A final note: There are several types of VooDoo cards out there, so be
174 sure to get the correct version of Glide!
175
176 Enjoy!
177
178 6. Conclusion
179
180 I hope this document provides some help. If it does, send virtual/real
181 beer to me, if not flame me!
182
183 Bernhard H. Buckel
184 <buckel@wmad95.mathematik.uni-wuerzburg.de>
185
186
187 II.  RedHat Linux Notes
188 =======================
189
190 Summary: There are known problems with the versions of libstdc++ that
191 ships with both RedHat-5.1 and RedHat-5.2.  You need to upgrade your
192 libstdc++ before attempting to build flight gear on a RedHat system.
193
194 Raymond de Vries <vries@per.nl> writes: I ran into [this] problem on
195 my RedHat 5.2 system (brand new). After some searching I found out
196 that it's got to do with a 'bug' in the stdlibc++ libraries. I picked
197 up libstdc++-2.9.0-2.i386.rpm, installed it and FGFS compiled just
198 fine. However, some other packages must have the libstdc++-2.8
199 libraries....
200
201 BTW I also solved it with the 2.8 libraries by including
202 /usr/include/g++/std/bastring.cc into the example programs. I believe
203 this can be done since it's a template, correct me if I'm wrong.
204
205
206 III.  Linux/AXP Notes
207 ====================
208
209 As of 2/19/99 I'm not aware of any glide port to Linux/AXP so it's
210 software rendering only for now.  :-(
211
212 This following information is contributed by "Daniel J. Frasnelli"
213 <dfrasnel@csee.wvu.edu>
214
215 1) Mesa was not built correctly by default.  I had to add the "-mieee"
216 flag to the Make-config for Mesa-3.1beta1 to fix the problem.  After
217 building and installation, all of the problems I had previously with
218 GL programs under AlphaLinux disappeared.
219
220 2) I also had to set the '-mieee' flag in $CFLAGS before configuring
221 and building FGFS.  The -mieee switch fixes floating point exception
222 handling.
223
224 I heavily optimized both Mesa and FGFS, using the libffm "fast math
225 library for Alpha" in preference over the default libm, sticking all
226 sorts of strange flags in $CFLAGS, etc.  These flags should be
227 adjusted for your specific architecture:
228
229     export CFLAGS="-mieee -mcpu=ev56 -Wa,-m21164a -pipe -g"
230     export CXXFLAGS="-mieee -mcpu=ev56 -Wa,-m21164a -pipe -g"
231     ./configure
232
233