Build Dependencies

(Difference between revisions)
Jump to: navigation, search
m
(Qt 4.6 will be required to build the SVN versions)
(37 intermediate revisions by 13 users not shown)
Line 4: Line 4:
 
| '''Dependency''' || '''Ubuntu package name''' || '''Notes'''   
 
| '''Dependency''' || '''Ubuntu package name''' || '''Notes'''   
 
|-
 
|-
||Automake || automake1.9 || [http://www.gnu.org/software/automake/ website]. Not required >= Stellarium v0.9.0 - we now use CMake.
+
||[http://www.cmake.org/ CMake] || cmake || Required >= Stellarium 0.9.0.  Get version 2.6 or higher. from stellarium 0.10.3 version 2.8 is required
|-
+
||Autoconf || autoconf || [http://www.gnu.org/software/autoconf/ website]. Not required >= Stellarium v0.9.0 - we now use CMake.
+
|-
+
||CMake || cmake || [http://www.cmake.org/ website]. Required >= Stellarium 0.9.0.  Get version 2.4-patch 6 or higher of CMake.
+
 
|-
 
|-
 
||GNU C Compiler || gcc || Or compatible alternative.
 
||GNU C Compiler || gcc || Or compatible alternative.
Line 18: Line 14:
 
||Open GL || libgl1-mesa-dev ||  
 
||Open GL || libgl1-mesa-dev ||  
 
|-
 
|-
||GLU || libglu1-mesa-dev ||
+
||GLU || libglu1-mesa-dev || (Not needed from version 0.10.3)
 
|-
 
|-
||SDL || libsdl-dev || [http://www.libsdl.org website]
+
||[http://www.zlib.net Zlib] || zlib1g-dev ||
 
|-
 
|-
||Zlib || zlib1g-dev || [http://www.zlib.net website]
+
||[http://www.libpng.org PNG] || libpng12-dev || (Not needed from version 0.10.3)
 
|-
 
|-
||PNG || libpng12-dev || [http://www.libpng.org website]
+
||[http://www.freetype.org/ Freetype] || libfreetype6-dev || Apparently at least later than 2.1.0.
 +
(Not needed after about revision 4849)
 
|-
 
|-
||Freetype || libfreetype6-dev || [http://www.freetype.org/ website].  Apparently at least later than 2.1.0.
+
||Boost C++ Libraries || libboost-dev ||  
 +
(Not needed after about revision 4635) Required for 0.10.2.
 
|-
 
|-
||Boost C++ Libraries || libboost-dev || Since about 2006-08-28
+
||JPEG libraries || libjpeg62-dev || (Not needed from version 0.10.3)
 
|-
 
|-
||JPEG libraries || libjpeg62-dev || New in version 0.9.x
+
||QT library >= 4.6.0 || libqt4-dev* || See notes below.
 
|-
 
|-
||Curl library || libcurl3-dev || New in version 0.9.x
+
||Phonon for QT4 || libqt4-phonon-dev || ''Optional''. Needed to build audio supportNote: you must not have libphonon-dev installed, just the qt4 one.
|-
+
||QT 4.2 library || libqt4-dev || New in version 0.9.xYou must make sure that if you have alternatives for QT development tools for QT3, that you set up your alternatives to point at the QT4 versions of the tools (moc etc.).  Since SVN revision 2162, QT is required, not just an optional dependency.
+
 
|-
 
|-
 
||Doxygen || doxygen || ''Optional''. If you want to build the API documentation you will need this.
 
||Doxygen || doxygen || ''Optional''. If you want to build the API documentation you will need this.
Line 40: Line 36:
 
||Graphviz || graphviz || ''Optional''. If you want to build the API document and include fancy class diagrams, you will need this.
 
||Graphviz || graphviz || ''Optional''. If you want to build the API document and include fancy class diagrams, you will need this.
 
|-
 
|-
||SDL-mixer || libsdl-mixer1.2-dev || ''Optional''. If you want to enable audio features in scripting.
+
||Bazaar || bzr || ''Optional''. Only necessary if you want to build the latest development version (not the "release" versions).
|-
+
||Subversion || subversion || ''Optional''. Only necessary if you want to build the latest development version (not the "release" versions).
+
 
|-
 
|-
 
|}
 
|}
  
This list is getting quite long...  We hope to remove some dependencies after the 0.9.0 release.
+
'''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 bzr libqt4-dev graphviz \
 +
      doxygen qt4-designer libqt4-phonon-dev
 +
 
 +
For 0.10.6 you only need these
 +
 
 +
sudo apt-get install build-essential libfreetype6-dev cmake libpng12-dev zlib1g-dev \
 +
      libglu1-mesa-dev libgl1-mesa-dev gcc g++ gettext \
 +
      libjpeg-dev bzr libqt4-dev graphviz doxygen qt4-designer libqt4-phonon-dev
 +
 
 +
If you have Ubuntu 12.04 it does not appear to respond to build-essential or libqt4-phonon-dev try if the install stalls when it can't find build-essential
 +
 
 +
sudo apt-get install libfreetype6-dev cmake libpng12-dev zlib1g-dev \
 +
      libglu1-mesa-dev libgl1-mesa-dev gcc g++ gettext \
 +
      libjpeg-dev bzr 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 gcc-c++ make gettext
 +
 
 +
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
 +
 
 +
For OpenSuSE 11.2:
 +
sudo zypper install gcc gcc-c++ make zlib-devel libjpeg-devel libSDL-devel libSDL_mixer-devel \
 +
      libpng-devel cmake libqt4-devel boost-devel subversion freetype2-devel
 +
 
 +
[[Category:Development]]
 +
 
 +
 
 +
==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" your 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:
 +
#Download the Linux/X11 SDK package from [http://www.qtsoftware.com/downloads here]Choose 32/64 bit as appropriate.
 +
#Install it to /opt/qt45
 +
#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:}"
 +
#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?).
 +
 
 +
Once these esentials are installed the compile should progress with no more problems.
  
'''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).
+
==Qt 4.8 will be required to build the Bazaar versions==
Ubuntu Feisty users can install all these dependencies in one go by running this command in a terminal:
+
sudo aptitude install build-essential libfreetype6-dev cvs libsdl-mixer1.2-dev \
+
      libpng12-dev libsdl1.2-dev zlib1g-dev libglu1-mesa-dev libgl1-mesa-dev gcc \
+
      g++ gettext libboost-dev libboost-thread-dev  libjpeg-dev libcurl3-dev \
+
      libboost-filesystem-dev subversion libqt4-dev graphviz doxygen cmake
+
  
Ubuntu Dapper users (long term support release), you will have to download and build CMake first - the version of CMake from the Dapper repositories is too old.
+
After build 5572 Qt 4.8 will be needed. following the same procedure as above should get the Linux/X11 SDK package installed. However I ran into all sorts of problems not finding various dependancies and found the old method of compiling Qt 4.8 from source gave the easiest results. However if you compile it yourself be prepared for a long job, 5 hours plus! Then "sudo make install" will get it where it is needed.
  
For mandriva users : here is the command line :
+
Also Cmake 2.8 will be required for compiling the latest source, Downlaod it and install it in the usr area.
urpmi libmesagl1-devel libmesaglu1-devel libSDL1.2-devel libSDL_sound1.0-devel zlib1-devel libpng-devel libfreetype6-devel libboost1-devel libjpeg62-devel libcurl-devel libqt4-devel doxygen graphviz libSDL_mixer1.2-devel cmake
+

Revision as of 05:18, 6 September 2012

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. from stellarium 0.10.3 version 2.8 is required
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 (Not needed from version 0.10.3)
Zlib zlib1g-dev
PNG libpng12-dev (Not needed from version 0.10.3)
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 (Not needed from version 0.10.3)
QT library >= 4.6.0 libqt4-dev* See notes below.
Phonon for QT4 libqt4-phonon-dev Optional. Needed to build audio support. Note: you must not have libphonon-dev installed, just the qt4 one.
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.
Bazaar bzr 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 bzr libqt4-dev graphviz \
     doxygen qt4-designer libqt4-phonon-dev 

For 0.10.6 you only need these

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

If you have Ubuntu 12.04 it does not appear to respond to build-essential or libqt4-phonon-dev try if the install stalls when it can't find build-essential

sudo apt-get install libfreetype6-dev cmake libpng12-dev zlib1g-dev \
     libglu1-mesa-dev libgl1-mesa-dev gcc g++ gettext \
     libjpeg-dev bzr 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 gcc-c++ make gettext

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

For OpenSuSE 11.2:

sudo zypper install gcc gcc-c++ make zlib-devel libjpeg-devel libSDL-devel libSDL_mixer-devel \
     libpng-devel cmake libqt4-devel boost-devel subversion freetype2-devel


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" your 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?).

Once these esentials are installed the compile should progress with no more problems.

Qt 4.8 will be required to build the Bazaar versions

After build 5572 Qt 4.8 will be needed. following the same procedure as above should get the Linux/X11 SDK package installed. However I ran into all sorts of problems not finding various dependancies and found the old method of compiling Qt 4.8 from source gave the easiest results. However if you compile it yourself be prepared for a long job, 5 hours plus! Then "sudo make install" will get it where it is needed.

Also Cmake 2.8 will be required for compiling the latest source, Downlaod it and install it in the usr area.

Personal tools
Namespaces
Variants
Actions
in this wiki
other languages
Toolbox