newby liblwjgl32.so not found in java.library.path

Started by scrappy, June 15, 2017, 12:39:21

Previous topic - Next topic

scrappy

Hi All:

As title says, I am new to lwjgl. I used the configurator and downloaded the sources/docs, Linux/windows natives, all (basically the whole shebang). I am trying to run the code from the "Get Started" page (right or wrong). I could not use gradle because my Linux installation is locked down. I manually unzipped everything to an "lwjgl" directory and modified Java eclipse to find stuff.

I turned on -Dorg.lwjgl.util.Debug=true IAW debug output ... ran again and am receiving:
"liblwjgl32.so not found in java.library.path"

Trying to be a good little programmer I performed a 'find . -name "*.so"' in the lwjgl directory and could not find any .so files. Doing a grep on lwjgl seems like it would provide excessive results. I am missing something that might be obvious ... thoughts?

Thanks ahead!

Scrappy.

scrappy

BTW, I looked for a newby area and searched the forum for liblwjgl32.so, all to no avail.

spasi

LWJGL 3 does not provide 32-bit Linux builds.

scrappy

Thanks. If Linux is 64bit:
uname -a
... x86_64 GNU/Linux

And java is 64bit:

{/tmp} > java -version
... OpenJDK 64-Bit Server VM (build 25.131-b12, mixed mode)

How do I tell the configurator to choose a 64 bit version instead of a 32 bit version. This was not an option that I saw. Or does it have something todo with selecting both windows and Linux?

Cheers.


spasi

You don't have to do anything, it should use the 64-bit version automatically.

Could you please run your application with -Dorg.lwjgl.util.Debug=true and -Dorg.lwjgl.util.DebugLoader=true and post the output here?

scrappy

Tester3D contains the code from the getting started page.

Hello LWJGL 3.1.2 build 29!
[LWJGL] Version: 3.1.2 build 29
[LWJGL]     OS: Linux v3.10.0-514.21.1.el7.x86_64
[LWJGL]    JRE: 1.8.0_45 i386
[LWJGL]    JVM: Java HotSpot(TM) Server VM v25.45-b02 by Oracle Corporation
[LWJGL] Loading library (system): lwjgl32
[LWJGL]    liblwjgl32.so not found in java.library.path
[LWJGL] Failed to load a library. Possible solutions:
   a) Add the directory that contains the shared library to -Djava.library.path or -Dorg.lwjgl.librarypath.
   b) Add the JAR that contains the shared library to the classpath.
Exception in thread "main" java.lang.UnsatisfiedLinkError: Failed to locate library: liblwjgl32.so
   at org.lwjgl.system.Library.loadSystem(Library.java:146)
   at org.lwjgl.system.Library.loadSystem(Library.java:66)
   at org.lwjgl.system.Library.<clinit>(Library.java:49)
   at org.lwjgl.system.MemoryUtil.<clinit>(MemoryUtil.java:59)
   at org.lwjgl.system.MemoryStack.<init>(MemoryStack.java:60)
   at org.lwjgl.system.MemoryStack.create(MemoryStack.java:79)
   at org.lwjgl.system.MemoryStack.create(MemoryStack.java:70)
   at org.lwjgl.system.MemoryStack$$Lambda$5/18597869.get(Unknown Source)
   at java.lang.ThreadLocal$SuppliedThreadLocal.initialValue(ThreadLocal.java:284)
   at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:180)
   at java.lang.ThreadLocal.get(ThreadLocal.java:170)
   at org.lwjgl.system.MemoryStack.stackGet(MemoryStack.java:605)
   at org.lwjgl.system.MemoryStack.stackPush(MemoryStack.java:614)
   at org.lwjgl.system.Callback.<clinit>(Callback.java:38)
   at com.proj.swacre.tester3d.mains.Tester3D.init(Tester3D.java:72)
   at com.proj.swacre.tester3d.mains.Tester3D.run(Tester3D.java:56)
   at com.proj.swacre.tester3d.mains.Tester3D.main(Tester3D.java:152)

Kai

You obviously use a different JRE when starting the app. Compare your output:
Quote from: scrappy on June 16, 2017, 10:39:22
{/tmp} > java -version
... OpenJDK 64-Bit Server VM (build 25.131-b12, mixed mode)
with LWJGL's JVM query:
Quote from: scrappy on June 16, 2017, 10:39:22
Java HotSpot(TM) Server VM v25.45-b02 by Oracle Corporation
the latter one being a 32-bit JVM.


scrappy

Think I got the 32bit issue fixed.

Hello LWJGL 3.1.2 build 29!
[LWJGL] Version: 3.1.2 build 29
[LWJGL]     OS: Linux v3.10.0-514.21.1.el7.x86_64
[LWJGL]    JRE: 1.8.0_131 amd64
[LWJGL]    JVM: OpenJDK 64-Bit Server VM v25.131-b12 by Oracle Corporation
[LWJGL] Loading library (system): lwjgl
[LWJGL]    liblwjgl.so not found in java.library.path
[LWJGL] Failed to load a library. Possible solutions:
   a) Add the directory that contains the shared library to -Djava.library.path or -Dorg.lwjgl.librarypath.
   b) Add the JAR that contains the shared library to the classpath.
Exception in thread "main" java.lang.UnsatisfiedLinkError: Failed to locate library: liblwjgl.so
   at org.lwjgl.system.Library.loadSystem(Library.java:146)
   at org.lwjgl.system.Library.loadSystem(Library.java:66)
   at org.lwjgl.system.Library.<clinit>(Library.java:49)
   at org.lwjgl.system.MemoryUtil.<clinit>(MemoryUtil.java:59)
   at org.lwjgl.system.MemoryStack.<init>(MemoryStack.java:60)
   at org.lwjgl.system.MemoryStack.create(MemoryStack.java:79)
   at org.lwjgl.system.MemoryStack.create(MemoryStack.java:70)
   at java.lang.ThreadLocal$SuppliedThreadLocal.initialValue(ThreadLocal.java:284)
   at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:180)
   at java.lang.ThreadLocal.get(ThreadLocal.java:170)
   at org.lwjgl.system.MemoryStack.stackGet(MemoryStack.java:605)
   at org.lwjgl.system.MemoryStack.stackPush(MemoryStack.java:614)
   at org.lwjgl.system.Callback.<clinit>(Callback.java:38)
   at com.gdls.edd.sw.tester3d.Tester3D.init(Tester3D.java:74)
   at com.gdls.edd.sw.tester3d.Tester3D.run(Tester3D.java:58)
   at com.gdls.edd.sw.tester3d.Tester3D.main(Tester3D.java:162)

Where do I find liblwjgl.so? it is not in the lwjgl unzipped directory(s) anywhere. Neither does it appear in /bin, /usr/bin., etc.

Thanks ahead of time!


spasi

You must add the JAR files that contain the natives to the classpath. Read this for more options.