LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Mord on June 05, 2006, 04:19:51

Title: Problem with installation using beta 1.0
Post by: Mord on June 05, 2006, 04:19:51
Hi all, I've just recently installed Linux (sick of windows) and I've got most things up and running, including java sdk. Anyway I'm tryin to run the test app for lwjgl but i get the common library error that I've seen in the fAQ. I've tried a few solutions i've read on the forums but it still gives the same error. Here's my output for the command line:

mord@neo:~/Desktop/LWJGL/lwjgl$ java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar:jar/lwjgl_fmod3.jar:jar/lwjgl_devil.jar:jar/jinput.jar:-Djava.library.path=/home/mord/Desktop/LWJGL/lwjgl/native/ org.lwjgl.test.WindowCreationTest
The following keys are available:
ESCAPE:         Exit test
ARROW Keys:     Move window when in non-fullscreen mode
L:              List selectable display modes
0-8:            Selection of display modes
F:              Toggle fullscreen
SHIFT-F:        Toggle fullscreen with Display.destroy()/create() cycle
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
       at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
       at java.lang.Runtime.loadLibrary0(Runtime.java:822)
       at java.lang.System.loadLibrary(System.java:992)
       at org.lwjgl.Sys$1.run(Sys.java:62)
       at java.security.AccessController.doPrivileged(Native Method)
       at org.lwjgl.Sys.loadLibrary(Sys.java:60)
       at org.lwjgl.Sys.<clinit>(Sys.java:74)
       at org.lwjgl.opengl.Display.<clinit>(Display.java:103)
       at org.lwjgl.test.WindowCreationTest.initialize(WindowCreationTest.java:80)
       at org.lwjgl.test.WindowCreationTest.main(WindowCreationTest.java:284)
mord@neo:~/Desktop/LWJGL/lwjgl$


Any help would be much appreciated.

thanks

Mord
Title: Problem with installation using beta 1.0
Post by: Matzon on June 05, 2006, 06:51:44
due to the single file release and restructure, you should pass:
-Djava.library.path=/home/mord/Desktop/LWJGL/lwjgl/native/linux
instead
Title: Problem with installation using beta 1.0
Post by: Mord on June 05, 2006, 17:56:48
Heya, thanks for the reply. I tried that directory and I still get the same message. I was fooling around with LD_LIBRARY_PATH variable before(searching for answers to my problem not really knowing what i was doing). I'm not sure if this is a problem or not. Right now LD_LIBRARY_PATH is set too /usr/local/lib.

Thanks again for any help you can give me.
Title: Problem with installation using beta 1.0
Post by: miu on June 05, 2006, 19:54:20
Just guessing - do linux libs extracted from the zip distribution have their UNIX executable permissions set?

If not, chmod +x and try again...
Title: Problem with installation using beta 1.0
Post by: Mord on June 06, 2006, 02:24:02
k, here's my latest attempt. I set executable permissions on the .so files

mord@neo:~/Desktop/LWJGL/lwjgl$ sudo java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar:jar/lwjgl_fmod3.jar:jar/lwjgl_devil.jar:jar/jinput.jar:-Djava.library.path=/home/mord/LWJGL/lwjgl/native/linux org.lwjgl.test.WindowCreationTest
The following keys are available:
ESCAPE:         Exit test
ARROW Keys:     Move window when in non-fullscreen mode
L:              List selectable display modes
0-8:            Selection of display modes
F:              Toggle fullscreen
SHIFT-F:        Toggle fullscreen with Display.destroy()/create() cycle
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
       at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
       at java.lang.Runtime.loadLibrary0(Runtime.java:822)
       at java.lang.System.loadLibrary(System.java:992)
       at org.lwjgl.Sys$1.run(Sys.java:62)
       at java.security.AccessController.doPrivileged(Native Method)
       at org.lwjgl.Sys.loadLibrary(Sys.java:60)
       at org.lwjgl.Sys.<clinit>(Sys.java:74)
       at org.lwjgl.opengl.Display.<clinit>(Display.java:103)
       at org.lwjgl.test.WindowCreationTest.initialize(WindowCreationTest.java:80)
       at org.lwjgl.test.WindowCreationTest.main(WindowCreationTest.java:284)
mord@neo:~/Desktop/LWJGL/lwjgl$ cd native/linux mord@neo:~/Desktop/LWJGL/lwjgl/native/linux$ ls
libjinput-linux.so  liblwjgl.so  libopenal.so
mord@neo:~/Desktop/LWJGL/lwjgl/native/linux$ ls -l
total 520
-rwxr-xr-x 1 mord mord  10008 2006-06-02 23:09 libjinput-linux.so
-rwxr-xr-x 1 mord mord 222144 2006-06-02 23:09 liblwjgl.so
-rwxr-xr-x 1 mord mord 286192 2006-06-02 23:09 libopenal.so
mord@neo:~/Desktop/LWJGL/lwjgl/native/linux$

Same problem, i think i set the executable permissions right.

thanks again :)
Title: Problem with installation using beta 1.0
Post by: Matzon on June 06, 2006, 05:21:56
try to ldd lwjgl.so
Title: Problem with installation using beta 1.0
Post by: miu on June 06, 2006, 12:30:15
I noticed another thing:

In your transcript, -Djava.library.path setting appears to be appended to your -cp value. If that's true you're not setting any java.library.path at all (only a weird classpath).

What you want is:

java [blank] -cp [blank] <your:class:path> [blank] -D<your/lib/path> [blank] <mainClass>

-cp and -D are two separate options, -cp requires a blank between itself and a value, -D does not.

In fact, you don't need the colon ":" separator at the one of the classpath list (after jinput.jar).
Title: Problem with installation using beta 1.0
Post by: Mord on June 08, 2006, 01:13:52
ok, tried your suggestions but still get the same problem. Here is the lastest run:

