You are not logged in.

#1 2025-01-30 16:37:11

Oddwierdo
Member
Registered: 2023-07-29
Posts: 39

Dwarf fortress doesn't work anymore.. (sdl2-compat)

Hello,

Yesterday i updated my system and sdl2 got replaced by sdl2-compat. I think that might be the reason i now get a segfault when starting dwarf fortress (which needs sdl2). Is there a solution for this issue other than switching to the AUR Package of SDL2?  I googled a bit but the issue seems to be "too new" to really find anything about it.

Offline

#2 2025-01-30 17:40:56

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,013

Re: Dwarf fortress doesn't work anymore.. (sdl2-compat)

There are some known shader/GPU crashers which are being investigated, no direct workarounds as far as I see (assuming it's a graphics related crash, any terminal output/coredump ? (though likely not telling much with closed symbols, but maybe if it's dying in SDL somewhere: https://wiki.archlinux.org/title/Core_d … _core_dump ) : https://github.com/libsdl-org/sdl2-compat/issues/175

Offline

#3 2025-01-30 17:55:11

xerxes_
Member
Registered: 2018-04-29
Posts: 866

Re: Dwarf fortress doesn't work anymore.. (sdl2-compat)

I confirm this:

$ dwarffortress 
/usr/bin/dwarffortress: linia 15:  3107 Naruszenie ochrony pamięci   (zrzut pamięci) LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}${DF_DIR}" $DF_DIR/dwarfort "$@"

$ coredumpctl info /opt/dwarffortress/dwarfort
           PID: 3107 (dwarfort)
           UID: 1000 (user)
           GID: 1000 (user)
        Signal: 11 (SEGV)
     Timestamp: Thu 2025-01-30 18:33:37 CET (25s ago)
  Command Line: /opt/dwarffortress/dwarfort
    Executable: /opt/dwarffortress/dwarfort
 Control Group: /user.slice/user-1000.slice/session-1.scope
          Unit: session-1.scope
         Slice: user-1000.slice
       Session: 1
     Owner UID: 1000 (user)
       Boot ID: 05cbf971163442deb43f678571a1f9be
    Machine ID: 4e6eb13c33544bc2bce3efeaf0d12478
      Hostname: home
       Storage: none
       Message: Process 3107 (dwarfort) of user 1000 terminated abnormally without generating a coredump.

Solution for now for dwarffortress (also for warsow, xonotic-sdl, milkytracker):
extract from package sdl2-2.30.11-1-x86_64.pkg.tar.zst (you should have it in /var/cache/pacman/pkg/) files and symlinks:

lrwxrwxrwx  0 root   root        0 sty  3 04:40 usr/lib/libSDL2-2.0.so -> libSDL2-2.0.so.0
lrwxrwxrwx  0 root   root        0 sty  3 04:40 usr/lib/libSDL2-2.0.so.0 -> libSDL2-2.0.so.0.3000.11
-rwxr-xr-x  0 root   root  1873352 sty  3 04:40 usr/lib/libSDL2-2.0.so.0.3000.11
lrwxrwxrwx  0 root   root        0 sty  3 04:40 usr/lib/libSDL2.so -> libSDL2-2.0.so

to for example /usr/local/lib/ dir with root rights or wherever you want.

Then in terminal post 'export LD_PRELOAD=/usr/local/lib/libSDL2-2.0.so.0' or 'export LD_PRELOAD=/path_to_dir_where_you_copied_it/libSDL2-2.0.so.0' or you may add this to your .bashrc file and then when you start game from that terminal (or when you setup in .bashrc - every new terminal) it should work as before.

Offline

#4 2025-01-30 23:25:50

Oddwierdo
Member
Registered: 2023-07-29
Posts: 39

Re: Dwarf fortress doesn't work anymore.. (sdl2-compat)

Ty that worked. Hope that gets fixed soon since it seems to cause issues for a lot of games.

Offline

#5 2025-02-04 12:08:12

andmars
Member
Registered: 2012-03-13
Posts: 367

Re: Dwarf fortress doesn't work anymore.. (sdl2-compat)

I tested sdl2-compat-git and sdl3-git from AUR and that fixed it also.

Offline

#6 2025-02-07 22:08:32

vinibali
Member
Registered: 2015-06-22
Posts: 10

Re: Dwarf fortress doesn't work anymore.. (sdl2-compat)

I feel like introducing sdl2-compat just flipped many things upside-down.

Offline

Board footer

Powered by FluxBB