<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://springrts-wiki.p2004a.com/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gatopeich</id>
	<title>Spring - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://springrts-wiki.p2004a.com/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gatopeich"/>
	<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/wiki/Special:Contributions/Gatopeich"/>
	<updated>2026-11-08T22:26:32Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Linux&amp;diff=3373</id>
		<title>Building Spring on Linux</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Linux&amp;diff=3373"/>
		<updated>2012-03-15T19:37:31Z</updated>

		<summary type="html">&lt;p&gt;Gatopeich: Updating Ubuntu dependencies with package names that will pretty much anywhere&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[Building_spring|Building Spring]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
= Build From Source on Linux =&lt;br /&gt;
If you prefer to use your distributions package system (release versions only), refer to the Linux [[SetupGuide]].&lt;br /&gt;
&lt;br /&gt;
If there is no package tailored for your distribution, you have to install from sources manually. Doing this for distributions where packages are available is not recommended.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=warning&amp;gt;&#039;&#039;&#039;Warning:&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Be careful when building from source.&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
You might encounter sync errors in online play if:&lt;br /&gt;
* you are using an untested compiler (&#039;&#039;gcc&#039;&#039; from the 4.x serie should be safe)&lt;br /&gt;
* you use non-standard compiler settings (be careful about &#039;&#039;-march&#039;&#039;)!&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Obtaining the Source ==&lt;br /&gt;
{{Obtaining_The_Source_Code}}&lt;br /&gt;
&lt;br /&gt;
= Get Dependencies =&lt;br /&gt;
&lt;br /&gt;
To compile, you will have to install some development packages Spring depends on. These vary from distro to distro and may also depend on your specific configuration.&lt;br /&gt;
&lt;br /&gt;
If your distributions is not listed below, you should be able to figure out the correct package names from this.&lt;br /&gt;
&lt;br /&gt;
== Full list ==&lt;br /&gt;
* Programs necessary to build&lt;br /&gt;
** &#039;&#039;cmake&#039;&#039;&lt;br /&gt;
** &#039;&#039;7zip&#039;&#039; (aka &#039;&#039;p7zip&#039;&#039; or &#039;&#039;7z&#039;&#039;)&lt;br /&gt;
** The usual build toolchain&lt;br /&gt;
*** &#039;&#039;gcc&#039;&#039;&lt;br /&gt;
*** &#039;&#039;make&#039;&#039;&lt;br /&gt;
* Libraries&lt;br /&gt;
** SDL&lt;br /&gt;
** &#039;&#039;boost&#039;&#039; (version 1.35 or later)&lt;br /&gt;
*** &#039;&#039;threads&#039;&#039;&lt;br /&gt;
*** &#039;&#039;regex&#039;&#039;&lt;br /&gt;
*** &#039;&#039;signals&#039;&#039;&lt;br /&gt;
*** &#039;&#039;system&#039;&#039;&lt;br /&gt;
*** &#039;&#039;program-options&#039;&#039;&lt;br /&gt;
** &#039;&#039;libdeviL&#039;&#039; (IL)&lt;br /&gt;
** OpenAL (openal-soft, older openal-0.0.8 does not work)&lt;br /&gt;
** OpenGL headers (mesa, GLEW, etc.)&lt;br /&gt;
** &#039;&#039;zlib&#039;&#039;&lt;br /&gt;
** &#039;&#039;freetype&#039;&#039; (2)&lt;br /&gt;
** &#039;&#039;ogg&#039;&#039;, &#039;&#039;vorbis&#039;&#039; and &#039;&#039;vorbisfile&#039;&#039;&lt;br /&gt;
* Optional (for AI Interfaces and Skirmish AIs)&lt;br /&gt;
** &#039;&#039;python&#039;&#039; (2.5+)&lt;br /&gt;
** &#039;&#039;jdk&#039;&#039; (1.5+)&lt;br /&gt;
&lt;br /&gt;
== Debian ==&lt;br /&gt;
&lt;br /&gt;
For Etch (debian 4.0 stable) and Sid (debian unstable), I&#039;ve confirmed the&lt;br /&gt;
following to be the minimal set that is necessary to get. This works with Ubuntu 8.10, too.&lt;br /&gt;
As of ~ July 2009, spring depends on boost 1.35+ (if your distro is behind, you can try [https://launchpad.net/~pgquiles/+archive/ppa some unofficial backports]). &lt;br /&gt;
&lt;br /&gt;
Also, on 64-bit, be sure to build against DevIL 1.6.8-rc2+, as 1.6.7 has a bug in the PNG loading code that causes issues.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo aptitude install build-essential zlib1g-dev libfreetype6-dev&lt;br /&gt;
sudo aptitude install libsdl1.2-dev libopenal-dev libglew-dev zip&lt;br /&gt;
sudo aptitude install libvorbis-dev libxcursor-dev libdevil-dev&lt;br /&gt;
sudo aptitude install libboost-system1.37-dev libboost-system1.37-thread-dev&lt;br /&gt;
sudo aptitude install libboost-system1.37-regex-dev &lt;br /&gt;
sudo aptitude install libboost-system1.37-serialization-dev&lt;br /&gt;
sudo aptitude install libboost-system1.37-program-options-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and cmake, depending on what you use for building (I advise to use cmake). On debian 5.0 (lenny), libglew1.5-dev is required as well.&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu  ===&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# compiler and build tools&lt;br /&gt;
sudo apt-get install build-essential cmake cmake-gui git &lt;br /&gt;
&lt;br /&gt;
# spring dependencies&lt;br /&gt;
sudo apt-get install libglew-dev libsdl-dev libdevil-dev libopenal-dev \&lt;br /&gt;
 libogg-dev libvorbis-dev libfreetype6-dev p7zip-full libxcursor-dev \&lt;br /&gt;
 libboost-thread-dev libboost-regex-dev libboost-system-dev \&lt;br /&gt;
 libboost-program-options-dev libboost-signals-dev&lt;br /&gt;
&lt;br /&gt;
# alternatively, you can try ...&lt;br /&gt;
sudo apt-get build-dep spring&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
... and that should install all the required dependencies (&#039;&#039;it should but it appears to be broken - SpliFF 2011-02-21&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
NOTE: On Ubuntu the CMake scripts currently don&#039;t detect FREETYPE_INCLUDE_DIR. You will need to set this by hand (using -DFREETYPE_INCLUDE_DIR=&amp;quot;/usr/include/freetype2/freetype&amp;quot; or by adding an &#039;advanced&#039; entry in cmake-gui).&lt;br /&gt;
(this problem is either not reproducible with Ubuntu 10.10, or not present in spring master anymore)&lt;br /&gt;
&lt;br /&gt;
to speed up compiling/linking, you can install gold, an alternative linker and an ccache:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;sudo apt-get install binutils-gold ccache&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
to make ccache useful, the cache size needs to be increased by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;ccache -M 5G&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to set it to 5GB.&lt;br /&gt;
&lt;br /&gt;
== Gentoo ==&lt;br /&gt;
This has been tested to work with a clean install of gentoo 2008.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
emerge cmake \&amp;gt;=media-libs/freetype-2.0.0 \&amp;gt;=media-libs/libsdl-1.2.0&lt;br /&gt;
emerge media-libs/openal media-libs/glew dev-libs/boost&lt;br /&gt;
emerge app-arch/zip media-libs/libogg&lt;br /&gt;
USE=&amp;quot;png jpg tiff opengl&amp;quot; emerge media-libs/devil &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Fedora ==&lt;br /&gt;
&lt;br /&gt;
On Fedora 8:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cmake boost-devel openal-devel SDL-devel \&lt;br /&gt;
DevIL-devel glew-devel libvorbis-devel &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Fedora 12-15:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install gcc-c++ cmake boost-devel DevIL-devel freetype-devel \&lt;br /&gt;
glew-devel libvorbis-devel libXcursor-devel openal-devel SDL-devel p7zip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Slackware ==&lt;br /&gt;
&lt;br /&gt;
On Slackware 13, cmake, ogg &amp;amp; vorbis, boost, glew and SDL already come with the full regular install, both libs and headers. You can find helper scripts to easily compile and package DevIL, OpenAL and spring itself [http://slackbuilds.org/ here].&lt;br /&gt;
&lt;br /&gt;
= Build And Install =&lt;br /&gt;
&lt;br /&gt;
== Using CMake (2.6 or newer) ==&lt;br /&gt;
Configure and build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake .&lt;br /&gt;
make spring&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
make install-spring&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default install paths are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/usr/local/bin/spring&amp;lt;/code&amp;gt; Spring executable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/usr/local/share/games/spring&amp;lt;/code&amp;gt; read-only data&lt;br /&gt;
&lt;br /&gt;
If you want &amp;lt;code&amp;gt;~/spring&amp;lt;/code&amp;gt; prefix instead of &amp;lt;code&amp;gt;/usr/local&amp;lt;/code&amp;gt;, configure like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_INSTALL_PREFIX=~/spring .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
For further ways of customizing your build, have a look at the variables shown with:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -LH .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ububtu 9.10 - if it cannot locate freetype include dir, then use:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DFREETYPE_INCLUDE_DIR=/usr .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you experience performance problems on multi-core systems, you may additionally build the MT version of spring:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
make spring-multithreaded&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And install with:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
make install-spring-multithreaded&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other targets are: &amp;lt;code&amp;gt;spring-headless&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;spring-dedicated&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Troubleshooting_linux}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Compiling]]&lt;br /&gt;
[[Category:Linux]]&lt;/div&gt;</summary>
		<author><name>Gatopeich</name></author>
	</entry>
</feed>