games-strategy/0ad does not build with GCC 5.x because of -std=gnu11 incompatibility in bundled spidermonkey.
Steps to Reproduce:
1. Try to emerge games-strategy/0ad using GCC 5.x
Build fails when building bundled spidermonkey because of std:nullptr_t to bool conversion.
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.
Created attachment 413412 [details]
This happens with the standard ebuild when using GCC 5.X.
Comment on attachment 413412 [details]
This happens when emerging 0ad with GCC 5.x
Created attachment 413414 [details, diff]
Patch file 1/3
Created attachment 413416 [details, diff]
Patch file 2/3
Created attachment 413418 [details, diff]
Patch file 3/3
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.
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.
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.
I don't see this issues with 0.0.19 from games-overlay (using gcc-5.3.0).
(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 :-)
That version is no more in the tree