Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0002616Dwarf FortressTechnical -- Soundpublic2010-07-10 21:042010-07-19 13:42
x86_64Ubuntu Linux9.10
0002616: Initializing OpenAL failed, no sound will be played (bundled libsndfile.so doesn't work, system libsndfile does)
On my Ubuntu 9.10 x86-64 install, with the necessary 32-bit libraries, sound is OK under 0.31.08 but fails to initialize under 0.31.09.

If I move the copy of libs/libsndfile.so shipped with .09 out of the way, then everything works fine.

oliver@flux:~/df_31_09/df_linux$ ./df
Failed to link sf_version_string
Dynamically loading the sndfile library failed, disabling sound
/usr/lib/gio/modules/libgiogconf.so: wrong ELF class: ELFCLASS64
Failed to load module: /usr/lib/gio/modules/libgiogconf.so
/usr/lib/gio/modules/libgvfsdbus.so: wrong ELF class: ELFCLASS64
Failed to load module: /usr/lib/gio/modules/libgvfsdbus.so
/usr/lib/gio/modules/libgioremote-volume-monitor.so: wrong ELF class: ELFCLASS64
Failed to load module: /usr/lib/gio/modules/libgioremote-volume-monitor.so
Initializing OpenAL failed, no sound will be played
Loading bindings from data/init/interface.txt
Resetting textures

oliver@flux:~/df_31_09/df_linux$ mv libs/libsndfile.so libs/libsndfile.so.DISABLED
oliver@flux:~/df_31_09/df_linux$ ./df
Sound devices available:
ALSA Software
OSS Software
PulseAudio Software
Wave File Writer
Picking ALSA Software. 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
Resetting textures

The system-wide libsndfile looks like this:

oliver@flux:~/df_31_09/df_linux$ ls -l /usr/lib32/libsndfile.so*
lrwxrwxrwx 1 root root 15 2009-11-14 15:02 /usr/lib32/libsndfile.so -> libsndfile.so.1
lrwxrwxrwx 1 root root 20 2009-11-14 15:02 /usr/lib32/libsndfile.so.1 -> libsndfile.so.1.0.20
-rw-r--r-- 1 root root 420372 2009-08-04 05:46 /usr/lib32/libsndfile.so.1.0.20
oliver@flux:~/df_31_09/df_linux$ ldd /usr/lib32/libsndfile.so
    linux-gate.so.1 => (0xf77c7000)
    libFLAC.so.8 => /usr/lib32/libFLAC.so.8 (0xf76ea000)
    libvorbisenc.so.2 => /usr/lib32/libvorbisenc.so.2 (0xf75f0000)
    libvorbis.so.0 => /usr/lib32/libvorbis.so.0 (0xf75c4000)
    libogg.so.0 => /usr/lib32/libogg.so.0 (0xf75bd000)
    libm.so.6 => /lib32/libm.so.6 (0xf7597000)
    libc.so.6 => /lib32/libc.so.6 (0xf7452000)
    /lib/ld-linux.so.2 (0xf77c8000)
No tags attached.
has duplicate 0002734resolved Footkerchief DF fails to load OpenAL 
related to 0002130resolved Footkerchief SOUND:YES consumes excessive CPU (runaway thread?) 
Issue History
2010-07-10 21:04oliverNew Issue
2010-07-11 03:00solarshadoNote Added: 0009927
2010-07-11 10:31FootkerchiefNote Added: 0009945
2010-07-11 15:35oliverNote Added: 0009966
2010-07-11 16:51FootkerchiefIssue Monitored: Baughn
2010-07-12 00:43JaakNote Added: 0010008
2010-07-12 01:25redditNote Added: 0010009
2010-07-13 12:43DawideNote Added: 0010158
2010-07-13 12:44DawideNote Deleted: 0010158
2010-07-13 12:46DawideNote Added: 0010160
2010-07-13 12:46DawideIssue Monitored: Dawide
2010-07-13 12:47DawideIssue End Monitor: Dawide
2010-07-13 12:50DawideIssue Monitored: Dawide
2010-07-15 03:49MurphyNote Added: 0010331
2010-07-17 12:15vulcaniusNote Added: 0010508
2010-07-18 02:04FootkerchiefSummary.09-shipped libsndfile.so does not work; using the system libsndfile does work => Initializing OpenAL failed, no sound will be played (bundled libsndfile.so doesn't work, system libsndfile does)
2010-07-18 02:04FootkerchiefRelationship addedhas duplicate 0002734
2010-07-18 02:04FootkerchiefRelationship addedrelated to 0002130
2010-07-19 06:07BaughnNote Added: 0010622
2010-07-19 06:07BaughnStatusnew => resolved
2010-07-19 06:07BaughnFixed in Version => 0.31.11
2010-07-19 06:07BaughnResolutionopen => fixed
2010-07-19 06:07BaughnAssigned To => Baughn
2010-07-19 13:42DawideIssue End Monitor: Dawide

2010-07-11 03:00   
:) at least I know how to get sound on linux now.
I was having this problem too, starting go wonder if i didn't have the right lib32 packages installed
2010-07-11 10:31   
Still present in 31.10?
2010-07-11 15:35   
Yes, identical behaviour in 0.31.10
2010-07-12 00:43   
I can confirm this on Gentoo (2.6.31, SMP, x86_64). Suggested workaround seems to fix it.
2010-07-12 01:25   
Confirmed on Ubuntu 9.04, suggested workaround doesn't fix it as the system libsndfile is out of date.
2010-07-13 12:46   
When i start the game appears an error box with: "Dynamically loading the OpenAL library failed, disabling sound"
2010-07-15 03:49   
Using Xubuntu 10.04, in DF v31.09 sound worked fine, but 31.10 gives me the aforementioned error box.
2010-07-17 12:15   
Confirming behavior on fully-updated Arch with 0.31.10, OpenAL fails to load. The suggested workaround fixes the problem.
2010-07-19 06:07   
Solution: Don't bundle libsndfile. There's really no need for it.