Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Minecraft: Failed to locate library: liblwjgl.so
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gamers & Players
View previous topic :: View next topic  
Author Message
statikregimen
Apprentice
Apprentice


Joined: 16 Jul 2011
Posts: 173
Location: USA/Michigan

PostPosted: Sun Mar 17, 2019 11:20 pm    Post subject: [SOLVED] Minecraft: Failed to locate library: liblwjgl.so Reply with quote

Hello,

For now, I'm getting by with https://gpo.zugaina.org/games-action/minecraft but it'd be nice to just download the game directly from Mojang for updates, rather than relying on someone else's time/effort, so hopefully I can solve this issue.

I'm struggling to find any relevant references about lwjgl in my searching so far...certainly no mention of a way to install it (or add support via USE flag, or whatever). Feels like one of those issues where I'm the only one in the world who's had this, yet somehow the above ebuild is working?

Any help is, as always, greatly appreciated!!

Here is the crash log, fwiw:

Code:
---- Minecraft Crash Report ----
// Hey, that tickles! Hehehe!

Time: 3/17/19 7:05 PM
Description: Initializing game

java.lang.UnsatisfiedLinkError: Failed to locate library: liblwjgl.so
   at org.lwjgl.system.Library.loadSystem(Library.java:147)
   at org.lwjgl.system.Library.loadSystem(Library.java:67)
   at org.lwjgl.system.Library.<clinit>(Library.java:50)
   at org.lwjgl.system.MemoryUtil.<clinit>(MemoryUtil.java:61)
   at org.lwjgl.system.MemoryStack.<init>(MemoryStack.java:61)
   at org.lwjgl.system.MemoryStack.create(MemoryStack.java:82)
   at org.lwjgl.system.MemoryStack.create(MemoryStack.java:71)
   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:628)
   at org.lwjgl.system.MemoryStack.stackPush(MemoryStack.java:637)
   at cgd.a(SourceFile:127)
   at cft.an(SourceFile:557)
   at cft.am(SourceFile:436)
   at cft.a(SourceFile:380)
   at net.minecraft.client.main.Main.main(SourceFile:144)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
   at org.lwjgl.system.Library.loadSystem(Library.java:147)
   at org.lwjgl.system.Library.loadSystem(Library.java:67)
   at org.lwjgl.system.Library.<clinit>(Library.java:50)
   at org.lwjgl.system.MemoryUtil.<clinit>(MemoryUtil.java:61)
   at org.lwjgl.system.MemoryStack.<init>(MemoryStack.java:61)
   at org.lwjgl.system.MemoryStack.create(MemoryStack.java:82)
   at org.lwjgl.system.MemoryStack.create(MemoryStack.java:71)
   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:628)
   at org.lwjgl.system.MemoryStack.stackPush(MemoryStack.java:637)
   at cgd.a(SourceFile:127)
   at cft.an(SourceFile:557)
   at cft.am(SourceFile:436)

-- Initialization --
Details:
Stacktrace:
   at cft.a(SourceFile:380)
   at net.minecraft.client.main.Main.main(SourceFile:144)

-- System Details --
Details:
   Minecraft Version: 1.13.2
   Operating System: Linux (amd64) version 4.19.27-gentoo-r1
   Java Version: 1.8.0_191, Oracle Corporation
   Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation
   Memory: 420614928 bytes (401 MB) / 536870912 bytes (512 MB) up to 2147483648 bytes (2048 MB)
   JVM Flags: 8 total; -Xss1M -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
   Launched Version: 1.13.2
   LWJGL: 3.1.6 build 14
   OpenGL: ~~ERROR~~ NoClassDefFoundError: Could not initialize class org.lwjgl.system.Library
   GL Caps:
   Using VBOs: Yes
   Is Modded: Probably not. Jar signature remains and client brand is untouched.
   Type: Client (map_client.txt)
   Resource Packs:
   Current Language: ~~ERROR~~ NullPointerException: null
   Profiler Position: N/A (disabled)
   CPU: <unknown>


Last edited by statikregimen on Fri Sep 27, 2019 1:30 am; edited 3 times in total
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Mon Mar 18, 2019 12:28 am    Post subject: Reply with quote

Where are you seeing 1.14? The official source says the latest is 19w11b, which the java launcher runs just fine.
Back to top
View user's profile Send private message
statikregimen
Apprentice
Apprentice


Joined: 16 Jul 2011
Posts: 173
Location: USA/Michigan

PostPosted: Mon Mar 18, 2019 4:14 am    Post subject: Reply with quote

Well, I'm a moron about the latest version... something in the minecraft wiki lead me to beleive 1.14 was released. Anyway, i see here, that it is still upcoming. My bad.

Nevertheless, that doesn't change nor solve my problem at all and I would still like to sort it.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Mon Mar 18, 2019 5:26 am    Post subject: Reply with quote

