Updated by Erik Hofman.
This commit is contained in:
parent
72a95d570c
commit
0f5cd76bb5
1 changed files with 73 additions and 125 deletions
|
@ -1,154 +1,102 @@
|
||||||
V. Procedure to build FGFS with Native SGI Irix Compilers from CVS Sources
|
|
||||||
==========================================================================
|
|
||||||
|
|
||||||
(Contributed by Todd Smith <msmith@sikorsky.com> with modifications
|
This file is made possible by contributions from:
|
||||||
and updates by Curt Olson)
|
Todd Smith <msmith@sikorsky.com>
|
||||||
|
Curt Olson <curt@flightgear.org>
|
||||||
Download the latest version of plib (1.0.18) from:
|
Erik Hofman <erik@ehofman.com>
|
||||||
|
|
||||||
http://www.woodsoup.org/~sbaker/plib/
|
|
||||||
|
|
||||||
Configure it with the default prefix of /usr/local which places
|
|
||||||
everthing in a tree rooted at /usr/local/plib:
|
|
||||||
|
|
||||||
sh$ CC="cc -Xcpluscomm" CXX=CC ./configure
|
|
||||||
|
|
||||||
*Before* running make, fix up the plib Makefiles using the script
|
|
||||||
provided with the FlightGear 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 {} \;
|
|
||||||
|
|
||||||
|
|
||||||
VI. Additional Notes for Building on IRIX from CVS Sources
|
1. Requirements
|
||||||
==========================================================
|
|
||||||
|
|
||||||
(Contributed by Todd Smith <msmith@sikorsky.com>)
|
The following packages should be installed before FlightGear (or SimGear
|
||||||
and updates by Curt Olson)
|
or PLib) can be compiled on Irix:
|
||||||
|
|
||||||
Download the FlightGear-0.7.x via anonymous cvs as usual, then do:
|
Irix development headers and libraries
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
> aclocal # normal
|
compiler_dev.sw.base irix_dev.sw.headers
|
||||||
> automake -a -i # added '-i' flag to avoid dependency calc
|
compiler_dev.sw.ld dev.sw.lib
|
||||||
# that only sgi cc/CC doesn't support
|
compiler_dev.sw.util
|
||||||
> autoconf # normal
|
compiler_dev.hdr.lib
|
||||||
|
|
||||||
Note the change in automake's command argument.
|
gl_dev.sw.gldev dmedia_dev.sw.base
|
||||||
|
x_dev.sw.dev
|
||||||
|
|
||||||
Now set env variables to use native compilers (csh syntax).
|
MipsPro C and C++ Compiler environment
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
> setenv CC cc
|
c++_dev.hdr.lib c_dev.sw.c
|
||||||
> setenv CXX CC
|
c++_dev.sw.c++ c_fe.sw.c
|
||||||
> setenv CFLAGS '-Xcpluscomm -DEBUG:suppress=1001,1012,1014,
|
c++_dev.sw.lib
|
||||||
1116,1172,1174,1401,1460,1551,1552'
|
c++_eoe.sw.lib
|
||||||
> setenv CXXFLAGS '-DEBUG:suppress=1001,1012,1014,1116,1172,
|
c++_fe.sw.c++
|
||||||
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)
|
|
||||||
|
|
||||||
|
|
||||||
VII. Additional Native SGI Irix Compilers Notes
|
FlightGear Flight Simulator Software
|
||||||
==============================================
|
----------------------------------------
|
||||||
|
|
||||||
Fixing all the Makefiles' with irix-hack.pl is *VERY* important for
|
FlightGear: http://www.flightgear.org
|
||||||
your success):
|
SimGear: http://www.simgear.org
|
||||||
|
Plib: http://plib.sourceforge.net
|
||||||
|
GLUT: http://
|
||||||
|
|
||||||
find . -name Makefile -exec irix-hack.pl {} \;
|
|
||||||
|
|
||||||
This touches up the Makefiles to build libfoo.a with
|
|
||||||
|
|
||||||
CC -ar -o libfoo.a file1.o file2.o ...
|
2. Compiling and Installation
|
||||||
|
|
||||||
The traditional method is to run:
|
To create a set of binaries it is important to follow these steps. This
|
||||||
|
will build a statically linked executable /opt/bin/fgfs
|
||||||
|
|
||||||
ar cru libfoo.a file1.o file2.o
|
1. Extract, and install GLUT, following the build guidelines provided
|
||||||
|
by the author of GLUT.
|
||||||
|
|
||||||
I wonder if this means that the native SGI "ar" is somewhat broke?
|
2. Extract, configure and install Plib:
|
||||||
|
automake -a -i
|
||||||
|
CXXFLAGS="-O2 -G0 -use_readonly_const -rdata_shared -I/opt/include" \
|
||||||
|
CFLAGS=$CXXFLAGS LDFLAGS="-L/opt/lib32" \
|
||||||
|
./configure --prefix=/opt --libdir=/opt/lib32
|
||||||
|
make; make install
|
||||||
|
|
||||||
Note, you should make sure you have perl installed on your system. The
|
3. Extract, configure and install SimGear:
|
||||||
"irix-hack.pl" script assumes that perl is located in /usr/bin/perl so
|
automake -a -i
|
||||||
if this isn't the proper location on your system, change it in the first
|
CXXFLAGS="-O2 -G0 -use_readonly_const -rdata_shared -I/opt/include \
|
||||||
line of "irix-hack.pl" before running the above command. One way to see
|
-woff 1001,1012,1014,1116,1172,1174,1401,1460,1551,1552,1681" \
|
||||||
if perl is on your system (and determine where) is to run:
|
CFLAGS="-Xcpluscomm "$CXXFLAGS LDFLAGS="-L/opt/lib32 -L../zlib" \
|
||||||
|
./configure --prefix=/opt --libdir=/opt/lib32 --with-logging
|
||||||
|
sh ../FlightGear-0.x.x/irix-hack.sh
|
||||||
|
make; make install
|
||||||
|
|
||||||
which perl
|
4. Extract, configure and install FlightGear:
|
||||||
|
automake -a -i
|
||||||
|
CXXFLAGS="-O2 -G0 -use_readonly_const -rdata_shared -I/opt/include \
|
||||||
|
-woff 1001,1012,1014,1116,1172,1174,1401,1460,1551,1552,1681" \
|
||||||
|
CFLAGS="-Xcpluscomm "$CXXFLAGS LDFLAGS="-L/opt/lib32" \
|
||||||
|
CPPFLAGS="-woff 1014" \
|
||||||
|
./configure --prefix=/opt --with-simgear=/opt --without-loging
|
||||||
|
sh ./irix-hack.sh
|
||||||
|
make; make install
|
||||||
|
|
||||||
Perl can be installed from "eoe.sw.gifts_perl" or can be fetched and
|
|
||||||
built from the net.
|
|
||||||
|
|
||||||
Finally you should run Gnu make. The native Irix make utility just
|
The irix-hack.sh script fixes some compiler specific problems which were
|
||||||
can't handle the makefiles generated by the automake program. Thus
|
introduced after the adoption of the C++ Standard Template Library.
|
||||||
you will need to use Gnu make. It's called "gmake" on my system so I
|
Not running this script will result in an error message like this:
|
||||||
just run:
|
CC ERROR: -ar option requires archive name to be specified with -o option
|
||||||
|
|
||||||
gmake
|
If this happens, just run the irix-hack script and continue with make.
|
||||||
|
|
||||||
Don't worry about the make failing in the Tools directory. That's all
|
|
||||||
under construction stuff right now (10/7/99) and if you get that far,
|
|
||||||
rejoice because it means the simulator was successfully built in the
|
|
||||||
Simulator/Main subdirectory.
|
|
||||||
|
|
||||||
Special note for those Irix users using the native compilers *AND* checking
|
The "automake -a -i" command is required because automake with automatic
|
||||||
out the current source tree via CVS:
|
dependency building breaks the native Irix compilers.
|
||||||
|
|
||||||
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
|
3. Running
|
||||||
|
|
||||||
|
Before the FlightGear program could be run it is important to install the
|
||||||
|
FlightGear base package (the default is to extract the base package into
|
||||||
|
/opt/bin/lib).
|
||||||
|
|
||||||
|
This package can be found at: http://www.flightgear.org
|
||||||
|
|
||||||
|
When all is set and done, just run /opt/bin/runfgfs
|
||||||
|
To see the command line options, run /opt/bin/runfgfs --help
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
Loading…
Reference in a new issue