Build Dependencies

(Difference between revisions)
Jump to: navigation, search
(Qt 4.6 will be required to build the SVN versions)
(30 intermediate revisions by 10 users not shown)
Line 4: Line 4:
 
| '''Dependency''' || '''Ubuntu package name''' || '''Notes'''   
 
| '''Dependency''' || '''Ubuntu package name''' || '''Notes'''   
 
|-
 
|-
||[http://www.gnu.org/software/automake/ Automake] || automake1.9 || 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
|-
+
||[http://www.gnu.org/software/autoconf/ Autoconf] || autoconf || Not required >= Stellarium v0.9.0. We now use CMake.
+
|-
+
||[http://www.cmake.org/ CMake] || cmake || Required >= Stellarium 0.9.0.  Get version 2.4-patch 7 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)
|-
+
||[http://www.libsdl.org SDL] || libsdl-dev ||
+
 
|-
 
|-
 
||[http://www.zlib.net Zlib] || zlib1g-dev ||
 
||[http://www.zlib.net Zlib] || zlib1g-dev ||
 
|-
 
|-
||[http://www.libpng.org PNG] || libpng12-dev ||
+
||[http://www.libpng.org PNG] || libpng12-dev || (Not needed from version 0.10.3)
 
|-
 
|-
 
||[http://www.freetype.org/ Freetype] || libfreetype6-dev || Apparently at least later than 2.1.0.
 
||[http://www.freetype.org/ Freetype] || libfreetype6-dev || Apparently at least later than 2.1.0.
 +
(Not needed after about revision 4849)
 
|-
 
|-
||Boost C++ Libraries || libboost-dev || Since about 2006-08-28.
+
||Boost C++ Libraries || libboost-dev ||  
 +
(Not needed after about revision 4635) Required for 0.10.2.
 
|-
 
|-
||JPEG libraries || libjpeg62-dev || New in version 0.9.x
+
||JPEG libraries || libjpeg62-dev || (Not needed from version 0.10.3)
 
|-
 
|-
||Curl library || libcurl3-dev || Only for version 0.9.0. ''Not needed for version 0.9.1.''
+
||QT library >= 4.6.0 || libqt4-dev* || See notes below.
 
|-
 
|-
||QT 4.3 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. 
+
||Phonon for QT4 || libqt4-phonon-dev || ''Optional''Needed to build audio support.  Note: you must not have libphonon-dev installed, just the qt4 one.
'''Note: If you want to build recent SVN, you will need version 4.4 of QT'''.  Sadly this it not yet in the Ubuntu repositories, so you will have to build it from source, or get hold of the 4.4 package from the backports repositry.
+
 
|-
 
|-
 
||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 41: 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).
 
'''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 users can install all these dependencies in one go by running this command in a terminal:
+
Ubuntu Intrepid 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 \
+
  sudo apt-get install build-essential libfreetype6-dev cmake libpng12-dev zlib1g-dev \
      libpng12-dev libsdl1.2-dev zlib1g-dev libglu1-mesa-dev libgl1-mesa-dev gcc \
+
      libglu1-mesa-dev libgl1-mesa-dev gcc g++ gettext libboost-dev libboost-thread-dev \
      g++ gettext libboost-dev libboost-thread-dev libjpeg-dev \
+
       libjpeg-dev libboost-filesystem-dev bzr libqt4-dev graphviz \
       libboost-filesystem-dev subversion libqt4-dev graphviz doxygen cmake
+
      doxygen qt4-designer libqt4-phonon-dev
  
Ubuntu Dapper users (long term support release) will have to download and build CMake first—the version of CMake from the Dapper repositories is too old.
+
For 0.10.6 you only need these
  
For Mandriva users the command line is:
+
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 \
 
  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 \
 
       libpng-devel libfreetype6-devel libboost1-devel libjpeg62-devel libqt4-devel doxygen \
       graphviz libSDL_mixer1.2-devel cmake
+
       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.
 +
 
 +
==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.

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