Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Running the games results in a libstdc++ error on Gentoo  (Read 1165 times)

ScRuB123

  • Escaped Lunatic
    • View Profile
Running the games results in a libstdc++ error on Gentoo
« on: March 29, 2018, 11:19:22 am »

So I downloaded the latest version and since I am on linux I changed the init file to run the game in text mode.  The problem is that when running the df executable I get the errors
Code: [Select]
./libs/Dwarf_Fortress: /home/[username]/Games/DF-4408/libs/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib64/libGLU.so.1)
./libs/Dwarf_Fortress: /home/[username]/Games/DF-4408/libs/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/lib64/libGLU.so.1)

Do you guys have any idea on how to fix this?

Other info:
Gentoo profile 17.0
linux kernel 4.14.15
gcc 6.4.0
Logged

mikekchar

  • Bay Watcher
    • View Profile
Re: Running the games results in a libstdc++ error on Gentoo
« Reply #1 on: March 30, 2018, 01:24:02 am »

Apparently the problem is that the libstdc++ version is too old.  You need to have 6.0.24 to support CXXABI_1.3.9 (not sure about 1.3.8).  It is also entirely possible that you have more than one version of libstdc++ on your system and it is picking the wrong one.

You didn't mention it, but I assume graphics mode works OK? I'm not actually sure what DF uses for its text output, but ncurses is probably a safe bet.  My guess is that ncurses is borked on your system (linked to the wrong version of libstdc++) and recompiling it may fix the problem.  The only really strange thing is that libGLU is part of mesa (the normal OpenGL implementation on Linux) -- and of course ncurses has nothing to do with that.  So, you might try rebuilding mesa (ha ha!  Have fun compiling :-) ).  I haven't touched Gentoo in about a million years, but I hope you can get binary packages instead ;-)

Obviously libstdc++ is not doing semver... :-P  It's pretty crazy that you increase the third number and it intentionally introduces breaking incompatibilities.  It's even crazier that they put it in the same version of the shared library -- you've basically screwed over ld.so.  That's nuts, and I can't imagine that compiler developers don't understand it... I wonder why they did it that way -- just so the shared library major version is the same as the compiler version???
Logged

Insert_Gnome_Here

  • Bay Watcher
  • Dosen't really care about anything anymore.
    • View Profile
Re: Running the games results in a libstdc++ error on Gentoo
« Reply #2 on: March 30, 2018, 05:05:21 pm »

Delete df_linux/libs/libstdc++.so.6
so it uses the library that came with the OS. 
not sure why the linux version ships with that file. I'll open a mantis ticket if there's not already one.
« Last Edit: March 30, 2018, 06:05:37 pm by Insert_Gnome_Here »
Logged
Quote from: Max™ on December 06, 2015, 04:09:21 am
Also, if you ever figure out why poets/bards/dancers just randomly start butchering people/getting butchered, please don't fix it, I love never knowing when a dance party will turn into a slaughter.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Running the games results in a libstdc++ error on Gentoo
« Reply #3 on: March 30, 2018, 09:50:09 pm »

Delete df_linux/libs/libstdc++.so.6
so it uses the library that came with the OS. 
not sure why the linux version ships with that file. I'll open a mantis ticket if there's not already one.
The reason DF includes its own version of libstdc++ is for the benefit of old versions of Linux - for new versions, you need to delete those files and use what comes with your OS instead.

For what it's worth, this issue was reported about a year and a half ago.
« Last Edit: March 30, 2018, 09:51:41 pm by Quietust »
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

ScRuB123

  • Escaped Lunatic
    • View Profile
Re: Running the games results in a libstdc++ error on Gentoo
« Reply #4 on: March 31, 2018, 10:04:28 pm »

Quote
Delete df_linux/libs/libstdc++.so.6
so it uses the library that came with the OS.

Thanks for the help, I did this and the game started loading, then promptly through a segmentation fault... :'(
Code: [Select]
./df: line 6:  4447 Segmentation fault      ./libs/Dwarf_Fortress "$@"
Not quite sure what this means so any help would be appreciated.
Logged