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>)
61 Download the latest version of plib (1.0.13) from:
63 http://www.woodsoup.org/~sbaker/plib/
65 Install it with the default prefix of /usr/local which places
66 everthing in a tree rooted at /usr/local/plib:
68 sh$ CC="cc -Xcpluscomm" CXX=CC ./configure
70 Fix up the Makefiles using the script provided with the Flight Gear
73 find . -name Makefile -exec .../src/FlightGear-0.7.0/irix-hack.pl {} \;
75 Download the FlightGear-0.7.x via anonymous cvs as usual, then do:
78 > automake -a -i # added '-i' flag to avoid dependency calc
79 # that only sgi cc/CC doesn't support
82 Note the change in automake's command argument.
84 Now set env variables to use native compilers (csh syntax).
88 > setenv CFLAGS '-Xcpluscomm -DEBUG:suppress=1001,1012,1014,
89 1116,1172,1174,1401,1460,1551,1552'
90 > setenv CXXFLAGS '-DEBUG:suppress=1001,1012,1014,1116,1172,
91 1174,1401,1460,1551,1552,3303,3322'
93 The '-DEBUG:suppress=' stuff just suppresses anonying warnings during
94 compile. The meaning of each one is shown later in this file.
95 You can use all or none of these here.
97 > setenv CPPFLAGS '-woff 1014'
99 This is required so that configure will really believe that plib
100 is installed. ( Otherwise a compiler warning makes configure
101 that plib/pu.h couldn't be found. )
104 > find . -name Makefile -exec irix-hack.pl {} \; # normal irix hack
112 -------------------------------------------
113 Warnings that I get. Ignore at your lesiure.
116 warning(1001): last line of file ends without a newline
117 warning(1012): parsing restarts here after previous syntax error
118 warning(1014): extra text after expected end of preprocessing directive (breaks configure)
119 warning(1116): non-void function "poly_index_init" should return a value
120 warning(1172): subscript out of range
121 warning(1174): variable "j" was declared but never referenced
122 warning(1401): qualified name is not allowed in member declaration
123 warning(1460): function "..." redeclared "inline" after being called
124 warning(1551): variable "Altitude" is used before its value is set
125 warning(1552): variable "last" was set but never used
128 warning(3303): type qualifier on return type is meaningless
129 warning(3322): omission of explicit type is nonstandard ("int" assumed)
132 V. Additional Native SGI Irix Compilers Notes
133 =============================================
135 If you are building with native SGI compilers try running configure like the
136 following (assuming sh syntax):
138 CC=cc CXX=CC CFLAGS="-Xcpluscomm -woff 1014" ./configure
140 Then (and this step is *VERY* important for your success) run the following
143 find . -name Makefile -exec irix-hack.pl {} \;
145 This touches up the Makefiles to build libfoo.a with
147 CC -ar -o libfoo.a file1.o file2.o ...
149 The traditional method is to run:
151 ar cru libfoo.a file1.o file2.o
153 I wonder if this means that the native SGI "ar" is somewhat broke?
155 Note, you should make sure you have perl installed on your system. The
156 "irix-hack.pl" script assumes that perl is located in /usr/bin/perl so
157 if this isn't the proper location on your system, change it in the first
158 line of "irix-hack.pl" before running the above command. One way to see
159 if perl is on your system (and determine where) is to run:
163 Perl can be installed from "eoe.sw.gifts_perl" or can be fetched and
166 Finally you should run Gnu make. The native Irix make utility just
167 can't handle the makefiles generated by the automake program. Thus
168 you will need to use Gnu make. It's called "gmake" on my system so I
173 Don't worry about the make failing in the Tools directory. That's all
174 under construction stuff right now (3/9/99) and if you get that far,
175 rejoice because it means the simulator was successfully built in the
176 Simulator/Main subdirectory.
178 Special note for those Irix users using the native compilers *AND* checking
179 out the current source tree via CVS:
181 You will need to run "aclocal ; automake -a ; autoconf" as per
182 README.autoconf, but you need an additional flag for automake to disable
183 automatic dependency building (which breaks the native Irix compilers.)
184 You should instead run:
186 aclocal ; automake -a --include-deps; autoconf
188 Then, proceed on to the configure step.
190 Questions? I realize this section is a big heap of random information so
191 if something isn't quite working for you, please ask.