234 lines
7 KiB
Text
234 lines
7 KiB
Text
|
I. GENERAL LINUX INSTRUCTIONS
|
||
|
==============================
|
||
|
|
||
|
This is a short description of the things that need to be done to get
|
||
|
FlightGear up and running under Linux.
|
||
|
|
||
|
1. Prerequisites:
|
||
|
|
||
|
You need to understand the concepts of 3D acceleration under Linux and
|
||
|
the needed libraries. An excellent source of information is the "Linux
|
||
|
Quake-HOWTO" which can be found at
|
||
|
|
||
|
http://www.linuxquake.com
|
||
|
|
||
|
If anything seem to be wrong with your 3D setup, check there first!
|
||
|
|
||
|
You need Linux of course (any flavour) and a 3DFX-card (Voodoo1 in my
|
||
|
case). 3D rendering without hardware support can force even the
|
||
|
fastest PII to its knees. To make use of the accelerator board you
|
||
|
need"
|
||
|
|
||
|
- the GLIDE library installed. Grab it at:
|
||
|
|
||
|
http://www.3dfx.com/software/download_glidel.html
|
||
|
|
||
|
and install. There is even an install script contained that will do
|
||
|
things for you. The canonical place for GLIDE is /usr/local/glide,
|
||
|
if you prefer another location, you'll have to edit the Makefile for
|
||
|
FlightGear by hand. Be sure to read and understand the file
|
||
|
/usr/local/glide/README.
|
||
|
|
||
|
- the MESA library version 3.0 (or greater) installed.
|
||
|
|
||
|
Grab it at:
|
||
|
|
||
|
http://www.mesa3d.org/
|
||
|
|
||
|
unpack it and run "make linux-glide" in the Mesa directory. Follow
|
||
|
the instructions in the README file, take a close look at
|
||
|
README.3DFX and play with the demo programs. Relax, rejoice :-)
|
||
|
|
||
|
- the GLUT library version 3.7 (or greater, aka GameGLUT) installed.
|
||
|
|
||
|
Grab it at:
|
||
|
|
||
|
http://reality.sgi.com/opengl/glut3/glut3.html
|
||
|
|
||
|
Note: glut-3.7 is included with Mesa 3.0 so if you've already
|
||
|
grabbed the latest version of mesa, you should have everything you
|
||
|
need.
|
||
|
|
||
|
Alternatively, you can use the 3D-stuff that came along with your
|
||
|
Linux distribution. At least RedHat (5.3 and later) and S.u.S.E. 6.0
|
||
|
(or later) contain all the things you need.
|
||
|
|
||
|
- (optional) the 3DFX kernel module.
|
||
|
|
||
|
Without this thingy installed, access to your accelerator board
|
||
|
needs to be SUID root, which bad practice (and a _huge_ security
|
||
|
hole). Get the 3DFX module from
|
||
|
|
||
|
http://www.xs4all.nl/~carlo17/3dfx/index.html
|
||
|
|
||
|
and install it:
|
||
|
|
||
|
mkdir 3dfx
|
||
|
cd 3dfx
|
||
|
tar xvfz ../Dev3Dfx-2.7.tar.gz
|
||
|
make
|
||
|
cp 3dfx.o /lib/modules/`uname -r`/misc
|
||
|
mknod /dev/3dfx c 107 0
|
||
|
insmod 3dfx
|
||
|
|
||
|
alternatively, you can get the RPM from there ind use rpm for
|
||
|
installation.
|
||
|
|
||
|
- Steve Baker's plib library.
|
||
|
|
||
|
get it from
|
||
|
|
||
|
http://www.woodsoup.org/projs/plib/
|
||
|
|
||
|
and follow the instructions in README.plib.
|
||
|
|
||
|
- (optional) the gpc and gfc libraries.
|
||
|
|
||
|
Read the README.g[fp]c files to understand what they are good for
|
||
|
and decide whether you need to download them. If you don't want to
|
||
|
build your own sceneries, you might not need them.
|
||
|
|
||
|
2. Build FlightGear:
|
||
|
|
||
|
You will need the following files:
|
||
|
|
||
|
FlightGear-x.xx.tar.gz (source code)
|
||
|
|
||
|
which can be found under
|
||
|
|
||
|
ftp://ftp.flightgear.org/pub/fgfs/Source/
|
||
|
|
||
|
and the support files located at
|
||
|
|
||
|
ftp://ftp.flightgear.org/pub/fgfs/Binaries/
|
||
|
|
||
|
the file is called
|
||
|
|
||
|
fgfs-base-x.xx.tar.gz (data files)
|
||
|
|
||
|
Ok, now that you got all the stuff, let's proceed towards installation.
|
||
|
|
||
|
Unpack FlightGear-x.xx.tar.gz using :
|
||
|
|
||
|
tar xvfz FlightGear-x.xx.tar.gz
|
||
|
|
||
|
and cd info FlightGear-x.xx. Run:
|
||
|
|
||
|
./configure
|
||
|
|
||
|
and wait a few minutes. configure knows about a lot of options. Have a
|
||
|
look at the file INSTALL in the FlightGear source directory to learn
|
||
|
about them. If run without options, configure assumes that you will
|
||
|
install the data files under /usr/local/lib/FlightGear. Assuming
|
||
|
configure finished successfully, simply run
|
||
|
|
||
|
make
|
||
|
|
||
|
and wait for the make process to finish. Now become root (for example
|
||
|
by using the su command) and type
|
||
|
|
||
|
make install
|
||
|
|
||
|
This will install the binaries in /usr/local/bin. Notice that the name
|
||
|
of the FlightGear binary is "fgfs".
|
||
|
|
||
|
Another problem with Linux/Glide is permission-related. All programs
|
||
|
accessing the Accelerator board need root permissions (or the kernel
|
||
|
module mentioned above installed). I _strongly_ recommend the latter.
|
||
|
|
||
|
|
||
|
3. Install the data files
|
||
|
|
||
|
Change to /usr/local/lib/FlightGear and unpack the data files:
|
||
|
|
||
|
tar xvfz WHERE_YOU DOWNLOADED_THE_FILES/fgfs-base-x.xx.tar.gz
|
||
|
|
||
|
That's it...
|
||
|
|
||
|
4. Fly!
|
||
|
|
||
|
If everything went ok, simply type
|
||
|
|
||
|
runfgfs
|
||
|
|
||
|
at the prompt. You should see the FlightGear splash-screen and a few
|
||
|
seconds later you'll find youself somewhere in the desert, ready for
|
||
|
take-off.
|
||
|
|
||
|
5. Strange things happen...
|
||
|
|
||
|
A note on the behaviour of Voodoo boards:
|
||
|
|
||
|
Your card comes packaged with a loop-through-cable. If you have only
|
||
|
one monitor, then the Voodoo will take it over when used. This means
|
||
|
that all the applications on your desktop will continue running but
|
||
|
you'll only see the FlightGear screen. If your window manager uses a
|
||
|
focus-follows-mouse policy, don't move the mouse. If you lose the
|
||
|
focus, there's no way to shut down FlightGear graciously! Better
|
||
|
solution: Use two monitors, one for your desktop, connect the other
|
||
|
one to your accelerator. You'll then get a window on your desktop
|
||
|
which manages all keyboard events and you're still able to see your
|
||
|
desktop.
|
||
|
|
||
|
A final note: There are several types of VooDoo cards out there, so be
|
||
|
sure to get the correct version of Glide!
|
||
|
|
||
|
Enjoy!
|
||
|
|
||
|
6. Conclusion
|
||
|
|
||
|
I hope this document provides some help. If it does, send virtual/real
|
||
|
beer to me, if not flame me!
|
||
|
|
||
|
Bernhard H. Buckel
|
||
|
<buckel@wmad95.mathematik.uni-wuerzburg.de>
|
||
|
|
||
|
|
||
|
II. RedHat Linux Notes
|
||
|
=======================
|
||
|
|
||
|
Summary: There are known problems with the versions of libstdc++ that
|
||
|
ships with both RedHat-5.1 and RedHat-5.2. You need to upgrade your
|
||
|
libstdc++ before attempting to build flight gear on a RedHat system.
|
||
|
|
||
|
Raymond de Vries <vries@per.nl> writes: I ran into [this] problem on
|
||
|
my RedHat 5.2 system (brand new). After some searching I found out
|
||
|
that it's got to do with a 'bug' in the stdlibc++ libraries. I picked
|
||
|
up libstdc++-2.9.0-2.i386.rpm, installed it and FGFS compiled just
|
||
|
fine. However, some other packages must have the libstdc++-2.8
|
||
|
libraries....
|
||
|
|
||
|
BTW I also solved it with the 2.8 libraries by including
|
||
|
/usr/include/g++/std/bastring.cc into the example programs. I believe
|
||
|
this can be done since it's a template, correct me if I'm wrong.
|
||
|
|
||
|
|
||
|
III. Linux/AXP Notes
|
||
|
====================
|
||
|
|
||
|
As of 2/19/99 I'm not aware of any glide port to Linux/AXP so it's
|
||
|
software rendering only for now. :-(
|
||
|
|
||
|
This following information is contributed by "Daniel J. Frasnelli"
|
||
|
<dfrasnel@csee.wvu.edu>
|
||
|
|
||
|
1) Mesa was not built correctly by default. I had to add the "-mieee"
|
||
|
flag to the Make-config for Mesa-3.1beta1 to fix the problem. After
|
||
|
building and installation, all of the problems I had previously with
|
||
|
GL programs under AlphaLinux disappeared.
|
||
|
|
||
|
2) I also had to set the '-mieee' flag in $CFLAGS before configuring
|
||
|
and building FGFS. The -mieee switch fixes floating point exception
|
||
|
handling.
|
||
|
|
||
|
I heavily optimized both Mesa and FGFS, using the libffm "fast math
|
||
|
library for Alpha" in preference over the default libm, sticking all
|
||
|
sorts of strange flags in $CFLAGS, etc. These flags should be
|
||
|
adjusted for your specific architecture:
|
||
|
|
||
|
export CFLAGS="-mieee -mcpu=ev56 -Wa,-m21164a -pipe -g"
|
||
|
export CXXFLAGS="-mieee -mcpu=ev56 -Wa,-m21164a -pipe -g"
|
||
|
./configure
|
||
|
|
||
|
|