lwjgl.so is supposed to be extracted from the game files at runtime, do you have /home mounted noexec?
Back to top
View user's profile Send private message
statikregimen
Apprentice
Apprentice


Joined: 16 Jul 2011
Posts: 173
Location: USA/Michigan

PostPosted: Mon Mar 18, 2019 5:49 am    Post subject: Reply with quote

Thanks for the replies

Home is mounted thusly, in fstab:

Code:
/dev/bcache0                                            /home           ext4            noatime                 0 1
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Mon Mar 18, 2019 6:27 am    Post subject: Reply with quote

Doesn't look like a filesystem issue...I'm not sure what it could be. Does the file exist? Look in ~/.minecraft/versions/<ver>/ for a directory with "natives" in the name, you might need something like inotify-tools to catch it being written if it cleans up on crash though.

Alternatively, there's a lwjgl package in java-overlay that might work as a workaround.
Back to top
View user's profile Send private message
statikregimen
Apprentice
Apprentice


Joined: 16 Jul 2011
Posts: 173
Location: USA/Michigan

PostPosted: Mon Mar 18, 2019 9:14 pm    Post subject: Reply with quote

I still have the game installed via the working overlay, mentioned above, so any files in ~/.minecraft have likely been created by that. I did not realize that directory existed, so I renamed it, to get it out of the way and tried again. This time it seemed to download a bunch of stuff, but still threw the same error in the end.

It predictably created a new ~/.minecraft/ and in versions/1.13.2/ there is a .jar and a .json file. I'm not familiar with inotify-tools, but will try to firgure it out when I get a chance. I will try the java-overlay as well.

THanks!

Edit:

I forgot to mention

Code:
find ~/.minecraft/ -name "*lwjgl*"
/home/statik/.minecraft/libraries/org/lwjgl
/home/statik/.minecraft/libraries/org/lwjgl/lwjgl
/home/statik/.minecraft/libraries/org/lwjgl/lwjgl/3.1.6/lwjgl-3.1.6.jar
/home/statik/.minecraft/libraries/org/lwjgl/lwjgl/3.1.6/lwjgl-3.1.6-natives-linux.jar
/home/statik/.minecraft/libraries/org/lwjgl/lwjgl-openal
/home/statik/.minecraft/libraries/org/lwjgl/lwjgl-openal/3.1.6/lwjgl-openal-3.1.6.jar
/home/statik/.minecraft/libraries/org/lwjgl/lwjgl-openal/3.1.6/lwjgl-openal-3.1.6-natives-linux.jar
/home/statik/.minecraft/libraries/org/lwjgl/lwjgl-glfw
/home/statik/.minecraft/libraries/org/lwjgl/lwjgl-glfw/3.1.6/lwjgl-glfw-3.1.6-natives-linux.jar
/home/statik/.minecraft/libraries/org/lwjgl/lwjgl-glfw/3.1.6/lwjgl-glfw-3.1.6.jar
/home/statik/.minecraft/libraries/org/lwjgl/lwjgl-jemalloc
/home/statik/.minecraft/libraries/org/lwjgl/lwjgl-jemalloc/3.1.6/lwjgl-jemalloc-3.1.6.jar
/home/statik/.minecraft/libraries/org/lwjgl/lwjgl-jemalloc/3.1.6/lwjgl-jemalloc-3.1.6-natives-linux.jar
/home/statik/.minecraft/libraries/org/lwjgl/lwjgl-stb
/home/statik/.minecraft/libraries/org/lwjgl/lwjgl-stb/3.1.6/lwjgl-stb-3.1.6-natives-linux.jar
/home/statik/.minecraft/libraries/org/lwjgl/lwjgl-stb/3.1.6/lwjgl-stb-3.1.6.jar
/home/statik/.minecraft/libraries/org/lwjgl/lwjgl-opengl
/home/statik/.minecraft/libraries/org/lwjgl/lwjgl-opengl/3.1.6/lwjgl-opengl-3.1.6.jar
/home/statik/.minecraft/libraries/org/lwjgl/lwjgl-opengl/3.1.6/lwjgl-opengl-3.1.6-natives-linux.jar


The output appears to be more or less the same on the working overlay, as well. No sign of the .so file, so I'm really confused how the overlay is magically working.

Also, it is worth mentioning, I have the same issue on 2 different machines, with vastly different hardware (one is all AMD, the other is intel/nvidia).
Back to top
View user's profile Send private message
statikregimen
Apprentice
Apprentice


Joined: 16 Jul 2011
Posts: 173
Location: USA/Michigan

PostPosted: Sun Sep 22, 2019 12:50 am    Post subject: Reply with quote

