Compile on OpenSuSE 12.2 with 'libboost 1.51 '

Questions, problems and discussion about compiling FreeOrion.

Moderators: Oberlus, Oberlus

Post Reply
Message
Author
Tuxlama
Space Krill
Posts: 1
Joined: Tue Nov 13, 2012 11:44 pm

Compile on OpenSuSE 12.2 with 'libboost 1.51 '

#1 Post by Tuxlama » Mon Nov 26, 2012 8:22 pm

Hi all,


first i want say Thank You all FreeOrion developers and contributors.

Back to subject, this is a small guide how to compile and run FreeOrion on OpenSuSE 12.2 with libboost-1.51 also works with 12.3 (i am using now)
( it's not possible since FO start depend with libboost=>1.5, there is only 1.49 in standard repositories )


a) Upgrade libboost to version 1.51

- before we start first uninstall libboost-1.49-devel if it's already installed
- add custom repository with libboost-1.51 from SuSEBuild service (see below) and install it, devel packages to
http://software.opensuse.org/ymp/home:g ... stem1_51_0

Code: Select all

boost-devel-1.51.0-8.11.1.i586.rpm
boost-devel-32bit-1.51.0-8.11.1.x86_64.rpm
boost-doc-html-1.51.0-8.11.1.noarch.rpm
boost-license1_51_0-1.51.0-8.11.1.noarch.rpm
libboost_chrono1_51_0-1.51.0-8.11.1.i586.rpm
libboost_context1_51_0-1.51.0-8.11.1.i586.rpm
libboost_date_time1_51_0-1.51.0-8.11.1.i586.rpm
libboost_filesystem1_51_0-1.51.0-8.11.1.i586.rpm
libboost_graph1_51_0-1.51.0-8.11.1.i586.rpm
libboost_iostreams1_51_0-1.51.0-8.11.1.i586.rpm
libboost_locale1_51_0-1.51.0-8.11.1.i586.rpm
libboost_math1_51_0-1.51.0-8.11.1.i586.rpm
libboost_program_options1_51_0-1.51.0-8.11.1.i586.rpm
libboost_python1_51_0-1.51.0-8.11.1.i586.rpm
libboost_random1_51_0-1.51.0-8.11.1.i586.rpm
libboost_regex1_51_0-1.51.0-8.11.1.i586.rpm
libboost_serialization1_51_0-1.51.0-8.11.1.i586.rpm
libboost_signals1_51_0-1.51.0-8.11.1.i586.rpm
libboost_system1_51_0-1.51.0-8.11.1.i586.rpm
libboost_test1_51_0-1.51.0-8.11.1.i586.rpm
libboost_thread1_51_0-1.51.0-8.11.1.i586.rpm
libboost_timer1_51_0-1.51.0-8.11.1.i586.rpm
libboost_wave1_51_0-1.51.0-8.11.1.i586.rpm
b) recompile libOgre-1.81 with libboost-1.51 ( there is libOgre-1.81 in Game repository but compiled with libboost-1.49, don't install it )

- dowload 'ogre-1.8.1-2.1.src.rpm' http://download.opensuse.org/repositori ... .1.src.rpm then rebuild it

Code: Select all

rpmbuild --rebuild ogre-1.8.1-2.1.src.rpm 
if you have any depency problem, instal missed lib and lib-devel[/b] packages, after successful compilation you can find a few Ogre libraries
at '/usr/src/packages/RPMS/<your_platfomr>' when rebuild as root or '/home/your_user_name/build//RPMS/<your_platfomr>' when you rebuild as user,

- check a new packages it's really compiled with libboost-1.51

Code: Select all

sudo -s rpm -q -i -p --requires libOgreMain1_8_1-1.8.1-2.1.x86_64.rpm

Code: Select all

(.....)
libXt.so.6()(64bit)  
libboost_chrono.so.1.51.0()(64bit)  
libboost_date_time.so.1.51.0()(64bit)  
libboost_system.so.1.51.0()(64bit)  
libboost_thread.so.1.51.0()(64bit)  
libc.so.6()(64bit) 
(......)
if it's looks ok, install all of it (i mean you have only Ogre compiled packages there)

Code: Select all

sudo -s  rpm -Uhv *.rpm  && ldconfig
c) now all is ready to compile GiGi and FreeOrion (if gigi tree was updated u have to recompile it)
- synchronize latest FreeOrion source, and continue http://www.freeorion.org/index.php/Compile_In_Linux FreeOrion amd GiGi parts only;)

- for me GiGi is installed in '/usr/local' , it's fine because ldconfig can find GiGi libraries,
only what i change is FreeOrion install directory to '/usr/local/games/freeorion' it's easier to make complete copy of game when u upgrade to new revision
- it's important, root directory contain freeorion binaries have to contain also 'ogre_plugins.cfg' and 'OISInput.cfg' files



- btw there is compiled binaries with u can try install on OpenSuSE 12.1 machine (it's works for me before upgrade to 12.2 )
viewtopic.php?f=24&t=6658

and have a fun :)


I have also one suggestion to developers, i lookout on web how to speed up my python (almost always get lags with 100+ systems and more then 2+ AI bots )
and i found this

http://www.parallelpython.com
Parallel python is free, open source software distributed under BSD-like license
Whith all respect, i'am not coder-programer but maybe it's solution for slower down playing.

Regards

Tuxlama
Last edited by Tuxlama on Mon Jun 24, 2013 4:45 pm, edited 9 times in total.

User avatar
Vezzra
Release Manager, Design
Posts: 5098
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Compile on OpenSuSE 12.2 with 'libboost 1.51 '

#2 Post by Vezzra » Tue Nov 27, 2012 9:31 am

Tuxlama wrote:I have also one suggestion to developers, i lookout on web how to speed up my python (almost always get lags with 100+ systems and more then 2+ AI bots )
and i found this

http://www.parallelpython.com
Parallel python is free, open source software distributed under BSD-like license
Whith all respect, i'am not coder-programer but maybe it's solution for slower down playing.
Looks interesting, but how much (if at all) this python module could help speed up things depends on if the AI code can take advantage of multithreading. As Dilvish is currently our prime AI coder, he can probably give the best guess on this.

The other concern is the license, it has to be compatible with GPL 2.0. When it comes to licenses, I've to admit my utter ignorance, so someone else will have to look at this. PP's license is BSD-like, the exact wording can be found here: http://www.parallelpython.com/content/view/19

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

Re: Compile on OpenSuSE 12.2 with 'libboost 1.51 '

#3 Post by Dilvish » Wed Nov 28, 2012 11:11 am

Hmm, well, in double checking some things to respond here, I've decided I have a lot more double checking to do :lol:

I had done some timing in the past that made the AI time requirements seem a modest portion of the total turn time, and observing their time taken already by watching the "Empires" panel and seeing how long it takes all of them to enter their orders (indicated by the sort of ">" marker for each changing to "...") also makes it look fairly modest. I just ran a multiplayer session, human observer, with some extra timer logging implemented, up to ~ turn 100, and it at least *appeared* (this timing I threw together quickly on the python side was just elapsed time, not definitively cpu time) that the AI did start taking about as much time as the server, or even more. I'll need to follow up with better timing.

I had been previously assuming that the python threading was initiated in a way that let it avoid getting tied up by the python Global Interpreter Lock and operate in parallel (since each AI gets its own thread), but this timing info made it look like it was not, so I will follow up on looking into different ways of launching the python AI processes. The one you've linked is a possibility, but first I'll look into using the multiprocessing module, since it's built into python from 2.6 onward, should do the trick for us, and I've used it before.

Cheers
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Post Reply