Building FlightGear - Linux: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
__TOC__
This section describes how to build FlightGear on Linux system.
This section describes how to build FlightGear on Linux system.


Line 13: Line 15:


These are: c++, cpp, gcc, g++ found under the /usr/bin directory.  You will also need to have the tools '''autoconf''' and '''automake1.9''' installed.
These are: c++, cpp, gcc, g++ found under the /usr/bin directory.  You will also need to have the tools '''autoconf''' and '''automake1.9''' installed.
'''CVS'''
Yes, the program is called 'CVS'.  This is used for downloading the latest set of source code.


'''OpenGL support'''
'''OpenGL support'''
Line 26: Line 32:
  direct rendering: Yes
  direct rendering: Yes


If you see:
direct rendering: No
Don't panic yet.  This may just mean some required libraries for hardware accelerated graphic are missing.  Go ahead and try installing plib1.8.4 and its dependencies first.  If you still get the above message, then you will need to do some googling yourself and troubleshoot.


== Dependencies ==
== Dependencies ==
Line 34: Line 45:
* FlightGear
* FlightGear
** [http://openal.org OpenAL and ALUT]
** [http://openal.org OpenAL and ALUT]
** [http://simgear.org SimGear]
** SimGear
*** [http://plib.sourceforge.net/ PLIB] (until version 0.9.10 release sources, PRE_OSG_PLIB_20061029 CVS branch)
*** [http://plib.sourceforge.net/ PLIB] (until version 0.9.10 release sources, PRE_OSG_PLIB_20061029 CVS branch)
**** (Free)GLUT or SDL (We recommend the use of SDL)
**** (Free)GLUT or SDL (We recommend the use of SDL)
Line 41: Line 52:
**** Producer
**** Producer


== Optional dependencies ==
If you attack the above dependencies in the order listed below, you should be good:
1. Glut. Most distributions include glut packages, although you may have to hunt for them. Make sure you install both the glut and glut-devel packages.
2. Zlib. Most distributions install the basic zlib libraries by default, but not the development portions. If you don't have zlib.h, you probably need to install the zlib-devel package for your distribution.
3. Plib - portability libraries and scene graph.
4. Metakit. A suitable version of MetaKit is included in the SimGear/src-libs/ subdirectory. If your distribution doesn't provide a Metakit (and Metakit-devel) package, you will have to build and install it before you can compile SimGear.
5. [[ OpenSceneGraph ]]
6. SimGear - Simulation support libraries. If you are building FlightGear from CVS, you need the CVS version of SimGear. If you have strange build errors, one of the first things to check is that you have an up-to-date version of SimGear built and installed.
 
== Compiling ==
To compile and install FlightGear (and its dependencies) system wide, you need be root.  Next, do:
cd /usr/local/src
 
=== Getting and compiling SimGear ===
Follow these steps:
Step 1:
cvs -d :pserver:cvsguest@cvs.simgear.org:/var/cvs/SimGear-0.3 login
CVS passwd: guest
 
cvs -d :pserver:cvsguest@cvs.simgear.org:/var/cvs/SimGear-0.3 co source
 
Step 2:
mv source simgear
cd simgear
 
Step 3:
./autogen.sh
./configure
make; make install
 
=== Getting and compiling FlightGear ===
Step 1:
cvs -d :pserver:cvsguest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 login
CVS passwd: guest
 
cvs -d :pserver:cvsguest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 co source
 
Step 2:
mv source flightgear
cd flightgear
 
Step 3:
./autogen.sh
./configure
make; make install


== External links ==
== External links ==

Revision as of 03:02, 31 December 2006

This section describes how to build FlightGear on Linux system.

Compiling FlightGear is not a task for novice users. Thus, if you're a beginner (we all were once) on a platform which binaries are available for, we recommend postponing this task and just starting with the binary distribution to get you flying.

October 29th 2006, Flightgear CVS MAIN Branch switched to OSG support. Plib support remains available in CVS using PRE_OSG_PLIB_20061029 Branch. (cvs up -rPRE_OSG_PLIB_20061029)

Requirements

Before you can compile FlightGear, you need to have the followings installed on your computer:

C++ compiler

These are: c++, cpp, gcc, g++ found under the /usr/bin directory. You will also need to have the tools autoconf and automake1.9 installed.

CVS

Yes, the program is called 'CVS'. This is used for downloading the latest set of source code.

OpenGL support

More specifically, your system needs the support for hardware accelerated graphics. You can check for this by running:

glxinfo | grep direct

Note: To run the above command, you need to have the tool mesa-utils installed.

You should then see:

direct rendering: Yes

If you see:

direct rendering: No

Don't panic yet. This may just mean some required libraries for hardware accelerated graphic are missing. Go ahead and try installing plib1.8.4 and its dependencies first. If you still get the above message, then you will need to do some googling yourself and troubleshoot.

Dependencies

FlightGear is dependent on quite a few number of libraries. You do not need to compile all of them yourself, but you do need to have their headers installed at least. For example, the headers for package plib1.8.4 is plib1.8.4-dev.

The dependency is summarized in the following tree. Please note that each library has its own dependencies, and most are not shown here.

  • FlightGear
    • OpenAL and ALUT
    • SimGear
      • PLIB (until version 0.9.10 release sources, PRE_OSG_PLIB_20061029 CVS branch)
        • (Free)GLUT or SDL (We recommend the use of SDL)
      • OpenSceneGraph (cvs HEAD branch)
        • OpenThreads
        • Producer

If you attack the above dependencies in the order listed below, you should be good: 1. Glut. Most distributions include glut packages, although you may have to hunt for them. Make sure you install both the glut and glut-devel packages. 2. Zlib. Most distributions install the basic zlib libraries by default, but not the development portions. If you don't have zlib.h, you probably need to install the zlib-devel package for your distribution. 3. Plib - portability libraries and scene graph. 4. Metakit. A suitable version of MetaKit is included in the SimGear/src-libs/ subdirectory. If your distribution doesn't provide a Metakit (and Metakit-devel) package, you will have to build and install it before you can compile SimGear. 5. OpenSceneGraph 6. SimGear - Simulation support libraries. If you are building FlightGear from CVS, you need the CVS version of SimGear. If you have strange build errors, one of the first things to check is that you have an up-to-date version of SimGear built and installed.

Compiling

To compile and install FlightGear (and its dependencies) system wide, you need be root. Next, do:

cd /usr/local/src

Getting and compiling SimGear

Follow these steps: Step 1:

cvs -d :pserver:cvsguest@cvs.simgear.org:/var/cvs/SimGear-0.3 login
CVS passwd: guest
cvs -d :pserver:cvsguest@cvs.simgear.org:/var/cvs/SimGear-0.3 co source

Step 2:

mv source simgear
cd simgear

Step 3:

./autogen.sh
./configure
make; make install

Getting and compiling FlightGear

Step 1:

cvs -d :pserver:cvsguest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 login
CVS passwd: guest
cvs -d :pserver:cvsguest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 co source

Step 2:

mv source flightgear
cd flightgear

Step 3:

./autogen.sh
./configure
make; make install

External links

Instructions

Tools

Free/Open Source

Free/Proprietary