This is an ongoing issue. The legacy launcher from the flussence overlay no longer works. It's too buggy to try installing other versions of the game (the UI doesn't refresh properly). But as of 1.14.3 or .4, it just hangs when I click "Play"...button changes to "Preparing" and nothing else happens until I force quit (it doesn't even seem to try to download anything).

I tried a newer launcher version from the trolltoo overlay, which is only working on only one of three machines, so far...the other two continue to complain about missing lgjwgl.

I've tried basically all the other overlays as well, as far as I know. Direct download from the official Minecraft website, has the same issue.

Thankfully, I no longer feel like the only person in the world. There is this recent official bug report. One other Gentoo user also replied to it, and mentioned a workaround but I have no idea what he means.

EDIT: I spoke to soon about the buggy UI above. I'm now trying to use the version from the java overlay (as opposed to flussence above), and this UI is much better so far.

EDIT2: Was successfully able add a new profile for 1.14.3 and game downloaded, then launched normally. I will investigate this odd behavior more....So far cannot get 1.14.4 to even download from the launcher available in the java overlay. And while it will download in newer launchers, it will not run due to apparently missing LGJGW.

EDIT3: I have no idea which overlay I'm using to make 1.14.3 work =/


Last edited by statikregimen on Mon Sep 23, 2019 6:18 am; edited 1 time in total
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sun Sep 22, 2019 9:41 pm    Post subject: Reply with quote

Vanilla 1.6.91 launcher will download and run 1.14.3 fine for me.

With 1.14.4 it freezes with a "Preparing..." message, and I get this in the terminal:
Code:
[21:31:01 FATAL]: Unhandled exception in thread Thread[pool-2-thread-3,5,main]
com.google.gson.JsonSyntaxException: duplicate key: null
        at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:190) ~[launcher.jar:1.6.91]
        at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145) ~[launcher.jar:1.6.91]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93) ~[launcher.jar:1.6.91]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172) ~[launcher.jar:1.6.91]
        at com.google.gson.Gson.fromJson(Gson.java:803) ~[launcher.jar:1.6.91]
        at com.google.gson.Gson.fromJson(Gson.java:768) ~[launcher.jar:1.6.91]
        at com.google.gson.Gson.fromJson(Gson.java:717) ~[launcher.jar:1.6.91]
        at com.google.gson.Gson.fromJson(Gson.java:689) ~[launcher.jar:1.6.91]
        at net.minecraft.launcher.updater.RemoteVersionList.getCompleteVersion(RemoteVersionList.java:32) ~[launcher.jar:1.6.91]
        at net.minecraft.launcher.updater.MinecraftVersionManager.getLatestCompleteVersion(MinecraftVersionManager.java:213) ~[launcher.jar:1.6.91]
        at net.minecraft.launcher.updater.MinecraftVersionManager.getLatestCompleteVersion(MinecraftVersionManager.java:37) ~[launcher.jar:1.6.91]
        at com.mojang.launcher.game.runner.AbstractGameRunner.playGame(AbstractGameRunner.java:67) ~[launcher.jar:1.6.91]
        at net.minecraft.launcher.game.GameLaunchDispatcher$1.run(GameLaunchDispatcher.java:111) ~[launcher.jar:1.6.91]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
        at java.base/java.lang.Thread.run(Thread.java:834) [?:?]
Back to top
View user's profile Send private message
statikregimen
Apprentice
Apprentice


Joined: 16 Jul 2011
Posts: 173
Location: USA/Michigan

PostPosted: Mon Sep 23, 2019 6:22 am    Post subject: Reply with quote

Ant P. wrote:
Vanilla 1.6.91 launcher will download and run 1.14.3 fine for me.

With 1.14.4 it freezes with a "Preparing..." message, and I get this in the terminal:
Code:
[21:31:01 FATAL]: Unhandled exception in thread Thread[pool-2-thread-3,5,main]
com.google.gson.JsonSyntaxException: duplicate key: null
        at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:190) ~[launcher.jar:1.6.91]
        at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145) ~[launcher.jar:1.6.91]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93) ~[launcher.jar:1.6.91]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172) ~[launcher.jar:1.6.91]
        at com.google.gson.Gson.fromJson(Gson.java:803) ~[launcher.jar:1.6.91]
        at com.google.gson.Gson.fromJson(Gson.java:768) ~[launcher.jar:1.6.91]
        at com.google.gson.Gson.fromJson(Gson.java:717) ~[launcher.jar:1.6.91]
        at com.google.gson.Gson.fromJson(Gson.java:689) ~[launcher.jar:1.6.91]
        at net.minecraft.launcher.updater.RemoteVersionList.getCompleteVersion(RemoteVersionList.java:32) ~[launcher.jar:1.6.91]
        at net.minecraft.launcher.updater.MinecraftVersionManager.getLatestCompleteVersion(MinecraftVersionManager.java:213) ~[launcher.jar:1.6.91]
        at net.minecraft.launcher.updater.MinecraftVersionManager.getLatestCompleteVersion(MinecraftVersionManager.java:37) ~[launcher.jar:1.6.91]
        at com.mojang.launcher.game.runner.AbstractGameRunner.playGame(AbstractGameRunner.java:67) ~[launcher.jar:1.6.91]
        at net.minecraft.launcher.game.GameLaunchDispatcher$1.run(GameLaunchDispatcher.java:111) ~[launcher.jar:1.6.91]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
        at java.base/java.lang.Thread.run(Thread.java:834) [?:?]


