Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: df 31.18 on linux debian squeeze amd64 -- yay!  (Read 3032 times)

jthill

  • Bay Watcher
    • View Profile
df 31.18 on linux debian squeeze amd64 -- yay!
« on: January 14, 2011, 01:57:30 pm »

Hi, getting df 31.18 to work on my amd64 install took some spelunking so I thought I'd post.  The first thing to do for any 32-bit compatibility is apt-get install ia32-libs.  That still leaves two problems for df:

(edit: tar xzf was missing "-" to make it read from stdin)

1) squeeze amd64's ia32-libs installs a limited selection of 32-bit libraries, missing SDL_image and SDL_ttf

This is easy to fix: just plonk the 32-bit packages down somewhere convenient and drop links to the libs in df's "libs" directory.

hunt down the right packages with apt-file: install apt-file, get current by doing (sudo) apt-file update, then, when you get

$ ./df
./libs/Dwarf_Fortress: error while loading shared libraries: libSDL_image-1.2.so.0: cannot open shared object file: No such file or directory


you just apt-file search libSDL_image-1.2.so.0 to get the package name.

now go to packages.debian.org/libsdl-image1.2 (in this case) to pick your 32-bit (i386) .deb.  I want squeeze, i386, pick the us server ... done.

unpack the deb in some likely-looking place you just made up:
$ mkdir -p ~/lib/32
$ cd !$
$ ar p /path/to/downloaded.deb data.tar.gz | tar xzf -


drop pretty links in df's libs directory:
$ cd -
$ ln -s ~/lib/32/usr/lib/libSDL_image* libs


and that'll do'er for that.  do it again when ./df now complains about libSDL_ttf.

2) df-linux handrolls dynamic linking against the development versions of libopenal and libsndfile

Once you get sdl updated, df starts, blats a lot of junk on the terminal, pops a dialog box complaining that it can't bring up OpenAL, and runs fine except there's no sound.   Hearing Alvin and friends say "beyond quality!" is an important part of my life, so this must not be allowed to stand.

Rather than go through how to find out what's making it pop that message, and the one following about sndfile, here's the quick fix:

$ ln -s /usr/lib32/libopenal.so.1 libs/libopenal.so
$ ln -s /usr/lib32/libsndfile.so.1 libs/libsndfile.so


and that did it for me.
« Last Edit: January 14, 2011, 03:00:31 pm by jthill »
Logged