Current build dependencies

From CSP

(Difference between revisions)
Revision as of 08:32, 10 May 2009
127.0.0.1 (Talk | contribs)
External dependencies
← Go to previous diff
Current revision
127.0.0.1 (Talk | contribs)
Debian GNU/Linux packages -: The package libopenthreads-dev is needed to compilate the software, at least it was for me.
Line 27: Line 27:
To install build dependencies packages, type (tested on Ubuntu Feisty): To install build dependencies packages, type (tested on Ubuntu Feisty):
- $ sudo apt-get install libsigc++-2.0-dev libcommoncpp2-dev python-dev libsdl1.2-dev libopenscenegraph-dev libopenalpp-cvs-dev libosgal-cvs-dev libproducer-dev libvorbis-dev libogg-dev swig+ $ sudo apt-get install libsigc++-2.0-dev libcommoncpp2-dev python-dev libsdl1.2-dev libopenscenegraph-dev libopenthreads-dev libopenalpp-cvs-dev libosgal-cvs-dev libproducer-dev libvorbis-dev libogg-dev swig
Note that all the packages might take up to 150 MB of disk space! Note that all the packages might take up to 150 MB of disk space!
 +
== Gentoo packages == == Gentoo packages ==

Current revision

Table of contents

External dependencies

The following library versions have been tested, but it's possible that older or newer versions will also work.

  • OpenSceneGraph (http://www.openscenegraph.org) version 2.6 or newer. (Older versions no longer supported)
  • Simple Direct Media Library (http://www.libsdl.org) version 1.2.9 or newer.
  • Libsigc++ Callback Framework (http://libsigc.sourceforge.net/) version 2.0.16 or newer.
  • GNU Common C++ (http://cplusplus.sourceforge.net/) version 1.3.21 or newer (1.3.22-?? do *not* work, 1.5.1 does).
  • Python (http://www.python.org) version 2.3 or 2.4
  • SWIG (http://www.swig.org) version 1.3.22 or newer.
  • OsgAL (http://www.vrlab.umu.se/research/osgAL/) version 0.6.1. (OpenAL++ is included in this version.)
  • libogg and libvorbis (http://www.xiph.org/downloads/) version 1.1.2 or 1.1.3.


Internal dependencies

A number of supporting data files are needed to run the simulation. Most of these are checked into the repository (under trunk/csp/data). This includes models, images, and fonts. The main external data package is the terrain. This package is available from the CSP file releases (http://sourceforge.net/project/showfiles.php?group_id=17780&package_id=67314) page at SourceForge; just download the latest version of BalkanTerrain. When unpacked the terrain files should reside in csp/data/terrain.


Debian GNU/Linux packages

Most of the third-party libraries used by CSP are available as part of the official Debian distribution. Note that some of the packages may only be present in the testing or unstable branches, and the exact versions listed above may not be available.

As of early 2007, CSP builds and runs correctly on my machine using Etch packages for all external dependencies. -OS

If you have experience with other Linux distributions, please feel free to add more info here.

To install build dependencies packages, type (tested on Ubuntu Feisty):

$ sudo apt-get install libsigc++-2.0-dev libcommoncpp2-dev python-dev libsdl1.2-dev libopenscenegraph-dev libopenthreads-dev libopenalpp-cvs-dev libosgal-cvs-dev libproducer-dev libvorbis-dev libogg-dev swig

Note that all the packages might take up to 150 MB of disk space!


Gentoo packages

Firts of all install things that are in portage

emerge -pv pkgconfig libvorbis libogg libsigc++ jpeg libsdl commoncpp2 swig

Python is core package on gentoo and it should already be installed.

Now it is time for tough, non-portage part of work. My method is mainly based on http://gentoo-wiki.com/TIP_install_programs_without_portage tips. Grab http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-2.0.zip extract it and follow install instructions.

OSG 2.0 doesn't provide pkg-config files, you need to make them yourself. You need openscenegraph.pc and openthreads.pc, here are mine: openscenegraph.pc:

# pkg-config source file 
prefix=/usr/non-portage 
exec_prefix=${prefix} 
libdir=${exec_prefix}/lib 
includedir=${prefix}/include 
Name: openscenegraph 
Description: 3D scenegraph 
Version: 2.0.0 
Requires: openthreads 
Conflicts: 
Libs: -L${libdir} -losg -losgDB -losgFX -losgGA -losgParticle -losgViewer -losgSim -losgText -losgUtil 
Cflags: -I${includedir} 

openthreads.pc:

# pkg-config source file 
prefix=/usr/non-portage 
exec_prefix=${prefix} 
libdir=${exec_prefix}/lib 
includedir=${prefix}/include 
Name: openthreads 
Description: Object-Oriented (OO) thread interface for C++ programmers 
Version: 1.9 
Requires: 
Conflicts: 
Libs: -L${libdir} -lOpenThreads 
Cflags: -I${includedir}

Edit prefixes according to your needs. For example if you've installed OSG to /usr prefix should point there. Place them somewhere where pkg-config can see them. /usr/lib/pkgconfig is default directory. If place them somewhere else make sure that pkg-config can acces there (add path to PKG_CONFIG_PATH).



Alternative way is to use an overlay as described in this page gentoo-packages (http://www.plopbyte.net/#gentoo-packages).

Install mercurial and layman

emerge layman mercurial

add layman make.conf to the main make.conf

echo "source /usr/portage/local/layman/make.conf" >> /etc/make.conf

edit layman.cfg (/etc/layman/layman.cfg)

overlays  : http://hg.plopbyte.net/gentoo-packages/raw-file/e6b4fc0d766a/list.xml
            http://www.gentoo.org/proj/en/overlays/layman-global.txt
nocheck  : yes

controll that mornifle-gentoo-package is accessible

layman --list

if every thing is alright mornifle-gentoo-package should be in the list

then add the overlay

layman -a mornifle-gentoo-package

then install openscenegraph

emerge openscenegraph

no need to add or edit openscenegraph.pc and openthreads.pc.



Download osgAl 0.6.1 or later from http://sourceforge.net/projects/osgal/. Install is quite straightforward, ./configure, make, sudo make install (typical for linux). If you've installed OSG 2.0 in some nonstandard location you might have build errors. Edit osgAL makefiles (which is ugly, it would be better to edit Makefile.am files) or install OSG2.0 into /usr (which is also ugly, but i haven't teste it yet).

Download csp branch with osg2.0 support and try it out.


Windows

For windows you can use a package of precompiled libraries (https://www.zerobar.net/csp/downloads/cspdevpack-0.6-installer.exe) instead of downloading and building most of the libraries listed at the top of this page. The package does not include Python and SWIG; you'll need to install these separately. See Building from source on Windows for more information.