This is similar to the console output I have received. I forgot to post it. I did manage to get the latest launcher & 1.14.4 to work on one out of 3 Gentoo boxes, but no clue why the one machine works while two others do not.
Back to top
View user's profile Send private message
Satuya Lekany
n00b
n00b


Joined: 26 Jul 2015
Posts: 2

PostPosted: Thu Sep 26, 2019 3:12 pm    Post subject: Reply with quote

Ant P. wrote:
lwjgl.so is supposed to be extracted from the game files at runtime, do you have /home mounted noexec?

Except liblwjgl.so is extracted to TMPDIR with the newer launcher ;)

For people who have /tmp mounted as noexec, just create a temporary directory on a partition not mounted as such (like "$HOME/.tmp", if your home directory isn't), and start minecraft-launcher with TMPDIR="/path/to/exec/tmp/dir"...

I'll report this to https://bugs.mojang.com/browse/MCL-11562 in a bit...

I can now start Minecraft 1.14.4 and Minecraft 1.0 (which displayed another error, mentioning /tmp), without any issue.
Back to top
View user's profile Send private message
statikregimen
Apprentice
Apprentice


Joined: 16 Jul 2011
Posts: 173
Location: USA/Michigan

PostPosted: Fri Sep 27, 2019 1:12 am    Post subject: Reply with quote

Satuya Lekany wrote:
Ant P. wrote:
lwjgl.so is supposed to be extracted from the game files at runtime, do you have /home mounted noexec?

Except liblwjgl.so is extracted to TMPDIR with the newer launcher ;)

For people who have /tmp mounted as noexec, just create a temporary directory on a partition not mounted as such (like "$HOME/.tmp", if your home directory isn't), and start minecraft-launcher with TMPDIR="/path/to/exec/tmp/dir"...

I'll report this to https://bugs.mojang.com/browse/MCL-11562 in a bit...

I can now start Minecraft 1.14.4 and Minecraft 1.0 (which displayed another error, mentioning /tmp), without any issue.


Confirmed: this also fixed one of my machines. I mount my /tmp via tmpfs in RAM, and for some reason had the noexec option. Now the latest launcher works and 1.14.4 starts just fine!

Thank you!!!
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21670

PostPosted: Fri Sep 27, 2019 1:52 am    Post subject: Reply with quote

You probably had noexec there because you read a post from me, or someone who thinks like me, encouraging you to put it there. It is correct that it be there. The launcher is incorrect to think it can write code to /tmp and run it. Blocking that is a very common security policy going back years, if not more than a decade, whether implemented via a mount option or something more elaborate, because that is a very common early step in exploits.

Step 1: get just enough code execution to write the real payload somewhere. /tmp is a popular place to write the payload because it practically always exists and is practically always writable.
Step 2: write that payload, possibly downloaded from somewhere.
Step 3: execute that payload, which would typically be less constrained than the stage 1 payload. For example, the stage 1 may be limited in size to what would fit in a buffer overflow, or limited in content to what could pass through the victim's filters. The second payload is usually retrieved through a path that relaxes the size and/or content limits substantially, making it easier to deliver a general purpose payload.

Setting noexec on /tmp causes step 3 to fail. Well-behaved programs that need to do this should take instruction from the administrator about where to put their files.
Back to top
View user's profile Send private message
statikregimen
Apprentice
Apprentice


Joined: 16 Jul 2011
Posts: 173
Location: USA/Michigan

PostPosted: Fri Sep 27, 2019 2:05 am    Post subject: Reply with quote

Good insights...thanks. I will use the environment variable you mentioned instead. And I have to agree, knowing more, they (Mojang) should improve their practices on this.
Back to top
View user's profile Send private message
Hund
Apprentice
Apprentice


Joined: 18 Jul 2016
Posts: 218
Location: Sweden

PostPosted: Fri Sep 27, 2019 10:42 am    Post subject: Reply with quote

Semi-OT: I would like to recommend the third party open source launcher called MultiMC[1]. It's created by some well known users from the modded Minecraft-community. It comes with a lot of features that the default launcher doesn't have, like having multiple instances of Minecraft in sandboxes, easy installation of Forge and Fabric et cetera.

1. https://multimc.org
_________________
Collect memories, not things.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gamers & Players All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum