Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 561960 - games-strategy/0ad does not build with GCC 5.x
Summary: games-strategy/0ad does not build with GCC 5.x
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-5
  Show dependency tree
 
Reported: 2015-10-01 09:12 UTC by Alexander Arques
Modified: 2016-07-09 18:06 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log (build.log,122.54 KB, text/plain)
2015-10-01 09:13 UTC, Alexander Arques
Details
Patch file 1/3 (build.patch,575 bytes, patch)
2015-10-01 09:17 UTC, Alexander Arques
Details | Diff
Patch file 2/3 (FixBug1021171.patch,9.36 KB, patch)
2015-10-01 09:17 UTC, Alexander Arques
Details | Diff
Patch file 3/3 (FixBug1119228.patch,1.90 KB, patch)
2015-10-01 09:17 UTC, Alexander Arques
Details | Diff
purge nullptr bool returns in spidermonkey (0ad-0.0.18_alpha-nullptr-return.patch,6.30 KB, patch)
2015-11-05 01:47 UTC, Jonas Jelten
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Arques 2015-10-01 09:12:44 UTC
games-strategy/0ad does not build with GCC 5.x because of -std=gnu11 incompatibility in bundled spidermonkey.

Reproducible: Always

Steps to Reproduce:
1. Try to emerge games-strategy/0ad using GCC 5.x
Actual Results:  
Build fails when building bundled spidermonkey because of std:nullptr_t to bool conversion.

Expected Results:  
Compiled and installed the game

This is because of the new default -std=gnu11 in GCC 5.x instead of -std=gnu89 in earlier GCCs.

The bug has already been fixed in the 0ad source code with the following changeset: http://trac.wildfiregames.com/changeset/16673

I have successfully built 0ad with GCC 5.2 by creating patches with these changes and making my own ebuild with epatch_user in it.
Comment 1 Alexander Arques 2015-10-01 09:13:44 UTC
Created attachment 413412 [details]
Build log

This happens with the standard ebuild when using GCC 5.X.
Comment 2 Alexander Arques 2015-10-01 09:14:58 UTC
Comment on attachment 413412 [details]
Build log

This happens when emerging 0ad with GCC 5.x
Comment 3 Alexander Arques 2015-10-01 09:17:11 UTC
Created attachment 413414 [details, diff]
Patch file 1/3
Comment 4 Alexander Arques 2015-10-01 09:17:27 UTC
Created attachment 413416 [details, diff]
Patch file 2/3
Comment 5 Alexander Arques 2015-10-01 09:17:48 UTC
Created attachment 413418 [details, diff]
Patch file 3/3
Comment 6 Alexander Arques 2015-10-01 09:25:26 UTC
This is my first Gentoo bug report so please tell me if you think any information is missing or if I could've done anything better.

For starters I think the patch(es) could've been and should've been? merged to one file maybe?

But hopefully it will save someone else some time, most of my system is compiled with GCC 5.2 now and this is one of the few packages I had trouble with without finding much help by googling.
Comment 7 Alexander Arques 2015-10-01 09:30:32 UTC
I can also add that trying to compile the game with "-std=gnu89" was the first thing I tried by adding it to CFLAGS/CXXFLAGS through package.env and it did not work.

It looked like that flag was not being used in some parts of the build and therefore it failed with the same error anyways.
Comment 8 Jonas Jelten 2015-11-05 01:47:48 UTC
Created attachment 416096 [details, diff]
purge nullptr bool returns in spidermonkey

This patch adds a patch that patches nullptr returns from spidermonkey. Thanks, buildsystem design!

However, just add this as epatch to the ebuild, and 0ad should build on 5.2 now.

Please add a epatch_user to the ebuild as well.
Comment 9 Tolga Dalman 2015-12-13 11:00:12 UTC
I don't see this issues with 0.0.19 from games-overlay (using gcc-5.3.0).
Comment 10 Toralf Förster gentoo-dev 2015-12-29 19:20:40 UTC
(In reply to Tolga Dalman from comment #9)
> I don't see this issues with 0.0.19 from games-overlay (using gcc-5.3.0).

Well, then move this to the tree :-)
Comment 11 Tupone Alfredo gentoo-dev 2016-07-09 18:06:14 UTC
That version is no more in the tree