1 If you are reading this in hopes that you will find the answer to a
2 specific question, please send the question to curt@flightgear.org and
3 suggest that I include the answer here.
6 I. Compilers and Portability
7 ============================
9 Flight Gear is known to build with egcs-1.1 and higher, as well as
10 gcc-2.8 and higher. Your mileage may vary with earlier versions of
11 these compilers although support for gcc-2.7.x is mostly there.
13 For other platforms where you may have access to native compilers,
14 again your mileage may vary. We would like to support as many
15 different compilers and platforms as possible. Please relay any
16 changes you make (or problems you encounter) back to
17 curt@flightgear.org, so that in the future we can better support your
18 platform and your compiler. I have access to a few different
19 platforms, but I must depend on others to make sure their favorite
20 platform and compiler is well supported.
26 Flight Gear requires GLUT version 3.7 or later (aka GameGLUT._ GLUT
27 needs to be installed on your system before you can build Flight Gear.
30 http://reality.sgi.com/opengl/glut3/glut3.html
32 GLUT (pronounced like the glut in gluttony) is the OpenGL Utility
33 Toolkit, a window system independent toolkit for writing OpenGL
34 programs. It implements a simple windowing application programming
35 interface (API) for OpenGL. GLUT makes it considerably easier to learn
36 about and explore OpenGL programming. GLUT provides a portable API so
37 you can write a single OpenGL program that works on both Win32 PCs and
44 GLUT only has win32 joystick support but even at that, it is not well
45 implimented. So we use Steve Backer's joystick library when possible,
46 and fall back to GLUT for win32 until Steve's library adds win32
49 To make sure joystick support is included when building under Linux:
51 - make sure you have the proper joystick module installed.
52 - make sure the proper devices are created in /dev.
53 - /usr/include/linux/joystick.h must exist on your system.
56 IV. Procedure to build FGFS with Native SGI Irix Compilers from CVS Sources
57 ===========================================================================
59 (Contributed by Todd Smith <msmith@sikorsky.com> with modifications
60 and updates by Curt Olson)
62 Download the latest version of plib (1.0.18) from:
64 http://www.woodsoup.org/~sbaker/plib/
66 Configure it with the default prefix of /usr/local which places
67 everthing in a tree rooted at /usr/local/plib:
69 sh$ CC="cc -Xcpluscomm" CXX=CC ./configure
71 *Before* running make, fix up the plib Makefiles using the script
72 provided with the Flight Gear distribution:
74 find . -name Makefile -exec .../src/FlightGear-0.7.x/irix-hack.pl {} \;
76 This applies a fix in all the Makefiles to the lib creation command
77 (to use CC -ar rather than ar) as per a tip in the SGI pipeline
80 Now, make and install plib.
82 Download the latest fgfs source snapshot from:
84 ftp://ftp.flightgear.org/pub/fgfs/Source/Snapshots/
86 Configure and build fgfs as you did plib:
88 sh$ CC="cc -Xcpluscomm" CXX=CC ./configure
89 sh$ find . -name Makefile -exec .../src/FlightGear-0.7.x/irix-hack.pl {} \;
92 V. Additional Notes for Building from CVS Sources
93 ==================================================
95 (Contributed by Todd Smith <msmith@sikorsky.com>)
96 and updates by Curt Olson)
98 Download the FlightGear-0.7.x via anonymous cvs as usual, then do:
101 > automake -a -i # added '-i' flag to avoid dependency calc
102 # that only sgi cc/CC doesn't support
105 Note the change in automake's command argument.
107 Now set env variables to use native compilers (csh syntax).
111 > setenv CFLAGS '-Xcpluscomm -DEBUG:suppress=1001,1012,1014,
112 1116,1172,1174,1401,1460,1551,1552'
113 > setenv CXXFLAGS '-DEBUG:suppress=1001,1012,1014,1116,1172,
114 1174,1401,1460,1551,1552,3303,3322'
116 The '-DEBUG:suppress=' stuff just suppresses anonying warnings during
117 compile. The meaning of each one is shown later in this file.
118 You can use all or none of these here.
120 > setenv CPPFLAGS '-woff 1014'
122 This is required so that configure will really believe that plib
123 is installed. ( Otherwise a compiler warning makes configure
124 that plib/pu.h couldn't be found. )
127 > find . -name Makefile -exec irix-hack.pl {} \; # normal irix hack
135 -------------------------------------------
136 Warnings that I get. Ignore at your lesiure.
139 warning(1001): last line of file ends without a newline
140 warning(1012): parsing restarts here after previous syntax error
141 warning(1014): extra text after expected end of preprocessing directive (breaks configure)
142 warning(1116): non-void function "poly_index_init" should return a value
143 warning(1172): subscript out of range
144 warning(1174): variable "j" was declared but never referenced
145 warning(1401): qualified name is not allowed in member declaration
146 warning(1460): function "..." redeclared "inline" after being called
147 warning(1551): variable "Altitude" is used before its value is set
148 warning(1552): variable "last" was set but never used
151 warning(3303): type qualifier on return type is meaningless
152 warning(3322): omission of explicit type is nonstandard ("int" assumed)
155 VI. Additional Native SGI Irix Compilers Notes
156 ==============================================
158 Fixing all the Makefiles' with irix-hack.pl is *VERY* important for
161 find . -name Makefile -exec irix-hack.pl {} \;
163 This touches up the Makefiles to build libfoo.a with
165 CC -ar -o libfoo.a file1.o file2.o ...
167 The traditional method is to run:
169 ar cru libfoo.a file1.o file2.o
171 I wonder if this means that the native SGI "ar" is somewhat broke?
173 Note, you should make sure you have perl installed on your system. The
174 "irix-hack.pl" script assumes that perl is located in /usr/bin/perl so
175 if this isn't the proper location on your system, change it in the first
176 line of "irix-hack.pl" before running the above command. One way to see
177 if perl is on your system (and determine where) is to run:
181 Perl can be installed from "eoe.sw.gifts_perl" or can be fetched and
184 Finally you should run Gnu make. The native Irix make utility just
185 can't handle the makefiles generated by the automake program. Thus
186 you will need to use Gnu make. It's called "gmake" on my system so I
191 Don't worry about the make failing in the Tools directory. That's all
192 under construction stuff right now (10/7/99) and if you get that far,
193 rejoice because it means the simulator was successfully built in the
194 Simulator/Main subdirectory.
196 Special note for those Irix users using the native compilers *AND* checking
197 out the current source tree via CVS:
199 You will need to run "aclocal ; automake -a ; autoconf" as per
200 README.autoconf, but you need an additional flag for automake to disable
201 automatic dependency building (which breaks the native Irix compilers.)
202 You should instead run:
204 aclocal ; automake -a --include-deps; autoconf
206 Then, proceed on to the configure step.
208 Questions? I realize this section is a big heap of random information so
209 if something isn't quite working for you, please ask.