1998-07-30 23:40:42 +00:00
|
|
|
If you are reading this in hopes that you will find the answer to a
|
1999-04-22 18:45:16 +00:00
|
|
|
specific question, please send the question to curt@flightgear.org and
|
1998-07-30 23:40:42 +00:00
|
|
|
suggest that I include the answer here.
|
|
|
|
|
|
|
|
|
1999-04-22 18:45:16 +00:00
|
|
|
I. Compilers and Portability
|
|
|
|
============================
|
1998-12-03 01:11:20 +00:00
|
|
|
|
|
|
|
Flight Gear is known to build with egcs-1.1 and higher, as well as
|
|
|
|
gcc-2.8 and higher. Your mileage may vary with earlier versions of
|
|
|
|
these compilers although support for gcc-2.7.x is mostly there.
|
|
|
|
|
|
|
|
For other platforms where you may have access to native compilers,
|
|
|
|
again your mileage may vary. We would like to support as many
|
|
|
|
different compilers and platforms as possible. Please relay any
|
|
|
|
changes you make (or problems you encounter) back to
|
|
|
|
curt@flightgear.org, so that in the future we can better support your
|
|
|
|
platform and your compiler. I have access to a few different
|
|
|
|
platforms, but I must depend on others to make sure their favorite
|
|
|
|
platform and compiler is well supported.
|
|
|
|
|
|
|
|
|
1999-04-22 18:45:16 +00:00
|
|
|
II. GLUT
|
|
|
|
========
|
1998-07-30 23:40:42 +00:00
|
|
|
|
1998-08-26 22:30:02 +00:00
|
|
|
Flight Gear requires GLUT version 3.7 or later (aka GameGLUT._ GLUT
|
|
|
|
needs to be installed on your system before you can build Flight Gear.
|
|
|
|
GLUT can be found at:
|
1998-07-30 23:40:42 +00:00
|
|
|
|
|
|
|
http://reality.sgi.com/opengl/glut3/glut3.html
|
|
|
|
|
|
|
|
GLUT (pronounced like the glut in gluttony) is the OpenGL Utility
|
|
|
|
Toolkit, a window system independent toolkit for writing OpenGL
|
|
|
|
programs. It implements a simple windowing application programming
|
|
|
|
interface (API) for OpenGL. GLUT makes it considerably easier to learn
|
|
|
|
about and explore OpenGL programming. GLUT provides a portable API so
|
|
|
|
you can write a single OpenGL program that works on both Win32 PCs and
|
|
|
|
X11 workstations.
|
1999-02-01 21:08:13 +00:00
|
|
|
|
|
|
|
|
1999-04-22 18:45:16 +00:00
|
|
|
III. Joystick Support
|
|
|
|
=====================
|
1999-02-01 21:08:13 +00:00
|
|
|
|
|
|
|
GLUT only has win32 joystick support but even at that, it is not well
|
|
|
|
implimented. So we use Steve Backer's joystick library when possible,
|
|
|
|
and fall back to GLUT for win32 until Steve's library adds win32
|
|
|
|
support.
|
|
|
|
|
|
|
|
To make sure joystick support is included when building under Linux:
|
|
|
|
|
|
|
|
- make sure you have the proper joystick module installed.
|
|
|
|
- make sure the proper devices are created in /dev.
|
|
|
|
- /usr/include/linux/joystick.h must exist on your system.
|
1999-02-26 22:06:53 +00:00
|
|
|
|
|
|
|
|
1999-04-22 18:45:16 +00:00
|
|
|
IV. Procedure to build FGFS with Native SGI Irix Compilers from CVS Sources
|
|
|
|
===========================================================================
|
|
|
|
|
1999-10-08 00:26:46 +00:00
|
|
|
(Contributed by Todd Smith <msmith@sikorsky.com> with modifications
|
|
|
|
and updates by Curt Olson)
|
1999-04-22 18:45:16 +00:00
|
|
|
|
1999-10-08 00:26:46 +00:00
|
|
|
Download the latest version of plib (1.0.18) from:
|
1999-04-22 18:45:16 +00:00
|
|
|
|
|
|
|
http://www.woodsoup.org/~sbaker/plib/
|
|
|
|
|
1999-10-08 00:26:46 +00:00
|
|
|
Configure it with the default prefix of /usr/local which places
|
1999-08-07 18:22:03 +00:00
|
|
|
everthing in a tree rooted at /usr/local/plib:
|
1999-04-22 18:45:16 +00:00
|
|
|
|
1999-08-07 18:22:03 +00:00
|
|
|
sh$ CC="cc -Xcpluscomm" CXX=CC ./configure
|
|
|
|
|
1999-10-08 00:26:46 +00:00
|
|
|
*Before* running make, fix up the plib Makefiles using the script
|
|
|
|
provided with the Flight Gear distribution:
|
|
|
|
|
|
|
|
find . -name Makefile -exec .../src/FlightGear-0.7.x/irix-hack.pl {} \;
|
|
|
|
|
|
|
|
This applies a fix in all the Makefiles to the lib creation command
|
|
|
|
(to use CC -ar rather than ar) as per a tip in the SGI pipeline
|
|
|
|
periodical.
|
|
|
|
|
|
|
|
Now, make and install plib.
|
|
|
|
|
|
|
|
Download the latest fgfs source snapshot from:
|
|
|
|
|
|
|
|
ftp://ftp.flightgear.org/pub/fgfs/Source/Snapshots/
|
|
|
|
|
|
|
|
Configure and build fgfs as you did plib:
|
|
|
|
|
|
|
|
sh$ CC="cc -Xcpluscomm" CXX=CC ./configure
|
|
|
|
sh$ find . -name Makefile -exec .../src/FlightGear-0.7.x/irix-hack.pl {} \;
|
|
|
|
|
1999-08-07 18:22:03 +00:00
|
|
|
|
1999-10-08 00:26:46 +00:00
|
|
|
V. Additional Notes for Building from CVS Sources
|
|
|
|
==================================================
|
|
|
|
|
|
|
|
(Contributed by Todd Smith <msmith@sikorsky.com>)
|
|
|
|
and updates by Curt Olson)
|
1999-08-07 18:22:03 +00:00
|
|
|
|
|
|
|
Download the FlightGear-0.7.x via anonymous cvs as usual, then do:
|
1999-04-22 18:45:16 +00:00
|
|
|
|
|
|
|
> aclocal # normal
|
|
|
|
> automake -a -i # added '-i' flag to avoid dependency calc
|
|
|
|
# that only sgi cc/CC doesn't support
|
|
|
|
> autoconf # normal
|
|
|
|
|
|
|
|
Note the change in automake's command argument.
|
|
|
|
|
|
|
|
Now set env variables to use native compilers (csh syntax).
|
|
|
|
|
|
|
|
> setenv CC cc
|
|
|
|
> setenv CXX CC
|
|
|
|
> setenv CFLAGS '-Xcpluscomm -DEBUG:suppress=1001,1012,1014,
|
|
|
|
1116,1172,1174,1401,1460,1551,1552'
|
|
|
|
> setenv CXXFLAGS '-DEBUG:suppress=1001,1012,1014,1116,1172,
|
|
|
|
1174,1401,1460,1551,1552,3303,3322'
|
|
|
|
|
|
|
|
The '-DEBUG:suppress=' stuff just suppresses anonying warnings during
|
|
|
|
compile. The meaning of each one is shown later in this file.
|
|
|
|
You can use all or none of these here.
|
|
|
|
|
|
|
|
> setenv CPPFLAGS '-woff 1014'
|
|
|
|
|
|
|
|
This is required so that configure will really believe that plib
|
|
|
|
is installed. ( Otherwise a compiler warning makes configure
|
|
|
|
that plib/pu.h couldn't be found. )
|
|
|
|
|
|
|
|
> ./configure
|
|
|
|
> find . -name Makefile -exec irix-hack.pl {} \; # normal irix hack
|
|
|
|
> gmake
|
|
|
|
|
|
|
|
Runs great.
|
|
|
|
|
|
|
|
Todd
|
|
|
|
msmith@sikorsky.com
|
|
|
|
|
|
|
|
-------------------------------------------
|
|
|
|
Warnings that I get. Ignore at your lesiure.
|
|
|
|
|
|
|
|
C and C++:
|
|
|
|
warning(1001): last line of file ends without a newline
|
|
|
|
warning(1012): parsing restarts here after previous syntax error
|
|
|
|
warning(1014): extra text after expected end of preprocessing directive (breaks configure)
|
|
|
|
warning(1116): non-void function "poly_index_init" should return a value
|
|
|
|
warning(1172): subscript out of range
|
|
|
|
warning(1174): variable "j" was declared but never referenced
|
|
|
|
warning(1401): qualified name is not allowed in member declaration
|
|
|
|
warning(1460): function "..." redeclared "inline" after being called
|
|
|
|
warning(1551): variable "Altitude" is used before its value is set
|
|
|
|
warning(1552): variable "last" was set but never used
|
|
|
|
|
|
|
|
C++ only:
|
|
|
|
warning(3303): type qualifier on return type is meaningless
|
|
|
|
warning(3322): omission of explicit type is nonstandard ("int" assumed)
|
|
|
|
|
|
|
|
|
1999-10-08 00:26:46 +00:00
|
|
|
VI. Additional Native SGI Irix Compilers Notes
|
|
|
|
==============================================
|
1999-02-26 22:06:53 +00:00
|
|
|
|
1999-10-08 00:26:46 +00:00
|
|
|
Fixing all the Makefiles' with irix-hack.pl is *VERY* important for
|
|
|
|
your success):
|
1999-03-09 20:58:00 +00:00
|
|
|
|
|
|
|
find . -name Makefile -exec irix-hack.pl {} \;
|
|
|
|
|
1999-03-10 01:08:24 +00:00
|
|
|
This touches up the Makefiles to build libfoo.a with
|
|
|
|
|
|
|
|
CC -ar -o libfoo.a file1.o file2.o ...
|
|
|
|
|
|
|
|
The traditional method is to run:
|
|
|
|
|
|
|
|
ar cru libfoo.a file1.o file2.o
|
|
|
|
|
|
|
|
I wonder if this means that the native SGI "ar" is somewhat broke?
|
|
|
|
|
1999-03-09 20:58:00 +00:00
|
|
|
Note, you should make sure you have perl installed on your system. The
|
|
|
|
"irix-hack.pl" script assumes that perl is located in /usr/bin/perl so
|
|
|
|
if this isn't the proper location on your system, change it in the first
|
|
|
|
line of "irix-hack.pl" before running the above command. One way to see
|
|
|
|
if perl is on your system (and determine where) is to run:
|
|
|
|
|
|
|
|
which perl
|
|
|
|
|
|
|
|
Perl can be installed from "eoe.sw.gifts_perl" or can be fetched and
|
|
|
|
built from the net.
|
1999-03-10 01:08:24 +00:00
|
|
|
|
|
|
|
Finally you should run Gnu make. The native Irix make utility just
|
|
|
|
can't handle the makefiles generated by the automake program. Thus
|
|
|
|
you will need to use Gnu make. It's called "gmake" on my system so I
|
|
|
|
just run:
|
|
|
|
|
|
|
|
gmake
|
|
|
|
|
|
|
|
Don't worry about the make failing in the Tools directory. That's all
|
1999-10-08 00:26:46 +00:00
|
|
|
under construction stuff right now (10/7/99) and if you get that far,
|
1999-03-10 01:08:24 +00:00
|
|
|
rejoice because it means the simulator was successfully built in the
|
|
|
|
Simulator/Main subdirectory.
|
1999-04-22 18:45:16 +00:00
|
|
|
|
|
|
|
Special note for those Irix users using the native compilers *AND* checking
|
|
|
|
out the current source tree via CVS:
|
|
|
|
|
|
|
|
You will need to run "aclocal ; automake -a ; autoconf" as per
|
|
|
|
README.autoconf, but you need an additional flag for automake to disable
|
|
|
|
automatic dependency building (which breaks the native Irix compilers.)
|
|
|
|
You should instead run:
|
|
|
|
|
|
|
|
aclocal ; automake -a --include-deps; autoconf
|
|
|
|
|
|
|
|
Then, proceed on to the configure step.
|
|
|
|
|
|
|
|
Questions? I realize this section is a big heap of random information so
|
|
|
|
if something isn't quite working for you, please ask.
|