Compilation on Debian 7.0 (Wheezy)/Free Orion - Log/Guide

Questions, problems and discussion about compiling FreeOrion.

Moderators: Oberlus, Oberlus

Post Reply
Message
Author
g4spr0m
Space Krill
Posts: 2
Joined: Wed Jun 26, 2013 11:41 pm

Compilation on Debian 7.0 (Wheezy)/Free Orion - Log/Guide

#1 Post by g4spr0m » Wed Jun 26, 2013 11:53 pm

This is log/guide of succesfull compilation of Free Orion [6200] on Debian 7.0 (Wheezy). I hope it will be useful for some users. It is not idiotproof and it require some basic knowledge.
I created this topic, because in my case I had to make some adjustments during compilation and not all sections of Wiki were applicable (another way of building Bullet, different filepaths or package names).
Enjoy!

Sysinfo:

Code: Select all

$ uname -a
Linux [hostname] 3.2.0-4-686-pae #1 SMP Debian 3.2.46-1 i686 GNU/Linux
$ gcc --version
gcc (Debian 4.7.2-5) 4.7.2
$ g++ --version
g++ (Debian 4.7.2-5) 4.7.2
$ apt-show-versions build-essential subversion pkg-config libltdl-dev cmake python2.6-dev libfreetype6-dev libsdl1.2-dev libalut-dev libvorbis-dev libois-dev libtiff4-dev libopenal-dev libogre-dev libzzip-dev libfreeimage-dev x11proto-xf86vidmode-dev libxxf86vm-dev libboost-dev libboost-all-dev
build-essential/wheezy uptodate 11.5
cmake/wheezy uptodate 2.8.9-1
libalut-dev/wheezy uptodate 1.1.0-3
libboost-all-dev/wheezy uptodate 1.49.0.1
libboost-dev/wheezy uptodate 1.49.0.1
libfreeimage-dev/wheezy uptodate 3.15.1-1+b1
libfreetype6-dev/wheezy uptodate 2.4.9-1.1
libltdl-dev/wheezy uptodate 2.4.2-1.1
libogre-dev/wheezy uptodate 1.7.4+dfsg1-7
libois-dev/wheezy uptodate 1.3.0+dfsg0-5
libopenal-dev/wheezy uptodate 1:1.14-4
libsdl1.2-dev/wheezy uptodate 1.2.15-5
libtiff4-dev/wheezy uptodate 3.9.6-11
libvorbis-dev/wheezy uptodate 1.3.2-1.3
libxxf86vm-dev/wheezy uptodate 1:1.1.2-1+deb7u1
libzzip-dev/wheezy uptodate 0.13.56-1.1
pkg-config/wheezy uptodate 0.26-1
python2.6-dev/wheezy uptodate 2.6.8-1.1
subversion/wheezy uptodate 1.6.17dfsg-4+deb7u3
x11proto-xf86vidmode-dev/wheezy uptodate 2.3.1-2
Install required packages (some names are different than on Wiki article)

Code: Select all

# apt-get install build-essential subversion pkg-config libltdl-dev cmake python2.6-dev libfreetype6-dev libsdl1.2-dev libalut-dev libvorbis-dev libois-dev libtiff4-dev libopenal-dev libogre-dev libzzip-dev libfreeimage-dev x11proto-xf86vidmode-dev libxxf86vm-dev
# apt-get install libboost-dev libboost-all-dev --install-recommends
Missing dependiences: Bullet (this is totally non-Wiki way)
Add 'deb-src http://http.debian.net/debian sid main' to /etc/apt/sources.list

Code: Select all

# apt-get update
# apt-get install debhelper devscripts build-essential
# apt-get build-dep bullet
$ mkdir dep
$ cd dep
$ apt-get -b source bullet
# dpkg -i *.deb
Just for your information; in my case it was the following packages:

Code: Select all

$ ls | grep deb
bullet_2.81-rev2613+dfsg-2.debian.tar.xz
libbullet2.81-dbg_2.81-rev2613+dfsg-2_i386.deb
libbulletcollision2.81_2.81-rev2613+dfsg-2_i386.deb
libbullet-dev_2.81-rev2613+dfsg-2_i386.deb
libbullet-doc_2.81-rev2613+dfsg-2_all.deb
libbulletdynamics2.81_2.81-rev2613+dfsg-2_i386.deb
libbullet-extras-dev_2.81-rev2613+dfsg-2_i386.deb
libbulletfileloader2.81_2.81-rev2613+dfsg-2_i386.deb
libbulletsoftbody2.81_2.81-rev2613+dfsg-2_i386.deb
libbulletworldimporter2.81_2.81-rev2613+dfsg-2_i386.deb
libbulletxmlworldimporter2.81_2.81-rev2613+dfsg-2_i386.deb
libconvexdecomposition2.81_2.81-rev2613+dfsg-2_i386.deb
libgimpactutils2.81_2.81-rev2613+dfsg-2_i386.deb
libhacd2.81_2.81-rev2613+dfsg-2_i386.deb
liblinearmath2.81_2.81-rev2613+dfsg-2_i386.deb
I believe the only packages really required by Free Orion are:

