Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 561960

Summary: games-strategy/0ad does not build with GCC 5.x
Product: Gentoo Linux Reporter: Alexander Arques <alearq>
Component: [OLD] GamesAssignee: Gentoo Games <games>
Status: RESOLVED OBSOLETE    
Severity: normal CC: alearq, ansla80, fcoiffie, games, gentoo, jj, jlp.bugs, n-roeser, tdalman, zeekec
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 536984    
Attachments: Build log
Patch file 1/3
Patch file 2/3
Patch file 3/3
purge nullptr bool returns in spidermonkey

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