jME3 + Linux (Ubuntu Lucid) - Failed to load audio library

I have just done a fresh install of Linux (Ubuntu Lucid) and jMP. When I run my project I get the following error.


run:
Jul 10, 2010 12:16:10 AM com.jme3.asset.DesktopAssetManager <init>
INFO: DesktopAssetManager created.
INFO JmeSystem 12:16:13 AM Running on jMonkey Engine 3 ALPHA 0.50
INFO Natives 12:16:13 AM Extraction Directory #1: file:/home/patrick/local/jmonkeyplatform/jmonkeyplatform/libs/
INFO Natives 12:16:13 AM Extraction Directory #2: /home/patrick/Work/gl-client
INFO Natives 12:16:13 AM Extraction Directory #3: /home/patrick/Work/gl-client
INFO LwjglAbstractDisplay 12:16:13 AM Using LWJGL 2.4.2
INFO LwjglDisplay 12:16:13 AM Selected display mode: 640 x 480 x 0 @0Hz
INFO LwjglAbstractDisplay 12:16:13 AM Display created.
INFO LwjglAbstractDisplay 12:16:13 AM Adapter: null
INFO LwjglAbstractDisplay 12:16:13 AM Driver Version: null
INFO LwjglAbstractDisplay 12:16:13 AM Vendor: NVIDIA Corporation
INFO LwjglAbstractDisplay 12:16:13 AM OpenGL Version: 2.1.2 NVIDIA 195.36.24
INFO LwjglAbstractDisplay 12:16:13 AM Renderer: GeForce 6150SE nForce 430/PCI/SSE2/3DNOW!
INFO LwjglAbstractDisplay 12:16:13 AM GLSL Ver: 1.20 NVIDIA via Cg compiler
INFO LwjglTimer 12:16:13 AM Timer resolution: 1000 ticks per second
INFO Camera 12:16:13 AM Camera created (W: 640, H: 480)
INFO LwjglMouseInput 12:16:13 AM Mouse created.
INFO LwjglKeyInput 12:16:13 AM Keyboard created.
SEVERE LwjglAudioRenderer 12:16:13 AM Failed to load audio library
org.lwjgl.LWJGLException: Could not locate OpenAL library.
        at org.lwjgl.openal.AL.create(AL.java:153)
        at org.lwjgl.openal.AL.create(AL.java:104)
        at org.lwjgl.openal.AL.create(AL.java:191)
        at com.jme3.audio.lwjgl.LwjglAudioRenderer.initialize(LwjglAudioRenderer.java:53)
        at com.jme3.app.Application.initAudio(Application.java:126)
        at com.jme3.app.Application.initialize(Application.java:318)
        at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:96)
        at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:102)
        at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:147)
        at java.lang.Thread.run(Thread.java:636)
SEVERE Application 12:16:13 AM Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.UnsatisfiedLinkError: org.lwjgl.openal.AL10.alGetString(I)Ljava/lang/String;
        at org.lwjgl.openal.AL10.alGetString(Native Method)
        at com.jme3.audio.lwjgl.LwjglAudioRenderer.initialize(LwjglAudioRenderer.java:58)
        at com.jme3.app.Application.initAudio(Application.java:126)
        at com.jme3.app.Application.initialize(Application.java:318)
        at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:96)
        at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:102)
        at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:147)
        at java.lang.Thread.run(Thread.java:636)
BUILD SUCCESSFUL (total time: 4 seconds)



So I uninstalled libopenal from the package manager and installed OpenAL Soft from the website http://kcat.strangesoft.net/openal.html with the following commands:


cmake
make
sudo make install


Then rebooted the system for good measure. These are in fact the same binaries, only in a different directory. The original is in /usr/lib while the new one is in /usr/local/lib

But neither of them work. Any help will be appreciated as I can not develop anything with this error.

make sure you have latest driver + latest nightly build

I also have mint 9 and it works wonderful



you can find a lot of information about linux+openal problem in this link and its branches ^^

http://www.jmonkeyengine.com/forum/index.php?topic=13869.0

I have the nightly jME3 build, the latest graphics driver and the newest openal-soft. OpenAL-Soft is installed in /usr/local/lib. The following line fixed the problem:



sudo ln /usr/local/lib/libopenal.so.1.12.854 /usr/lib/libopenal.so



Cheers :smiley:

chapman said:


sudo ln /usr/local/lib/libopenal.so.1.12.854 /usr/lib/libopenal.so



You really should NOT use hard links you should use a SOFT link: "sudo ln -s /usr/local/lib/libopenal.so.1.12.854 /usr/lib/libopenal.so"

