0.4.4 compil(ed|ing) for openSUSE

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
raptor
Space Squid
Posts: 87
Joined: Sat Jun 02, 2012 11:29 pm

0.4.4 compil(ed|ing) for openSUSE

#1 Post by raptor »

Hi,

I have the openSUSE Build Service compiling freeorion 0.4.4 right now. See:

https://build.opensuse.org/package/show/games/freeorion

It has succeeded on some of the platforms already (12.2 i586/x86_64, 12.3 i586). And it has failed on others because of the memory requirements for such heavy compilation units that freeorion somehow produces. I will re-trigger the builds one-by-one over the next few days.

The SPEC file used should work with Fedora as well. If anyone wants to build it on their own, use these steps:

1. Install package 'osc'
2. Checkout the project (in some directory of your choosing):

Code: Select all

osc co games bitfighter
3. Build the game according to your platform (see osc manpage):

Code: Select all

osc build --clean --no-verify --disable-debuginfo openSUSE_12.3 x86_64 freeorion.spec
OR (slightly different because of not being openSUSE):

Code: Select all

osc build --clean --no-verify --disable-debuginfo --disable-cpio-bulk-download --alternative-project Fedora:20 x86_64 freeorion.spec
4. Then wait... probably a long time for the packages to be built.

I have to hand it to the developers - this release was the first in which I didn't have to add a patch. Great job!

I only have one suggestion to make packaging a little more standard: Use %{CMAKE_INSTALL_LIBDIR} instead of using lib%{LIBSUFFIX} (which still worked OK, once I realized what it was doing).

Thanks again!

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

Re: 0.4.4 compil(ed|ing) for openSUSE

#2 Post by Dilvish »

raptor wrote:And it has failed on others because of the memory requirements for such heavy compilation units that freeorion somehow produces.
In your spec file you note

Code: Select all

# Only try with one thread since each compilation unit is so large
but then it says

Code: Select all

# make
%{__make} %{?_smp_mflags}
and I think _smp_mflags will generally specify at least -j3. The openSUSE specfile guidelines encourage explicitly setting -j1 in some cases and perhaps that's what you need here. I think building FreeOrion needs a bit over 1GB per thread, which is apparently not too uncommon.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

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

Re: 0.4.4 compil(ed|ing) for openSUSE

#3 Post by Geoff the Medio »

raptor wrote:And it has failed on others because of the memory requirements for such heavy compilation units...
Could you be more specific? Which files fail to build on the first try?
...that freeorion somehow produces.
Thank Boost and nested templates...

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

Re: 0.4.4 compil(ed|ing) for openSUSE

#4 Post by adrian_broher »

raptor wrote:I have to hand it to the developers - this release was the first in which I didn't have to add a patch. Great job!
Thanks!
raptor wrote:I only have one suggestion to make packaging a little more standard: Use %{CMAKE_INSTALL_LIBDIR} instead of using lib%{LIBSUFFIX} (which still worked OK, once I realized what it was doing).
For obvious reasons this won't happen for the release 0.4.4 or potential bug fix release of 0.4.4 but we can change this for future relases. I assume Apo (the debian maintainer of the FreeOrion package) would appreciate this too because of Debian MultiArch.
Last edited by adrian_broher on Sun Sep 07, 2014 2:04 pm, edited 2 times in total.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

raptor
Space Squid
Posts: 87
Joined: Sat Jun 02, 2012 11:29 pm

Re: 0.4.4 compil(ed|ing) for openSUSE

#5 Post by raptor »

Oops. I guess I left on %{__make} %{?_smp_mflags} when committing to the Build Service... that would probably explain all the failures, then. Thanks for catching that (I actually used -j1 on 0.4.3 but changed it in my test environment for 0.4.4).

Each of the failures failed on one of the parser classes, but I only have one log at the moment that says it failed on the BuildingsParser.cpp. I'm sorry I don't have more since I've already re-triggered a few of the failed builds, but I do remember them all failing somewhere in libfreeorionparse.so.

Post Reply