Code: Select all

libbulletcollision2.81_2.81-rev2613+dfsg-2_i386.deb
libbullet-dev_2.81-rev2613+dfsg-2_i386.deb
libbulletdynamics2.81_2.81-rev2613+dfsg-2_i386.deb
libbulletsoftbody2.81_2.81-rev2613+dfsg-2_i386.deb
liblinearmath2.81_2.81-rev2613+dfsg-2_i386.deb
I preferred to install all bullet source "just in case".

Symbolic links (another filepaths than paths mentioned in Wiki article):

Code: Select all

# ln -s /usr/lib/i386-linux-gnu/libBulletCollision.so /usr/local/lib/libbulletcollision.so
# ln -s /usr/lib/i386-linux-gnu/libBulletDynamics.so /usr/local/lib/libbulletdynamics.so
# ln -s /usr/lib/i386-linux-gnu/libLinearMath.so /usr/local/lib/libbulletmath.so

Code: Select all

$ cd .../FreeOrion
$ ln -s /usr/lib/i386-linux-gnu/OGRE-1.7.4/Plugin_OctreeSceneManager.so
$ ln -s /usr/lib/i386-linux-gnu/OGRE-1.7.4/Plugin_ParticleFX.so
$ ln -s /usr/lib/i386-linux-gnu/OGRE-1.7.4/RenderSystem_GL.so
$ ln -s /usr/lib/i386-linux-gnu/OGRE-1.7.4/Plugin_BSPSceneManager.so
$ ln -s /usr/lib/i386-linux-gnu/OGRE-1.7.4/Plugin_OctreeZone.so
$ ln -s /usr/lib/i386-linux-gnu/OGRE-1.7.4/Plugin_PCZSceneManager.so
Compile:

Code: Select all

$ cmake .
$ make
Last edited by g4spr0m on Thu Jun 27, 2013 8:55 am, edited 2 times in total.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12499
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Compilation on Debian 7.0 (Wheezy)/Free Orion - Log/Guid

#2 Post by Geoff the Medio » Thu Jun 27, 2013 12:19 am

g4spr0m wrote:

Code: Select all

$ ln -s /usr/lib/i386-linux-gnu/OGRE-1.7.4/Plugin_BSPSceneManager.so
$ ln -s /usr/lib/i386-linux-gnu/OGRE-1.7.4/Plugin_OctreeZone.so
$ ln -s /usr/lib/i386-linux-gnu/OGRE-1.7.4/Plugin_PCZSceneManager.so
I don't think those OGRE plugins are necessary for FreeOrion. At least on Windows, only RenderSystem_GL, Plugin_ParticleFX, and Plugin_OctreeSceneManager are used.

AndrewW
Juggernaut
Posts: 789
Joined: Mon Feb 04, 2013 10:15 pm

Re: Compilation on Debian 7.0 (Wheezy)/Free Orion - Log/Guid

#3 Post by AndrewW » Thu Jun 27, 2013 1:06 am

Creating links shouldn't be needed anymore.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12499
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Compilation on Debian 7.0 (Wheezy)/Free Orion - Log/Guid

#4 Post by Geoff the Medio » Thu Jun 27, 2013 1:11 am

It would also probably be preferable to use Python 2.7 over 2.6.

g4spr0m
Space Krill
Posts: 2
Joined: Wed Jun 26, 2013 11:41 pm

Re: Compilation on Debian 7.0 (Wheezy)/Free Orion - Log/Guid

#5 Post by g4spr0m » Thu Jun 27, 2013 8:32 am

Creating links shouldn't be needed anymore.
Linking Bullet's libs to /usr/local is obsolete too?
It would also probably be preferable to use Python 2.7 over 2.6.
Yes, this sounds reasonable. Actually I have a Python 2.7 installed and I probably used it during compilation:

Code: Select all

~$ python --version
Python 2.7.3
I installed Python 2.6 anyways, because sometimes compiled programs require downgraded versions of packages to work (and compile) and maybe thanks to some mindless copy/pasta. Thank you for all the answers.

EDIT:
I believe the only Bullet's packages really required by Free Orion are:

Code: Select all

