Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0009893Dwarf FortressTechnical -- Generalpublic2016-07-07 09:452017-11-01 09:54
Khym Chanur 
AMD x86_64LinuxFedora 24
0009893: Linux: libs/libstdc++.so.6 causing linking problem
Trying to run the newly 64 bit DF under Linux (Fedora 24), I get the following errors:

./libs/Dwarf_Fortress: /home/matt/temp/df_linux/libs/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /lib64/libGLU.so.1)
./libs/Dwarf_Fortress: /home/matt/temp/df_linux/libs/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /lib64/libGLU.so.1)

Simply removing libstdc++.so.6 from the libs directory fixes the problem, as the Dwarf_Fortress executable will link just fine against the system's standard libstdc++.so library
No tags attached.
related to 0009894resolved lethosor Linux 64 bit: libs/libgcc_s.so.1 no longer needed 
Issue History
2016-07-07 09:45Khym ChanurNew Issue
2016-07-07 13:08ShimmerFairyNote Added: 0035570
2016-07-07 16:23lethosorNote Added: 0035571
2016-07-07 16:23lethosorAssigned To => lethosor
2016-07-07 16:23lethosorStatusnew => acknowledged
2016-07-07 16:25lethosorRelationship addedrelated to 0009894
2016-07-07 21:29Khym ChanurNote Added: 0035576
2016-07-07 21:46ShimmerFairyNote Added: 0035577
2016-07-07 21:48ShimmerFairyNote Edited: 0035577bug_revision_view_page.php?bugnote_id=0035577#r14358
2016-07-08 08:32Khym ChanurNote Added: 0035579
2016-07-12 18:05Khym ChanurNote Added: 0035613
2017-04-06 21:32travm1Note Added: 0036398
2017-11-01 09:54thalamusincNote Added: 0036831

2016-07-07 13:08   
At first glance, I'd guess a problem involving the ABI changes in gcc 5.0, or maybe the changes in 6.0 (e.g. defaulting to gnu++14 instead of gnu++98), depending on what version your system libraries are compiled on and what DF's libstdc++ is for.
2016-07-07 16:23   
Toady's using GCC 4.8 on Linux. It looks like /lib64/libGLU.so.1 requires a libstdc++ from GCC 4.9 or 5.1, going by https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html. [^]

Removing the libstdc++ will break compatibility completely for people whose systems don't distribute GCC 4.8, so I don't know if there's much that can be done here.
Khym Chanur   
2016-07-07 21:29   
Maybe the df script could check what version of libstdc++ is installed, and depending upon the version set or not set the environmental variable LD_LIBRARY_PATH to "."; of course, that would require removing the "Library rpath = [$ORIGIN]" trick from the executable.

For the record, my install is using version 6.1.1-3 of GCC and libstdc++, and the path of the system libstdc++ library is /lib64/libstdc++.so.6.0.22
2016-07-07 21:46   
(edited on: 2016-07-07 21:48)
The weird thing is that I removed the provided libstdc++ as well, and I've been able to run it fine without problems. my libGLU.so.1 points to libGLU.so.1.3.1, which is provided by gentoo's media-libs/glu-9.0.0-r1. My currently active gcc is gcc-5.4.0, which was probably what I used to compile that.

Edit: I believe I also ran this without deleting the provided libstdc++ at first as well. (I definitely ran the 64-bit testing version without ever deleting the library.)

Khym Chanur   
2016-07-08 08:32   
Oops, wait, Dwarf_Fortress still needs the libgraphics.so library which is in the same directory. So, to amend my suggestion, libstdc++.so.6 and libgcc_s.so.1 could be moved to the new directory libs/c_libs, and if the df script decides they're needed it would set LD_LIBRARY_PATH to "./c_libs".
Khym Chanur   
2016-07-12 18:05   
Here's the start of a fix for the problem: http://pastebin.com/jX4Wf062 [^]

It will detect when the system libstdc++ can be linked or not. If it can't be, then it links against the bundled version which is put into libs/c_lib. It needs to be updated with all the versions of libstdc++ which can be linked against.
2017-04-06 21:32   
Here is a primer on libstdc++: https://www.everipedia.com/Libstdc++/ [^]
2017-11-01 09:54   
thanks travm1

http://www.thalamus.co [^]