Notice the "-s" flag! A hard link is essentially a copy of the file where as a soft link is an actual link to the file.

hello

I have a similar problem since 2-3 weeks, but my problem couldn't be solved with this method.

I also have ubuntu lucid and it occurs at every jme3-application I try to run.

Here is the error code:

(From TestSceneLoading)


15.08.2010 14:25:40 com.jme3.asset.DesktopAssetManager <init>
INFO: DesktopAssetManager created.
15.08.2010 14:25:43 com.jme3.system.JmeSystem initialize
INFO: Running on jMonkey Engine 3 Alpha 0.6
15.08.2010 14:25:43 com.jme3.system.Natives extractNativeLibs
INFO: Extraction Directory #1: file:/home/daniel/workspace/jme3/bin/com/jme3/system/
15.08.2010 14:25:43 com.jme3.system.Natives extractNativeLibs
INFO: Extraction Directory #2: /home/daniel/workspace/jme3
15.08.2010 14:25:43 com.jme3.system.Natives extractNativeLibs
INFO: Extraction Directory #3: /home/daniel/workspace/jme3
15.08.2010 14:25:43 com.jme3.system.lwjgl.LwjglAbstractDisplay run
INFO: Using LWJGL 2.5
15.08.2010 14:25:43 com.jme3.system.lwjgl.LwjglDisplay createContext
INFO: Selected display mode: 640 x 480 x 0 @0Hz
15.08.2010 14:25:44 com.jme3.system.lwjgl.LwjglAbstractDisplay initInThread
INFO: Display created.
15.08.2010 14:25:44 com.jme3.system.lwjgl.LwjglAbstractDisplay initInThread
INFO: Adapter: null
15.08.2010 14:25:44 com.jme3.system.lwjgl.LwjglAbstractDisplay initInThread
INFO: Driver Version: null
15.08.2010 14:25:44 com.jme3.system.lwjgl.LwjglAbstractDisplay initInThread
INFO: Vendor: NVIDIA Corporation
15.08.2010 14:25:44 com.jme3.system.lwjgl.LwjglAbstractDisplay initInThread
INFO: OpenGL Version: 3.3.0 NVIDIA 256.44
15.08.2010 14:25:44 com.jme3.system.lwjgl.LwjglAbstractDisplay initInThread
INFO: Renderer: GeForce GTX 260/PCI/SSE2
15.08.2010 14:25:44 com.jme3.system.lwjgl.LwjglAbstractDisplay initInThread
INFO: GLSL Ver: 3.30 NVIDIA via Cg compiler
15.08.2010 14:25:44 com.jme3.system.lwjgl.LwjglTimer <init>
INFO: Timer resolution: 1000 ticks per second
15.08.2010 14:25:44 com.jme3.renderer.Camera <init>
INFO: Camera created (W: 640, H: 480)
15.08.2010 14:25:44 com.jme3.renderer.Camera <init>
INFO: Camera created (W: 640, H: 480)
15.08.2010 14:25:44 com.jme3.input.lwjgl.LwjglMouseInput initialize
INFO: Mouse created.
15.08.2010 14:25:44 com.jme3.input.lwjgl.LwjglKeyInput initialize
INFO: Keyboard created.
15.08.2010 14:25:44 com.jme3.app.Application handleError
SCHWERWIEGEND: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.NoSuchMethodError: Method org.lwjgl.openal.AL10.alEnable(I)V is not declared as native
    at org.lwjgl.openal.AL10.initNativeStubs(Native Method)
    at org.lwjgl.openal.AL.init(AL.java:158)
    at org.lwjgl.openal.AL.create(AL.java:140)
    at org.lwjgl.openal.AL.create(AL.java:104)
    at org.lwjgl.openal.AL.create(AL.java:203)
    at com.jme3.audio.lwjgl.LwjglAudioRenderer.initialize(LwjglAudioRenderer.java:64)
    at com.jme3.app.Application.initAudio(Application.java:119)
    at com.jme3.app.Application.initialize(Application.java:329)
    at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:131)
    at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:102)
    at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:147)
    at java.lang.Thread.run(Thread.java:636)



thanks for help

Are you using the nightly build or alpha1?

The OpenAL error happens because you're using the LWJGL jars for version 2.5 but the native libs from 2.4.

Make sure jME3-lwjgl-natives-2.5.jar is the only natives jar in your classpath.

Thank for your help.

The problem was (as you said) that I had both the

jME3-lwjgl-natives-2.4.jar and the jME3-lwjgl-natives-2.5.jar in the classpath

many thanks :slight_smile: