Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 729002 - games-roguelike/dwarf-fortress-0.47.04 segfaults at startup
Summary: games-roguelike/dwarf-fortress-0.47.04 segfaults at startup
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-21 13:10 UTC by Guillaume BRUN
Modified: 2020-06-25 22:44 UTC (History)
1 user (show)

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


Attachments
emerge --info (emergeinfo,16.95 KB, text/plain)
2020-06-21 13:32 UTC, Guillaume BRUN
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume BRUN 2020-06-21 13:10:13 UTC
FWIW, this is merely a copy of the ebuild currently in Portage, with modified version number, so I expect the Portage version to also be affected.

Everything in the title. This is what I get by default:

cheaterman@cmans-laptop /tmp/df_linux $ dwarf-fortress                                                                                                                                                              
Sound devices available:
OpenAL Soft
Picking OpenAL Soft. If your desired device was missing, make sure you have the appropriate 32-bit libraries installed. If you wanted a different device, configure ~/.openalrc appropriately.
Perfect OpenAL context attributes GET
Loading bindings from data/init/interface.txt
Segmentation fault (core dumped)

I should instead have:

cheaterman@cmans-laptop /tmp/df_linux $ dwarf-fortress                                                                                                                                                              
Sound devices available:
OpenAL Soft
Picking OpenAL Soft. If your desired device was missing, make sure you have the appropriate 32-bit libraries installed. If you wanted a different device, configure ~/.openalrc appropriately.
Perfect OpenAL context attributes GET
Loading bindings from data/init/interface.txt
New window size: 640x300
Font size: 8x12
Resizing grid to 80x25
Resizing font to 8x12
Resetting textures

(and more)

Is it an upstream issue? But also, it seems to work for other people, so possibly related to GCC version? I'm using 8.3.0-r3 here although I also have 9.2.0-r2 installed. Seeing as this looks like some sort of implicit return statement, I'd expect the compiler to be involved?

The way I fixed it is as follows: 

In the file g_src/music_and_sound_openal.cpp L493, you'll notice a line like this:

ALenum alGetError( void ) { _alGetError(); }

Pretty weird, since the _alGetError() result should be returned. Fix it as follows:

ALenum alGetError( void ) { return _alGetError(); }

And that's it. It works.

I mean, I still can't close the game (goes into some sort of infinite loop trying to set up a new window? makes Xorg process take half of the CPU, DF taking the other half) ; but at least I can start it.

Thanks in advance for your support! We could possibly bundle a patch to fix this, or ask upstream to see what they can do.
Comment 1 Guillaume BRUN 2020-06-21 13:12:42 UTC
_VERY_ likely to be related: https://bugs.gentoo.org/703384
Comment 2 Guillaume BRUN 2020-06-21 13:32:53 UTC
Created attachment 645516 [details]
emerge --info
Comment 3 Rick Foland 2020-06-25 22:44:37 UTC
Is this version dependent for you? Did you also have it on 44.12? I also am running 47.04 from a modified version of the current e-build and I am not running into the issue. I'm just curios if it started for you with this version.