Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 570292 - games-roguelike/dwarf-fortress fails to build with gcc 5
Summary: games-roguelike/dwarf-fortress fails to build with gcc 5
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Alex Xu (Hello71)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-30 18:41 UTC by Yi Yang
Modified: 2016-01-03 01:11 UTC (History)
1 user (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 Yi Yang 2015-12-30 18:41:09 UTC
games-roguelike/dwarf-fortress does not work when compiled with GCC-5. A solution is known and verified to work.

Reproducible: Always

Steps to Reproduce:
1. gcc-config to any gcc 5.x.0 version.
2. build dwarf-fortress (any version).

Actual Results:  
It can't run due to missing symbol.

Expected Results:  
.

Adding "-D_GLIBCXX_USE_CXX11_ABI=0" to CFLAGS in files/Makefile in the ebuild directory fixes this issue. And this should work regardless of GCC version.

A similar fix can be found in the following github commit from the project 'dwarf-fortress-unfuck', where the author encounters the similar linkage problem and resolves it in the same way:
https://github.com/svenstaro/dwarf_fortress_unfuck/commit/a89840de15d9d2090c49159e5bfc84f7520814ad
Comment 1 Yi Yang 2015-12-31 10:49:22 UTC
Well, your updated summary is slightly misleading -- dwarf-fortress does seem to build with GCC 5.

However, in this case the binary executable is closed source, and the library is open source and gets built by Portage. Therefore, a successful build does not correspond to a correct linkage between the library and the executable.

The problem only manifests itself when you actually try to run dwarf fortress.

I hope this clarifies what happened :)
Comment 2 Chris Reffett (RETIRED) gentoo-dev Security 2016-01-03 01:11:07 UTC
Fixed, thanks for the report.