Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Sound Issue - Ubuntu GNU Linux  (Read 18901 times)

Nalbir

  • Bay Watcher
    • View Profile
Sound Issue - Ubuntu GNU Linux
« on: July 22, 2010, 01:36:45 pm »

Hello,

Can any body help me with a sound issue I am having in Ubuntu/Linux, I get the following error:

Code: [Select]
Dynamically loading the sndfile library failed, disabling sound
Here is what appears in the terminal:

Code: [Select]
Failed to link sf_version_string
Dynamically loading the sndfile library failed, disabling sound
Initializing OpenAL failed, no sound will be played
Loading bindings from data/init/interface.txt
New window size: 640x300
Font size: 8x12
Resizing grid to 80x25
Resizing font to 8x12

Resetting textures

Sorry if this is a newbish error :) OpenAL seems to be the issue
Logged

ikacer

  • Bay Watcher
    • View Profile
Re: Sound Issue - Ubuntu GNU Linux
« Reply #1 on: July 22, 2010, 03:16:16 pm »

I seem to remember getting this error as well last time I tried running the game in Ubuntu (about a year ago). I haven't had any trouble with other Linux distributions, so my guess is it has to do with buggy Ubuntu packages. Maybe you should try asking on the Ubuntu forums.

On the other hand, the only sounds in the game are a 3 minute long guitar song that plays on repeat and a short guitar song during the intro. Why not just disable sound in the init.txt and listen to your own choice of music? Or you can just load the song_game.ogg into your favorite lightweight music player (audacious, mpd, etc) and set it to repeat. It's in the sounds folder.
Logged

Taranli Maren

  • Bay Watcher
    • View Profile
Re: Sound Issue - Ubuntu GNU Linux
« Reply #2 on: July 22, 2010, 03:52:35 pm »

I have been getting this error in the latest version as well (Ubuntu 10.04).  The older versions never had any problem.  I set my volume all the way down though, so I don't notice the effect. 
Logged

mdimasso

  • Bay Watcher
    • View Profile
Re: Sound Issue - Ubuntu GNU Linux
« Reply #3 on: July 25, 2010, 06:44:39 pm »

I've read in some thread (can't find it now though) that it has to do with some sound code being removed from the binary file. Apparently this started with .08. You can have all the corresponding libraries correctly installed but the game won't link them, or something like that.

Not the greatest help but it should put you in the right direction if you want to keep searching.

BTW, I get this in the terminal:
Code: [Select]
Dynamically loading the OpenAL library failed, disabling sound
Initializing OpenAL failed, no sound will be played

Edit: found the thread,
http://www.bay12forums.com/smf/index.php?topic=61250.0
« Last Edit: July 26, 2010, 09:55:23 pm by mdimasso »
Logged

Keilaron

  • Escaped Lunatic
  • Insane
    • View Profile
    • Keilaron's Den
Re: Sound Issue - Ubuntu GNU Linux
« Reply #4 on: August 08, 2010, 08:09:56 pm »

I don't know if anyone else posted a solution yet, but...
To fix these sound problems in Ubuntu 10.04 ...:
Quote
Dynamically loading the OpenAL library failed, disabling sound
Quote
Dynamically loading the sndfile library failed, disabling sound
... I had to do this as root:
Code: [Select]
cd /usr/lib
ln -s libopenal.so.1 libopenal.so
ln -s libsndfile.so.1 libsndfile.so
ldconfig

From what I understand, the cause of this problem is a transition.
Now, in terms of the source code, it seems the solution is that in addition to doing
Code: [Select]
dlopen("libsndfile.so", RTLD_LAZY);one must also (if the first fails, naturally)
Code: [Select]
dlopen("libsndfile.so.1", RTLD_LAZY);The same applies for libopenal.
« Last Edit: August 08, 2010, 08:25:22 pm by Keilaron »
Logged
post_count++;

mdimasso

  • Bay Watcher
    • View Profile
Re: Sound Issue - Ubuntu GNU Linux
« Reply #5 on: August 12, 2010, 10:33:16 am »

It works! Thanks a lot.
Logged

BlackRat90

  • Bay Watcher
  • Strike the earth!
    • View Profile
Re: Sound Issue - Ubuntu GNU Linux
« Reply #6 on: August 12, 2010, 12:30:36 pm »

I get this to, but i really dont mind sense i normal play with the game muted, and I get no other problems
Logged

ikinone

  • Escaped Lunatic
    • View Profile
Re: Sound Issue - Ubuntu GNU Linux
« Reply #7 on: September 25, 2010, 08:14:43 am »


