Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 619826 - games-roguelike/dwarf-fortress: gcc-6 removes symbols needed by dfhack
Summary: games-roguelike/dwarf-fortress: gcc-6 removes symbols needed by dfhack
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alex Xu (Hello71)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-6
  Show dependency tree
 
Reported: 2017-05-27 18:13 UTC by Steffen Schaumburg
Modified: 2018-07-23 00:09 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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"