Building FlightGear - Debian: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
mNo edit summary
(Redirected to Building_FlightGear_-_Devuan until someone takes over here.)
 
(136 intermediate revisions by 19 users not shown)
Line 1: Line 1:
= HowTo build on Debian checklist =
#REDIRECT[[Building_FlightGear_-_Devuan]]
 
HowTo build FG-CVS (and also 1.9.1) on Etch and Lenny.
 
Eine deutsche Version dieses HowTos findet man im http://wiki.debianforum.de/FlightgearOnEtch.
 
If you don't want to make your hands dirty, have a look at this: http://wiki.flightgear.org/index.php/Scripted_Compilation_on_Linux_Debian/Ubuntu
 
== Requirements and Preparations ==
You need an OpenGL capable graphics including a proper installed driver.<BR>
 
Also a bunch of packages (and some of their dependencies) are required:
*gcc, g++, make, automake1.9
*mawk (or gawk)
*cmake  min. version 2.6.0-5,  for Etch available on backports.org!
*cvs, subversion
*freeglut3-dev, libgl1-mesa-dev, libxrandr-dev
*libxi-dev, libxmu-dev, libxext-dev
*libopenal-dev, libalut-dev
*libjpeg62-dev, libtiff4-dev, zlib1g-dev
*libboost1.35-dev    for Etch available on backports.org!
 
During installation packages ''simgear-dev'' and ''openscenegraph-dev'' must not be installed. They can safely be re-installed after compilation.
==== Add backports.org repository ====
(only needed on Etch)
 
hardcore: add this line to /etc/apt/sources.list:
deb http://ftp.de.debian.org/backports.org/ etch-backports main contrib
 
Synaptic:
Binaries (deb)
Address:      http://ftp.de.debian.org/backports.org/
Distribution:  etch-backports
Section(s):    main contrib
 
More mirrors can be found on: http://www.backports.org/debian/README.mirrors.html
 
== Fetch the Sources ==
 
'''plib'''<BR>
No need to fetch it by CVS because there was no update for a long time...<BR>
http://plib.sourceforge.net/dist/plib-1.8.5.tar.gz <BR>
http://plib.sourceforge.net/download.html
 
 
'''OpenSceneGraph'''<BR>
For CVS one may use the latest developer release (for FG 1.9.1 OSG 2.7.8 is known to work):<BR>
http://www.openscenegraph.org/projects/osg/wiki/Downloads/DeveloperReleases<BR>
or fetch it via SVN:
svn checkout http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph
 
 
'''SimGear''' <BR>
1.9.1: ftp://ftp.simgear.org/pub/simgear/Source/SimGear-1.9.1.tar.gz <BR>
or CVS: <BR>
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
 
 
'''FlightGear source'''<BR>
1.9.1: http://www.very-clever.com/download/flightgear/Source/ <BR>
or CVS:<BR>
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
 
'''FlightGear data''' <BR>
1.9.1: http://www.very-clever.com/download/flightgear/Shared/FlightGear-data-1.9.0.tar.bz2 <BR>
or CVS: <BR>
cvs -d :pserver:cvsguest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 co data
 
While data (CVS: ~ 2 GB / 1.9.1: 230 MB) gets downloaded we have plenty of time to...
 
== Build and install ==
Because we are going to install versions different to the ones in the repositries it is hardly recommended to install FG-CVS in a place independet to the base system such as /usr/local/fg-cvs, /opt/fg-cvs or in a subdirectory of your $HOME. I suggest to make this directory writeable by the user that there is no need to become root for the 'make install' commands. I'll use ''$prefix as'' a placeholder for this, so in the following instructions one have to replace it by the local path.
 
Subsequent the commands to build each source. Execute them in the according source directory, except for OSG.
 
'''plib'''
./configure --prefix=$prefix
make
make install
 
'''OpenSceneGraph'''<BR>
Here you'll encounter another placeholder ''$osgsrcdir'' which has to be replaced by path of the OSG source directory. This is because cmake demands a build directory separate to its source directory. So 'mkdir' one and 'cd' into it.
cmake -D CMAKE_BUILD_TYPE="Release" -D CMAKE_CXX_FLAGS="-O3" -D CMAKE_C_FLAGS="-O3" \
    -D CMAKE_INSTALL_PREFIX:PATH="$prefix" $osgsrcdir
make
make install
 
export LD_LIBRARY_PATH=$prefix/lib:$LD_LIBRARY_PATH
 
 
'''SimGear'''
./autogen.sh
./configure --prefix=$prefix --with-jpeg-factory
make
make install
 
'''FlightGear'''
./autogen.sh
./configure --prefix=$prefix
make
make install
----
 
'''Trial run:'''
export LD_LIBRARY_PATH=$prefix/lib:$LD_LIBRARY_PATH
$prefix/bin/fgfs --fg-root=/path/to/data
 
----
 
== fgrun ==
To build [[ fgrun ]] some more packages are required:
*libfltk1.1-dev
*fluid
 
 
Fetch the source:
svn co http://fgrun.svn.sourceforge.net/svnroot/fgrun/trunk fgrun
 
 
Build it: <BR>
''$prefix'' like above
./autogen.sh
./configure --prefix=$prefix
make
make install

Latest revision as of 14:45, 28 May 2017