... I had to do this as root:
Code: [Select]
cd /usr/lib
ln -s libopenal.so.1 libopenal.so
ln -s libsndfile.so.1 libsndfile.so
ldconfig

From what I understand, the cause of this problem is a transition.
Now, in terms of the source code, it seems the solution is that in addition to doing
Code: [Select]
dlopen("libsndfile.so", RTLD_LAZY);one must also (if the first fails, naturally)
Code: [Select]
dlopen("libsndfile.so.1", RTLD_LAZY);The same applies for libopenal.

Excuse my lack of Linux knowledge, but where exactly do you input these code lines? Simply entering them in xterm provides errors.

What do you mean in terms of the source code?
Logged

Fellhuhn

  • Bay Watcher
    • View Profile
Re: Sound Issue - Ubuntu GNU Linux
« Reply #8 on: September 25, 2010, 11:53:37 am »

You have to be root to do that.

See if you have libopenal.so.1 in /usr/lib
if so then create a symbolic link with the commands given above:

ln -s libopenal.so.1 libopenal.so
ln -s libsndfile.so.1 libsndfile.so

then reload the cache:

ldconfig

But again: Disable the sound. Not worth the trouble (yet). ;)
Logged

plynxis

  • Bay Watcher
  • Oh god I'm so tired, leave me alone...
    • View Profile
Re: Sound Issue - Ubuntu GNU Linux
« Reply #9 on: October 03, 2010, 06:02:33 am »

Sorry to bump this thread like this but i tried the above solution and it isn't working - i'm not sure i'm doing it right

i go to the terminal, change to the /usr/lib directory and sudo the two lines that make links to libopenal.so.1 and libsndfile.so.1 (if i understand the commands correctly)

then i run DF and it tells me it failed to load openal again. i changed the source as well but i'm not sure how to compile it again

sorry for being such a noob - i just want to know if i'm doing it right so i can look for another solution or give up on sound. i just upgraded to 10.04 LTS (my username is a coincidence btw :P) and as far as i've checked i do have the libraries and i use the df shell script to run it. running the executable gives me an error that it cant find a png in the data folder ("curses_640x300.png") and if i copy it to the main folder (with the lib files) it gives me the same error the df script does.
Logged
What? Go away, I'm sleep deprived...

Tinker Thinker

  • Bay Watcher
  • [PRESSES_BUTTONS:RED]
    • View Profile
Re: Sound Issue - Ubuntu GNU Linux
« Reply #10 on: October 11, 2010, 09:03:23 pm »

@plynxis:

Did you also do:

sudo ldconfig

You don't mention it in your issue.
Logged
Does anyone else find my avatar looks crooked?

plynxis

  • Bay Watcher
  • Oh god I'm so tired, leave me alone...
    • View Profile
Re: Sound Issue - Ubuntu GNU Linux
« Reply #11 on: October 13, 2010, 02:59:59 am »

um i thought so but apparently... no  :-[

i'm an idiot, i got so caught up with the other two i forgot about ldconfig i guess. i was pretty sure i tried it and i did the above on 9.04 (running 10.10 now and it works) but not sure anymore. maybe i didnt sudo it, which would be weird since i thought about sudoing the other two...

anyway, thanks :),
even if it really just points i have a gabbro brain :P
« Last Edit: October 13, 2010, 03:03:50 am by plynxis »
Logged
What? Go away, I'm sleep deprived...

anallyst

  • Bay Watcher
    • View Profile
    • github repos
Re: Sound Issue - Ubuntu GNU Linux
« Reply #12 on: November 12, 2010, 03:48:51 pm »

it's even better to link the (32BIT!!) libraries into the df/libs folder. this way you dont have to mess around with your system and dont have to run ldconfig.

Code: [Select]
cd df_linux/libs
ln -s /usr/lib/libopenal.so.1.12.854 ./libopenal.so
ln -s /usr/lib/libsndfile.so.1.0.20 ./libsndfile.so

Keilaron, did you propose your fix to Baughn ? here's the link to his repo https://github.com/Baughn/Dwarf-Fortress--libgraphics-/issues#issue/35
Logged
how to be first one to get mayday tileset after toady released a new version: https://github.com/rofl0r/df-mayday

KingOfBudgies

  • Escaped Lunatic
    • View Profile
Re: Sound Issue - Ubuntu GNU Linux
« Reply #13 on: November 20, 2010, 06:03:33 am »

This last post's method worked splendidly for me - thank you analiyst!
Logged

vambo

  • Escaped Lunatic
    • View Profile
Re: Sound Issue - Ubuntu GNU Linux
« Reply #14 on: January 14, 2011, 07:16:33 pm »

The last solution worked for me also. Kudos
Logged
Pages: [1] 2