libbulletcollision2.81_2.81-rev2613+dfsg-2_i386.deb
libbullet-dev_2.81-rev2613+dfsg-2_i386.deb
libbulletdynamics2.81_2.81-rev2613+dfsg-2_i386.deb
libbulletsoftbody2.81_2.81-rev2613+dfsg-2_i386.deb
liblinearmath2.81_2.81-rev2613+dfsg-2_i386.deb
I preferred to install all bullet source "just in case".

AndrewW
Juggernaut
Posts: 789
Joined: Mon Feb 04, 2013 10:15 pm

Re: Compilation on Debian 7.0 (Wheezy)/Free Orion - Log/Guid

#6 Post by AndrewW » Thu Jun 27, 2013 9:17 am

g4spr0m wrote:Linking Bullet's libs to /usr/local is obsolete too?
Correct.

For reference you can try this thread:

viewtopic.php?f=24&t=7205

The first post on that is updated with current requirements (unless they've recently snuck another change in...). Of course will be some difference (like using apt-get instead of emerge) but should be easy to adapt.

User avatar
adrian_broher
Programmer
Posts: 1086
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: Compilation on Debian 7.0 (Wheezy)/Free Orion - Log/Guid

#7 Post by adrian_broher » Thu Jun 27, 2013 9:20 am

AndrewW wrote:The first post on that is updated with current requirements (unless they've recently snuck another change in...).
This one is also outdated. :) There is no need to fiddle with sed, cmake takes care of the ogre_plugins.cfg setup.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

AndrewW
Juggernaut
Posts: 789
Joined: Mon Feb 04, 2013 10:15 pm

Re: Compilation on Debian 7.0 (Wheezy)/Free Orion - Log/Guid

#8 Post by AndrewW » Thu Jun 27, 2013 5:27 pm

adrian_broher wrote:This one is also outdated. :) There is no need to fiddle with sed, cmake takes care of the ogre_plugins.cfg setup.
Arghhhh, guess I get to update again.

Maybe when there are changes that effect compiling something about this could be posted here in the Compile section of the forum? This would make it easier for those of us trying to keep things updated on what's needed to compile on a given platform.

User avatar
adrian_broher
Programmer
Posts: 1086
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: Compilation on Debian 7.0 (Wheezy)/Free Orion - Log/Guid

#9 Post by adrian_broher » Thu Jun 27, 2013 5:39 pm

AndrewW wrote:Maybe when there are changes that effect compiling something about this could be posted here in the Compile section of the forum? This would make it easier for those of us trying to keep things updated on what's needed to compile on a given platform.
Why? The wiki should be the appropriate place for this kind of documentation, the forum isn't as accessible as the front page.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

User avatar
Dilvish
AI Lead, Programmer
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Compilation on Debian 7.0 (Wheezy)/Free Orion - Log/Guid

#10 Post by Dilvish » Thu Jun 27, 2013 6:19 pm

adrian_broher wrote:
AndrewW wrote:Maybe when there are changes that effect compiling something about this could be posted here in the Compile section of the forum? This would make it easier for those of us trying to keep things updated on what's needed to compile on a given platform.
Why? The wiki should be the appropriate place for this kind of documentation, the forum isn't as accessible as the front page.
It would make sense to me to have the info posted to both -- the wiki is the best long term repository for info & where any newcomers will look, but for folks currently playing/compiling, I don't think they should be expected to check the wiki daily for possible changes, but it's easy for them to check for new posts, & notice if any of those are about compiling. Checking the wiki frequently probably wouldn't be any more work than checking for new posts, but since the former will rarely yield anything of interest, while the latter often will, I think it would be better to expect them to do the latter.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

AndrewW
Juggernaut
Posts: 789
Joined: Mon Feb 04, 2013 10:15 pm

Re: Compilation on Debian 7.0 (Wheezy)/Free Orion - Log/Guid

#11 Post by AndrewW » Thu Jun 27, 2013 7:32 pm

adrian_broher wrote:Why? The wiki should be the appropriate place for this kind of documentation, the forum isn't as accessible as the front page.
For those of us updating things it would be a lot easier to find new posts on the forum then having to go keep going to check the Wiki on the off chance something was updated.

Apo
Space Squid
Posts: 89
Joined: Fri Apr 19, 2013 4:10 pm

Re: Compilation on Debian 7.0 (Wheezy)/Free Orion - Log/Guid

#12 Post by Apo » Fri Jun 28, 2013 10:17 am

A Debian package for FreeOrion is already available.

http://packages.qa.debian.org/f/freeorion.html

I believe the easiest way to compile FreeOrion from source on a Debian system is to enable the experimental repository and to perform the following steps:

Code: Select all

apt-get source -t experimental freeorion
apt-get build-dep freeorion

cd into freeorion directory

debuild -us -uc
To experiment with the latest version from trunk you need to adjust the get-orig-source target in debian/rules.

Post Reply