]> git.mxchange.org Git - flightgear.git/blob - README.Unix
Updates so that JSBsim can work.
[flightgear.git] / README.Unix
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.
4
5
6 I. Compilers and Portability
7 ============================
8
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.
12
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.
21
22
23 II. GLUT
24 ========
25
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.
28 GLUT can be found at:
29
30     http://reality.sgi.com/opengl/glut3/glut3.html
31
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
38 X11 workstations.
39
40
41 III. Joystick Support
42 =====================
43
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
47 support.
48
49 To make sure joystick support is included when building under Linux:
50
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.
54
55
56 IV. Procedure to build FGFS with Native SGI Irix Compilers from CVS Sources
57 ===========================================================================
58
59 (Contributed by Todd Smith <msmith@sikorsky.com>)
60
61 Download the latest version of plib (1.0.3) from:
62
63     http://www.woodsoup.org/~sbaker/plib/
64
65 Install it both in /usr/local/plib and /usr/local/include/plib.  I
66 think that I am using it from /usr/local/include.
67
68 Download the FlightGear-0.6 via anonymous cvs as usual, then do:
69
70 > aclocal               # normal
71 > automake -a -i        # added '-i' flag to avoid dependency calc
72                         # that only sgi cc/CC doesn't support
73 > autoconf              # normal
74
75 Note the change in automake's command argument.
76
77 Now set env variables to use native compilers (csh syntax).
78
79 > setenv CC cc
80 > setenv CXX CC
81 > setenv CFLAGS '-Xcpluscomm -DEBUG:suppress=1001,1012,1014,
82                             1116,1172,1174,1401,1460,1551,1552'
83 > setenv CXXFLAGS '-DEBUG:suppress=1001,1012,1014,1116,1172,
84                           1174,1401,1460,1551,1552,3303,3322'
85
86 The '-DEBUG:suppress=' stuff just suppresses anonying warnings during
87 compile.  The meaning of each one is shown later in this file.
88 You can use all or none of these here.
89
90 > setenv CPPFLAGS '-woff 1014'
91
92 This is required so that configure will really believe that plib
93 is installed.  ( Otherwise a compiler warning makes configure
94 that plib/pu.h couldn't be found. )
95
96 > ./configure
97 > find . -name Makefile -exec irix-hack.pl {} \;        # normal irix hack
98 > gmake
99
100 Runs great.
101
102 Todd
103 msmith@sikorsky.com
104
105 -------------------------------------------
106 Warnings that I get. Ignore at your lesiure.
107
108 C and C++:
109 warning(1001): last line of file ends without a newline
110 warning(1012): parsing restarts here after previous syntax error
111 warning(1014): extra text after expected end of preprocessing directive         (breaks configure)
112 warning(1116): non-void function "poly_index_init" should return a value
113 warning(1172): subscript out of range
114 warning(1174): variable "j" was declared but never referenced
115 warning(1401): qualified name is not allowed in member declaration
116 warning(1460): function "..." redeclared "inline" after being called
117 warning(1551): variable "Altitude" is used before its value is set
118 warning(1552): variable "last" was set but never used
119
120 C++ only:
121 warning(3303): type qualifier on return type is meaningless
122 warning(3322): omission of explicit type is nonstandard ("int" assumed)
123
124
125 V. Additional Native SGI Irix Compilers Notes
126 =============================================
127
128 If you are building with native SGI compilers try running configure like the
129 following (assuming sh syntax):
130
131   CC=cc CXX=CC CFLAGS="-Xcpluscomm -woff 1014" ./configure
132
133 Then (and this step is *VERY* important for your success) run the following 
134 command:
135
136   find . -name Makefile -exec irix-hack.pl {} \;
137
138 This touches up the Makefiles to build libfoo.a with 
139
140   CC -ar -o libfoo.a file1.o file2.o ...
141
142 The traditional method is to run:
143
144   ar cru libfoo.a file1.o file2.o
145
146 I wonder if this means that the native SGI "ar" is somewhat broke?
147
148 Note, you should make sure you have perl installed on your system.  The
149 "irix-hack.pl" script assumes that perl is located in /usr/bin/perl so
150 if this isn't the proper location on your system, change it in the first
151 line of "irix-hack.pl" before running the above command.  One way to see
152 if perl is on your system (and determine where) is to run:
153
154   which perl
155
156 Perl can be installed from "eoe.sw.gifts_perl" or can be fetched and
157 built from the net.
158
159 Finally you should run Gnu make.  The native Irix make utility just
160 can't handle the makefiles generated by the automake program.  Thus 
161 you will need to use Gnu make.  It's called "gmake" on my system so I 
162 just run:
163
164   gmake
165
166 Don't worry about the make failing in the Tools directory.  That's all
167 under construction stuff right now (3/9/99) and if you get that far, 
168 rejoice because it means the simulator was successfully built in the 
169 Simulator/Main subdirectory.
170
171 Special note for those Irix users using the native compilers *AND* checking
172 out the current source tree via CVS:
173
174 You will need to run "aclocal ; automake -a ; autoconf" as per 
175 README.autoconf, but you need an additional flag for automake to disable
176 automatic dependency building (which breaks the native Irix compilers.)
177 You should instead run:
178
179     aclocal ; automake -a --include-deps; autoconf
180
181 Then, proceed on to the configure step.  
182
183 Questions?  I realize this section is a big heap of random information so
184 if something isn't quite working for you, please ask.