Build Dependencies

From Stellarium Wiki
Revision as of 11:02, 5 October 2009 by Flobber (Talk | contribs)
Jump to: navigation, search

Stellarium needs a few things to be installed on your system before you can build it.

Dependency Ubuntu package name Notes
CMake cmake Required >= Stellarium 0.9.0. Get version 2.6 or higher.
GNU C Compiler gcc Or compatible alternative.
GNU C++ Compiler g++ Or compatible alternative.
gettext gettext
Open GL libgl1-mesa-dev
GLU libglu1-mesa-dev
Zlib zlib1g-dev
PNG libpng12-dev
Freetype libfreetype6-dev Apparently at least later than 2.1.0.

(Not needed after about revision 4849)

Boost C++ Libraries libboost-dev

(Not needed after about revision 4635) Required for 0.10.2.

JPEG libraries libjpeg62-dev
QT library >= 4.5 libqt4-dev* See notes below.
Doxygen doxygen Optional. If you want to build the API documentation you will need this.
Graphviz graphviz Optional. If you want to build the API document and include fancy class diagrams, you will need this.
Subversion subversion Optional. Only necessary if you want to build the latest development version (not the "release" versions).

Linux users: If your distribution separates libraries into normal and development version, make sure you get the development ones (e.g. in Debian/Ubuntu, the -dev packages). Ubuntu Intrepid users can install all these dependencies in one go by running this command in a terminal:

sudo apt-get install build-essential libfreetype6-dev cmake libpng12-dev zlib1g-dev \
     libglu1-mesa-dev libgl1-mesa-dev gcc g++ gettext libboost-dev libboost-thread-dev \
     libjpeg-dev libboost-filesystem-dev subversion libqt4-dev graphviz doxygen qt4-designer

For Mandriva users, the command line is:

urpmi libmesagl1-devel libmesaglu1-devel libSDL1.2-devel libSDL_sound1.0-devel zlib1-devel \
     libpng-devel libfreetype6-devel libboost1-devel libjpeg62-devel libqt4-devel doxygen \
     graphviz libSDL_mixer1.2-devel cmake

For Fedora 10, the command line is:

yum install gcc gcc-c++ libstdc++ cmake cmake-gui gettext gettext-devel mesa-libGL-devel \
     mesa-libGLU-devel zlib-devel libpng-devel freetype-devel boost-devel libjpeg-devel \
     qt-devel doxygen graphviz subversion make

Latest QT Libraries for Linux distros which don't have them in the repos

Stellarium tracks the recent QT releases fairly closely and as such many Linux distribution repositories do not contain an up-to-date enough version for building Stellarium. In the case of Ubuntu, the backports repository is often good enough, but there may be a need to install it "outside" you package manager. Here's how.

Since QT 4.5, this has been made a little easier for i386 users as Nokia now provide a binary installer. If you want to build it yourself from source, this is fine but it will take a long time. I recommend the following procedure for manually installing the latest QT:

  1. Download the Linux/X11 SDK package from here. Choose 32/64 bit as appropriate.
  2. Install it to /opt/qt45
  3. When you want to build Stellarium, execute these commands to set up the environment so that the new QT is used:
export QTDIR="/opt/qt45/qt"
export PATH="/opt/qt45/bin:/opt/qt45/qt/bin:${PATH##/opt/qt45/bin:/opt/qt45/qt/bin:}"
export LD_LIBRARY_PATH="/opt/qt45/lib:/opt/qt45/qt/lib:${LD_LIBRARY_PATH##/opt/qt45/lib:/opt/qt45/qt/lib:}"
  1. After installation, you should write a script which sets LD_LIBRARY_PATH and then calls Stellarium.

The exact paths might need slight tweaks if you install the "just libraries package" (please can someone check this?).

Personal tools
in this wiki
other languages