I’m trying to play Dwarf Fortress Premium (51.08), distributed as an elf binary from itch.io. Up until last year I used to play this with steam-run, and that worked just fine. But after a few months I didn’t try, with current versions of the game and steam-run (nixOS 25.05beta768633.c80f6a7e10b3 ), I get
./dwarfort: error while loading shared libraries: libSDL2_image-2.0.so.0: cannot open shared object file: No such file or directory
…the game manages to load this plugin, according to the logs. However, no sound plays. It doesn’t even show a stream in pavucontrol.
If I deliberately don’t pass “.” to the load path, the game will attempt to use SDL2_mixer as a fallback. If I add SLD2_mixer and SDL2_audio to the nix-ld config, it will load that successfully, and even show a stream in pavucontrol (labelled ld-linux-x86-64.so.2 ). But still, no sound plays.
The stream is not muted and sound works in other applications. Sound in this game worked back when I used to run it with steam-run.
What else can I do in this case? Is there any trick to get apps running under nix-ld to interact normally with the sound system?
I recently pushed changes that allow us to support each version up to 51.08:
I’ve seen issues with audio too though, ever since v50 came out, and have not located a solution for us in nixpkgs. One suggestion is to LD_PRELOAD fmod, but this doesn’t look like it changed anything.
Turns out, I was attempting to LD_PRELOAD the fmod plugin for Dwarf Fortress, instead of fmod itself. The same problem and solution applies to SDL2_mixer.