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

Bug 619826

Summary: games-roguelike/dwarf-fortress: gcc-6 removes symbols needed by dfhack
Product: Gentoo Linux Reporter: Steffen Schaumburg <steffen>
Component: Current packagesAssignee: Alex Xu (Hello71) <alex_y_xu>
Status: RESOLVED TEST-REQUEST    
Severity: normal CC: chr, creffett, erikdenstore+gbugs, jstein, proxy-maint
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 582084    

Description Steffen Schaumburg 2017-05-27 18:13:12 UTC
To work around it is sufficient to simply add a "-O0" to the CXXFLAGS, for example by adding this line to src_configure (i added it above the line that sets debug for CXXFLAGS):

tc-is-gcc && [[ $(gcc-major-version) -ge 6 ]] && CXXFLAGS+=" -O0"


This is similar to, but i think not the same as, #566462

All credit for diagnosing the problem and providing the fix goes to eroen. He found that the problem occurs with -O1, too.
Comment 1 Christian Rasmussen 2017-06-03 20:28:32 UTC
(In reply to Steffen Schaumburg from comment #0)
> To work around it is sufficient to simply add a "-O0" to the CXXFLAGS, for
> example by adding this line to src_configure (i added it above the line that
> sets debug for CXXFLAGS):
> 
> tc-is-gcc && [[ $(gcc-major-version) -ge 6 ]] && CXXFLAGS+=" -O0"
> 
> 
> This is similar to, but i think not the same as, #566462
> 
> All credit for diagnosing the problem and providing the fix goes to eroen.
> He found that the problem occurs with -O1, too.

I am also experiencing this.

I am using GCC 5.4, which seems to indicate that this is not a gcc 6 specific problem.

Adding "-O0" to the CXXFLAGS fixed the issue for me too.
Comment 2 Alex Xu (Hello71) 2018-02-15 14:01:35 UTC
I believe the correct solution is to use LDFLAGS=-rdynamic. please test adding this line after the "CXXFLAGS+=" line.
Comment 3 Alex Xu (Hello71) 2018-07-23 00:09:02 UTC
should be LDFLAGS+=" -rdynamic"