Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: pong sample cannot open libcsfml-audio.so  (Read 27721 times)

0 Members and 4 Guests are viewing this topic.

dorkfish

  • Newbie
  • *
  • Posts: 38
    • View Profile
pong sample cannot open libcsfml-audio.so
« on: December 07, 2008, 07:43:48 pm »
I'm having trouble running the pong sample. Here's the error I'm getting:
Code: [Select]
Loading error. Reason : Cannot open library (library : libcsfml-audio.so, symbol : )
Segmentation Fault

And here's the backtrace:
Code: [Select]
#0  0x0000000000463d2d in dsfml.system.dllloader.DllLoader.getSymbol() ()
#1  0x000000000047082a in dsfml.audio.listener.Listener._staticCtor1() ()
#2  0x000000000047a3a3 in object._moduleCtor2(ModuleInfo[], int) (mi={length = 7, ptr = 0x6b4790}, skip=1)
    at genobj.d:1126
#3  0x000000000047a3ff in object._moduleCtor2(ModuleInfo[], int) (mi={length = 6, ptr = 0x6ab110}, skip=0)
    at genobj.d:1138
#4  0x000000000047a398 in object._moduleCtor2(ModuleInfo[], int) (mi={length = 45, ptr = 0x7f2c86511e00}, skip=0)
    at genobj.d:1124
#5  0x0000000000477bf2 in runAll () at dgccmain2.d:293
#6  0x00000000004776ae in tryExec (dg={object = 0x7fff8e6337a0, func = 0x477be0 <runAll>}) at dgccmain2.d:235
#7  0x0000000000477b2a in _d_run_main (argc=2, argv=0x7fff8e6338d8, main_func=<value optimized out>)
    at dgccmain2.d:302
#8  0x00007f2c85a423f6 in __libc_start_main () from /lib/libc.so.6
#9  0x000000000044e9d9 in _start ()


What's weird is that all of the other samples, even the ones using audio, run perfectly fine. Any ideas about what might be wrong?

SirJulio

  • Full Member
  • ***
  • Posts: 241
    • View Profile
pong sample cannot open libcsfml-audio.so
« Reply #1 on: December 08, 2008, 06:32:35 am »
Hum, you're right, that's definitively weird.

You can run the Sound3D sample without any troubles ? Maybe a dependency problem on your side (libsnfile ? openAL ?) ?

I haven't tested dsfml with linux for a long time, maybe that's the problem =p (but i can't remember changing anything that would cause that).

I'll take a look at this. Let me know if you have any other issues (it's release debugging time !). =)

dorkfish

  • Newbie
  • *
  • Posts: 38
    • View Profile
pong sample cannot open libcsfml-audio.so
« Reply #2 on: December 08, 2008, 09:13:27 am »
Yeah, the sound3d demo works perfectly fine, as do the rest of the demos that use the sound library. I built SFML from the latest svn source (as of sometime yesterday) and had to install openal and libsndfile before I could finish compiling the main libs. I've got a couple papers I have to scramble and finish before my class tonight, but once those are finished I'll test out the libraries more.

Edit: I have gdb built with d support from the patches offered here: http://dsource.org/projects/gdb-patches, so I can try to debug stuff further if you need me to.

SirJulio

  • Full Member
  • ***
  • Posts: 241
    • View Profile
pong sample cannot open libcsfml-audio.so
« Reply #3 on: December 08, 2008, 08:21:06 pm »
Ok, i've found the problem. SFML on linux doesn't explicitely link between module, if a module is loaded and his dependency dlopen returns null (and give you the error).

The problem with pong sample is the order of import statements :

Code: [Select]
import dsfml.audio.all;
import dsfml.graphics.all;
import dsfml.system.all;
import dsfml.window.all;


must be :

Code: [Select]
import dsfml.system.all;
import dsfml.window.all;
import dsfml.graphics.all;
import dsfml.audio.all;


I make a commit on the svn in few minutes, tell if everything is ok. =)

Update :

Commit is done, i have also fixed an issue with CSFML symbolic link creation (a slash in a path). Maybe you need a full "clean [..] make [..] install".

dorkfish

  • Newbie
  • *
  • Posts: 38
    • View Profile
pong sample cannot open libcsfml-audio.so
« Reply #4 on: December 09, 2008, 04:29:36 am »
Alright, I just had a chance to test the fixes, and they work perfectly now. I forgot to mention the CSFML makefile bug, but thanks for fixing that too. :) I had temporarily fixed it myself by manually creating the symlinks and forgot to mention it. :p