FreeOrion for Debian - Build failures

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

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

Re: FreeOrion for Debian - Build failures

#16 Post by Apo »

Hello,

here is an update on building FreeOrion for different architectures.

FreeOrion currently builds on amd64, i386, armel, armhf, powerpc, s390x, sparc, alpha, hppa and ppc64.

https://buildd.debian.org/status/packag ... e=unstable
http://buildd.debian-ports.org/status/p ... &suite=sid

The build-dependencies on other architectures are either not satisfiable or the build fails because the server runs out of virtual memory. (mips and mipsel)

I followed your advice and changed the gcc optimization level for armel, armhf, mips and mipsel from -O2 to Os and I also stopped building in parallel on these architectures. At least FreeOrion can be built on armel and armhf now. Unfortunately the build still fails on mips and mipsel. The problem seems to be in ConditionParser2.cpp. Full build log is here:

https://buildd.debian.org/status/fetch. ... 1407819242

I have no patches but wanted to let you know about it.

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

Re: FreeOrion for Debian - Build failures

#17 Post by adrian_broher »

Apo wrote:The problem seems to be in ConditionParser2.cpp.
If that's the case this probably can be fixed by splitting up ConditionParser2.cpp again. This is a recurring problem with the parser component in general because it relies on boost spirit which is a enormous pile of template magic. I doubt we should put effort into this because according to popcon mips and mipsel are hardly used platforms and I doubt that any of them is used with a graphical desktop.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

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

Re: FreeOrion for Debian - Build failures

#18 Post by Geoff the Medio »

Apo wrote:The problem seems to be in ConditionParser2.cpp.
Can it build any of the higher-numbered ConditionParser files, or is it just ConditionParser2.cpp that causes a problem?

My guess is that it's just the enqueued condition causing problems in that file.

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

Re: FreeOrion for Debian - Build failures

#19 Post by Apo »

adrian_broher wrote:
Apo wrote:The problem seems to be in ConditionParser2.cpp.
If that's the case this probably can be fixed by splitting up ConditionParser2.cpp again. This is a recurring problem with the parser component in general because it relies on boost spirit which is a enormous pile of template magic. I doubt we should put effort into this because according to popcon mips and mipsel are hardly used platforms and I doubt that any of them is used with a graphical desktop.
There are people who use mips/mipsel, most notably Richard Stallman himself. It is true that mips and mipsel are not very common yet but these architectures target similar markets as ARM for example and although ARM is not a popular desktop PC architecture yet, it is very often seen in mobile devices like smartphones and tablets.

I have just rebuilt freeorion for Ubuntu 14.10 in my newly created PPA and the build failed during my first try at 61% in IntValueRefParser.cpp because it ran out of virtual memory again. Hence I think fixing the mips/mipsel issue would have a direct impact on other architectures too and it would allow us to switch back to default compiler options on armel/armhf for example.
Geoff the Medio wrote:
Apo wrote:The problem seems to be in ConditionParser2.cpp.
Can it build any of the higher-numbered ConditionParser files, or is it just ConditionParser2.cpp that causes a problem?

My guess is that it's just the enqueued condition causing problems in that file.
I have checked the old build logs and it appears it always fails either in IntValueRefParser.cpp or ConditionParser2.cpp. Unfortunately I don't own that hardware myself and I have no direct access to the auto-builders thus I can't verify if any higher-numbered ConditionParser files are affected as well.

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

Re: FreeOrion for Debian - Build failures

#20 Post by Geoff the Medio »

Apo wrote:I have checked the old build logs and it appears it always fails either in IntValueRefParser.cpp or ConditionParser2.cpp. Unfortunately I don't own that hardware myself and I have no direct access to the auto-builders thus I can't verify if any higher-numbered ConditionParser files are affected as well.
I don't see any obvious (to me) candidates for simplification in IntValueRefParser, so without some feedback of test changes, I doubt much can be done about that.

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

Re: FreeOrion for Debian - Build failures

#21 Post by Apo »

I applied your patch for ConditionParser2.cpp and uploaded 0.4.4-RC2 yesterday. That seems to be an improvement but now it runs out of virtual memory in ConditionParser3.cpp.

https://buildd.debian.org/status/fetch. ... 1408759357

Perhaps you are right that all higher-numbered ConditionParser files are affected as well.

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

Re: FreeOrion for Debian - Build failures

#22 Post by Geoff the Medio »

Some additional parsers have been split: http://sourceforge.net/p/freeorion/code/7599/

See if that makes any difference?

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

Re: FreeOrion for Debian - Build failures

#23 Post by Apo »

Thanks for your efforts. Unfortunately the build still fails in ConditionParser3.cpp.

https://buildd.debian.org/status/fetch. ... 1409029721

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

Re: FreeOrion for Debian - Build failures

#24 Post by Geoff the Medio »

There's not much more I'm aware of that can be changed to reduce memory requirements. I suppose that file could be broken up into two - it is the biggest of the parser source files - but that didn't seem to help much previously (vs. simplifying the individual parser expressions).

And, I don't want to do more drastic reorganization of the code without some more rapid feedback that doesn't involve committing the test changes to the release branch.

Perhaps something can be changed in the build scripts, so only one source file at a time is compiled (if not already the case)? If not, then they just need to provide more virtual memory to compile the FreeOrion parsers...

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

Re: FreeOrion for Debian - Build failures

#25 Post by Apo »

Geoff the Medio wrote:There's not much more I'm aware of that can be changed to reduce memory requirements. I suppose that file could be broken up into two - it is the biggest of the parser source files - but that didn't seem to help much previously (vs. simplifying the individual parser expressions).
I don't know what kind of splits have been made before but the changes in ConditionParser2.cpp were definitively an improvement.
Geoff the Medio wrote:If not, then they just need to provide more virtual memory to compile the FreeOrion parsers...
Sure, you can do sport or buy bigger trousers. :P

More memory will be tough. Unfortunately that's nothing I can influence. I'll keep an eye on the issue.

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

Re: FreeOrion for Debian - Build failures

#26 Post by Geoff the Medio »

Apo wrote:I don't know what kind of splits have been made before but the changes in ConditionParser2.cpp were definitively an improvement.
Same things in the two patches... splitting complicated parsers into separate bits instead of one big OR between variants.
http://sourceforge.net/p/freeorion/code/7533/
http://sourceforge.net/p/freeorion/code/7570/

Post Reply