mord@neo:~/Desktop/LWJGL/lwjgl$ java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar:jar/lwjgl_fmod3.jar:jar/lwjgl_devil.jar:jar/jinput.jar -Djava.library.path=/home/mord/LWJGL/lwjgl/native/linux org.lwjgl.test.WindowCreationTest
The following keys are available:
ESCAPE:         Exit test
ARROW Keys:     Move window when in non-fullscreen mode
L:              List selectable display modes
0-8:            Selection of display modes
F:              Toggle fullscreen
SHIFT-F:        Toggle fullscreen with Display.destroy()/create() cycle
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
       at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1517)
       at java.lang.Runtime.loadLibrary0(Runtime.java:788)
       at java.lang.System.loadLibrary(System.java:834)
       at org.lwjgl.Sys$1.run(Sys.java:62)
       at java.security.AccessController.doPrivileged(Native Method)
       at org.lwjgl.Sys.loadLibrary(Sys.java:60)
       at org.lwjgl.Sys.<clinit>(Sys.java:74)
       at org.lwjgl.opengl.Display.<clinit>(Display.java:103)
       at org.lwjgl.test.WindowCreationTest.initialize(WindowCreationTest.java:80)
       at org.lwjgl.test.WindowCreationTest.main(WindowCreationTest.java:284)

and here's the ldd:

mord@neo:~/Desktop/LWJGL/lwjgl/native/linux$ ldd liblwjgl.so
       linux-gate.so.1 =>  (0xffffe000)
       libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7e99000)
       libX11.so.6 => /usr/lib/libX11.so.6 (0xb7db3000)
       libXext.so.6 => /usr/lib/libXext.so.6 (0xb7da6000)
       libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7d94000)
       libjawt.so => not found
       libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7c64000)
       /lib/ld-linux.so.2 (0x80000000)
       libXau.so.6 => /usr/lib/libXau.so.6 (0xb7c61000)
       libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7c5e000)

Thanks again
Title: Problem with installation using beta 1.0
Post by: Matzon on June 08, 2006, 05:29:46
Quotelibjawt.so => not found
is the problem, it isn't finding the awt part of your java installation.
Title: Problem with installation using beta 1.0
Post by: Mord on June 09, 2006, 02:29:10
ok, i've tried fixin that by adding the libjawt.so directory to ld.so.conf file. But in Ubuntu dapper 6.06, i had to create the ld.so.conf file cause it doesnt use that file anymore. It still doesnt work after i did ldconfig. I'm not sure how else to link this file.

thanks again for any help

Mord
Title: Problem with installation using beta 1.0
Post by: Javapunk on June 09, 2006, 05:40:19
Do you have sun java installed?
Title: Problem with installation using beta 1.0
Post by: Mord on June 09, 2006, 09:35:51
ya, I installed sun JDK 1.5 update 6 (and re-installed just to make sure).

when I look at my library cache, it shows libjawt.so loaded :

libjawt.so (libc6, hwcap: 0x1000000000000) => /usr/lib/j2sdk1.5-sun/jre/lib/i386/libjawt.so

not sure why it's not seen by lwjgl

Mord
Title: Problem with installation using beta 1.0
Post by: Mord on June 16, 2006, 17:04:35
still lookin for a way to fix this. I'm not sure where to go from here.

thanks again for any help you can provide
Title: Problem with installation using beta 1.0
Post by: Matzon on June 16, 2006, 21:59:15
pretty clueless here - lwjgl works fine under Fedora Core 3+4+5 and Ubuntu latest
Title: Problem with installation using beta 1.0
Post by: ThorPrime on June 20, 2006, 23:43:06
Actually, I have noticed the same problem under the latest Ubuntu Dapper.

Quote from: "ldd native/linux/liblwjgl.so"
       linux-gate.so.1 =>  (0xffffe000)
       libm.so.6 => /lib32/libm.so.6 (0x55598000)
       libX11.so.6 => /usr/lib32/libX11.so.6 (0x555ba000)
       libXext.so.6 => /usr/lib32/libXext.so.6 (0x556a0000)
       libpthread.so.0 => /lib32/libpthread.so.0 (0x556ad000)
       libjawt.so => not found
       libc.so.6 => /lib32/libc.so.6 (0x556c0000)
       /lib/ld-linux.so.2 (0x56555000)
       libXau.so.6 => /usr/lib32/libXau.so.6 (0x557ef000)
       libdl.so.2 => /lib32/libdl.so.2 (0x557f2000)

I'm still looking for a solution as well.
Title: Problem with installation using beta 1.0
Post by: Matzon on June 21, 2006, 05:48:30
I *just* did a complete install of dapper and sun-java5-bin, from within Add/Remove.

How did you install Java on dapper ?
Title: Problem with installation using beta 1.0
Post by: ThorPrime on June 24, 2006, 08:27:48
I did a manual install using the binary on sun's site.


I'll try doing a bare bones install of Dapper tonight and tacking java on via apt/synaptec.
Title: Problem with installation using beta 1.0
Post by: ThorPrime on June 24, 2006, 09:31:48
hmm, it seems that through normal channels, it won't even let me install the java 5 runtime...
Not availible for my system...
Which leads me to believe it is in fact a problem with the 64bit kernel. (I'm on an AMD64.) Since Ubuntu Dapper puts the 64Bit kernel on without asking, that would explain why it suddenly no longer works.

       libjawt.so => not found

with the included 1.4.2 runtime...

Java 5 won't install except manually, which doesn't seem to help.
Title: Problem with installation using beta 1.0
Post by: Matzon on June 24, 2006, 11:11:27
can't help you with 64bit issues :/