Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Aarch64 #66

Open
liberodark opened this issue Feb 7, 2023 · 3 comments
Open

Add support for Aarch64 #66

liberodark opened this issue Feb 7, 2023 · 3 comments

Comments

@liberodark
Copy link

liberodark commented Feb 7, 2023

Hi @Kron4ek ,

Can you add release for arm64 / aarch64.
That would be great for use minecraft java on Linux ARM.
Have build the arm64 version if you want.
The only issue is hard too download files is crashing.

[1] 18169 segmentation fault (core dumped) ./VLauncher_1.1.19_arm64_Linux

After 2000 files have :

(VLauncher_1.1.19_arm64_Linux:26563): Pango-WARNING **: 17:54:11.708: Invalid UTF-8 string passed to pango_layout_set_text()

(VLauncher_1.1.19_arm64_Linux:26563): Pango-CRITICAL **: 17:54:11.711: pango_layout_set_width: assertion 'layout != NULL' failed

(VLauncher_1.1.19_arm64_Linux:26563): Pango-CRITICAL **: 17:54:11.711: pango_layout_get_extents: assertion 'layout != NULL' failed

(VLauncher_1.1.19_arm64_Linux:26563): Pango-WARNING **: 17:54:11.711: Invalid UTF-8 string passed to pango_layout_set_text()

(VLauncher_1.1.19_arm64_Linux:26563): Pango-CRITICAL **: 17:54:11.712: pango_layout_set_width: assertion 'layout != NULL' failed

(VLauncher_1.1.19_arm64_Linux:26563): Pango-CRITICAL **: 17:54:11.712: pango_layout_get_width: assertion 'layout != NULL' failed

(VLauncher_1.1.19_arm64_Linux:26563): GLib-GObject-CRITICAL **: 17:54:11.712: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

(VLauncher_1.1.19_arm64_Linux:26563): Pango-CRITICAL **: 17:54:11.712: pango_layout_set_width: assertion 'layout != NULL' failed

(VLauncher_1.1.19_arm64_Linux:26563): Pango-CRITICAL **: 17:54:11.712: pango_layout_get_extents: assertion 'layout != NULL' failed

(VLauncher_1.1.19_arm64_Linux:26563): Pango-CRITICAL **: 17:54:11.712: pango_layout_set_width: assertion 'layout != NULL' failed

(VLauncher_1.1.19_arm64_Linux:26563): Pango-CRITICAL **: 17:54:11.712: pango_layout_get_width: assertion 'layout != NULL' failed

(VLauncher_1.1.19_arm64_Linux:26563): GLib-GObject-CRITICAL **: 17:54:11.712: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

(VLauncher_1.1.19_arm64_Linux:26563): Pango-CRITICAL **: 17:54:11.712: pango_layout_get_extents: assertion 'layout != NULL' failed

(VLauncher_1.1.19_arm64_Linux:26563): GLib-GObject-CRITICAL **: 17:54:11.712: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(VLauncher_1.1.19_arm64_Linux:26563): Pango-CRITICAL **: 17:54:11.712: pango_layout_set_width: assertion 'layout != NULL' failed

(VLauncher_1.1.19_arm64_Linux:26563): Pango-CRITICAL **: 17:54:11.712: pango_layout_get_width: assertion 'layout != NULL' failed

(VLauncher_1.1.19_arm64_Linux:26563): GLib-GObject-CRITICAL **: 17:54:11.712: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

(VLauncher_1.1.19_arm64_Linux:26563): Pango-CRITICAL **: 17:54:11.712: pango_layout_set_width: assertion 'layout != NULL' failed

(VLauncher_1.1.19_arm64_Linux:26563): Pango-CRITICAL **: 17:54:11.712: pango_layout_get_extents_internal: assertion 'layout != NULL' failed

(VLauncher_1.1.19_arm64_Linux:26563): Pango-CRITICAL **: 17:54:11.712: pango_layout_get_extents_internal: assertion 'layout != NULL' failed

(VLauncher_1.1.19_arm64_Linux:26563): GLib-GObject-CRITICAL **: 17:54:11.712: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(VLauncher_1.1.19_arm64_Linux:26563): Pango-CRITICAL **: 17:54:11.712: pango_layout_get_line_count: assertion 'layout != NULL' failed

(VLauncher_1.1.19_arm64_Linux:26563): Pango-CRITICAL **: 17:54:11.712: pango_layout_get_pixel_extents: assertion 'PANGO_IS_LAYOUT (layout)' failed

(VLauncher_1.1.19_arm64_Linux:26563): Pango-CRITICAL **: 17:54:11.712: pango_layout_set_attributes: assertion 'layout != NULL' failed

(VLauncher_1.1.19_arm64_Linux:26563): Pango-CRITICAL **: 17:54:11.712: pango_layout_set_alignment: assertion 'layout != NULL' failed

(VLauncher_1.1.19_arm64_Linux:26563): Pango-CRITICAL **: 17:54:11.712: pango_layout_set_ellipsize: assertion 'PANGO_IS_LAYOUT (layout)' failed

(VLauncher_1.1.19_arm64_Linux:26563): Pango-CRITICAL **: 17:54:11.712: pango_layout_set_wrap: assertion 'PANGO_IS_LAYOUT (layout)' failed

(VLauncher_1.1.19_arm64_Linux:26563): Pango-CRITICAL **: 17:54:11.712: pango_layout_set_single_paragraph_mode: assertion 'PANGO_IS_LAYOUT (layout)' failed
**
Gtk:ERROR:../gtk/gtk/gtklabel.c:3397:gtk_label_update_layout_width: assertion failed: (priv->layout)
Bail out! Gtk:ERROR:../gtk/gtk/gtklabel.c:3397:gtk_label_update_layout_width: assertion failed: (priv->layout)
[1]    26563 IOT instruction (core dumped)  ./VLauncher_1.1.19_arm64_Linux

Have change memory allocated to 3000 for download files.

Now have all files in 1.19.3 but i can run minecraft :

OpenJDK Runtime Environment (build 19.0.2+7)
OpenJDK 64-Bit Server VM (build 19.0.2+7, mixed mode)
  <log4j:Event logger="ape" timestamp="1675789935018" level="INFO" thread="main">
    <log4j:Message><![CDATA[Building optimized datafixer]]></log4j:Message>
  </log4j:Event>
  <log4j:Event logger="acm" timestamp="1675789935968" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]: [LWJGL] Platform/architecture mismatch detected for module: org.lwjgl]]></log4j:Message>
  </log4j:Event>
  <log4j:Event logger="acm" timestamp="1675789935969" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]:   JVM platform:]]></log4j:Message>
  </log4j:Event>
                Linux aarch64 19.0.2
                OpenJDK 64-Bit Server VM v19.0.2+7 by Oracle Corporation
        Platform available on classpath:
                linux/x64
  <log4j:Event logger="acm" timestamp="1675789935970" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]: [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.]]></log4j:Message>
  </log4j:Event>
  <log4j:Event logger="acm" timestamp="1675789935970" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]: [LWJGL] Enable debug mode with -Dorg.lwjgl.util.Debug=true for better diagnostics.]]></log4j:Message>
  </log4j:Event>
  <log4j:Event logger="acm" timestamp="1675789935970" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]: [LWJGL] Enable the SharedLibraryLoader debug mode with -Dorg.lwjgl.util.DebugLoader=true for better diagnostics.]]></log4j:Message>
  </log4j:Event>
Exception in thread "Render thread"   <log4j:Event logger="acm" timestamp="1675789936106" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]: java.lang.NoClassDefFoundError: Could not initialize class com.mojang.blaze3d.systems.RenderSystem]]></log4j:Message>
  </log4j:Event>
  <log4j:Event logger="acm" timestamp="1675789936106" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]:   at z.a(SourceFile:66)]]></log4j:Message>
  </log4j:Event>
  <log4j:Event logger="acm" timestamp="1675789936106" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]:   at ejf.a(SourceFile:2408)]]></log4j:Message>
  </log4j:Event>
  <log4j:Event logger="acm" timestamp="1675789936106" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]:   at ejf.a(SourceFile:2403)]]></log4j:Message>
  </log4j:Event>
  <log4j:Event logger="acm" timestamp="1675789936106" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]:   at net.minecraft.client.main.Main.a(SourceFile:214)]]></log4j:Message>
  </log4j:Event>
  <log4j:Event logger="acm" timestamp="1675789936107" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]:   at net.minecraft.client.main.Main.main(SourceFile:51)]]></log4j:Message>
  </log4j:Event>
  <log4j:Event logger="acm" timestamp="1675789936120" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]: Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: Failed to locate library: liblwjgl.so [in thread "Render thread"]]]></log4j:Message>
  </log4j:Event>
  <log4j:Event logger="acm" timestamp="1675789936121" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]:   at org.lwjgl.system.Library.loadSystem(Library.java:164)]]></log4j:Message>
  </log4j:Event>
  <log4j:Event logger="acm" timestamp="1675789936121" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]:   at org.lwjgl.system.Library.loadSystem(Library.java:63)]]></log4j:Message>
  </log4j:Event>
  <log4j:Event logger="acm" timestamp="1675789936121" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]:   at org.lwjgl.system.Library.<clinit>(Library.java:51)]]></log4j:Message>
  </log4j:Event>
  <log4j:Event logger="acm" timestamp="1675789936121" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]:   at org.lwjgl.system.MemoryUtil.<clinit>(MemoryUtil.java:100)]]></log4j:Message>
  </log4j:Event>
  <log4j:Event logger="acm" timestamp="1675789936121" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]:   at edb.<clinit>(SourceFile:8)]]></log4j:Message>
  </log4j:Event>
  <log4j:Event logger="acm" timestamp="1675789936121" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]:   at edy.<init>(SourceFile:51)]]></log4j:Message>
  </log4j:Event>
  <log4j:Event logger="acm" timestamp="1675789936121" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]:   at eef.<init>(SourceFile:19)]]></log4j:Message>
  </log4j:Event>
  <log4j:Event logger="acm" timestamp="1675789936121" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]:   at eef.<init>(SourceFile:23)]]></log4j:Message>
  </log4j:Event>
  <log4j:Event logger="acm" timestamp="1675789936121" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]:   at eef.<clinit>(SourceFile:11)]]></log4j:Message>
  </log4j:Event>
  <log4j:Event logger="acm" timestamp="1675789936121" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]:   at com.mojang.blaze3d.systems.RenderSystem.<clinit>(SourceFile:46)]]></log4j:Message>
  </log4j:Event>
  <log4j:Event logger="acm" timestamp="1675789936121" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]:   at net.minecraft.client.main.Main.a(SourceFile:202)]]></log4j:Message>
  </log4j:Event>
  <log4j:Event logger="acm" timestamp="1675789936121" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[STDERR]:   ... 1 more]]></log4j:Message>
  </log4j:Event>

Best Regards

@Kron4ek
Copy link
Owner

Kron4ek commented Feb 9, 2023

Hi,

I'll try to figure out how to emulate an arm64 environment via qemu and see if i can compile and test the launcher from there.

The problem is, however, even if the launcher works on arm64, the game itself can not run without LWJGL libraries that are compiled for arm64.

You will need to manually download LWJGL for arm64 from here (choose the same version as the game uses) and replace the existing libraries. And after that the game should work, in theory. For 1.19.3 the list is:

$ find libraries -name "*lwjgl*natives-linux*"
libraries/org/lwjgl/lwjgl-tinyfd/3.3.1/lwjgl-tinyfd-3.3.1-natives-linux.jar
libraries/org/lwjgl/lwjgl/3.3.1/lwjgl-3.3.1-natives-linux.jar
libraries/org/lwjgl/lwjgl-stb/3.3.1/lwjgl-stb-3.3.1-natives-linux.jar
libraries/org/lwjgl/lwjgl-opengl/3.3.1/lwjgl-opengl-3.3.1-natives-linux.jar
libraries/org/lwjgl/lwjgl-jemalloc/3.3.1/lwjgl-jemalloc-3.3.1-natives-linux.jar
libraries/org/lwjgl/lwjgl-openal/3.3.1/lwjgl-openal-3.3.1-natives-linux.jar
libraries/org/lwjgl/lwjgl-glfw/3.3.1/lwjgl-glfw-3.3.1-natives-linux.jar

@liberodark
Copy link
Author

liberodark commented Feb 13, 2023

Hi,

Thank about your support that not work for me have try to use 3.2.3 for 1.16.5 beacause is last MC version supported on my OS actually.
Have use other workaround : https://www.reddit.com/r/AsahiLinux/comments/zjpe68/how_to_run_minecraft_java_edition_on_asahi_linux/
That my log also have try v 1.19.3 too.

Sadly 3.2.2 is not for arm64 (that why have try 3.2.3)
image

---- Minecraft Crash Report ----
// Don't be sad, have a hug! <3

Time: 13/02/2023 18:03
Description: Initializing game

java.lang.ExceptionInInitializerError
	at dkd.<init>(SourceFile:146)
	at djz.<init>(SourceFile:440)
	at net.minecraft.client.main.Main.main(SourceFile:177)
Caused by: java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: Failed to locate library: liblwjgl.so
	at deo.<clinit>(SourceFile:46)
	... 3 more
Caused by: 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.MemoryAccessJNI.<clinit>(MemoryAccessJNI.java:13)
	at org.lwjgl.system.Pointer.<clinit>(Pointer.java:28)
	at org.lwjgl.system.Platform.mapLibraryNameBundled(Platform.java:80)
	at org.lwjgl.glfw.GLFW.<clinit>(GLFW.java:674)
	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1042)
	at java.base/java.lang.invoke.DirectMethodHandle$EnsureInitialized.computeValue(DirectMethodHandle.java:357)
	at java.base/java.lang.invoke.DirectMethodHandle$EnsureInitialized.computeValue(DirectMethodHandle.java:354)
	at java.base/java.lang.ClassValue.getFromHashMap(ClassValue.java:228)
	at java.base/java.lang.ClassValue.getFromBackup(ClassValue.java:210)
	at java.base/java.lang.ClassValue.get(ClassValue.java:116)
	at java.base/java.lang.invoke.DirectMethodHandle.checkInitialized(DirectMethodHandle.java:378)
	at java.base/java.lang.invoke.DirectMethodHandle.ensureInitialized(DirectMethodHandle.java:368)
	at java.base/java.lang.invoke.DirectMethodHandle.ensureInitialized(DirectMethodHandle.java:400)
	at deo.<clinit>(SourceFile:43)
	... 3 more


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

-- Head --
Thread: Render thread
Stacktrace:
	at dkd.<init>(SourceFile:146)
	at djz.<init>(SourceFile:440)

-- Initialization --
Details:
Stacktrace:
	at net.minecraft.client.main.Main.main(SourceFile:177)

-- System Details --
Details:
	Minecraft Version: 1.16.5
	Minecraft Version ID: 1.16.5
	Operating System: Linux (aarch64) version 6.1.0-asahi-2-2-edge-ARCH
	Java Version: 11.0.18, Oracle Corporation
	Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 1605540384 bytes (1531 MB) / 2147483648 bytes (2048 MB) up to 4294967296 bytes (4096 MB)
	CPUs: 8
	JVM Flags: 8 total; -Xmx4096M -Xss1M -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
	Launched Version: 1.16.5
	Backend library: LWJGL version 3.2.2 build 10
	Backend API: ~~ERROR~~ NoClassDefFoundError: Could not initialize class org.lwjgl.glfw.GLFW
	GL Caps: 
	Using VBOs: Yes
	Is Modded: Probably not. Jar signature remains and client brand is untouched.
	Type: Client (map_client.txt)
	CPU: <unknown>

That the version available on prism :

libraries/org/lwjgl/lwjgl-opengl-natives-linux-arm64
libraries/org/lwjgl/lwjgl-opengl-natives-linux-arm64/3.3.1-lwjgl.1/lwjgl-opengl-natives-linux-arm64-3.3.1-lwjgl.1.jar
libraries/org/lwjgl/lwjgl-openal/3.2.2-gman64.1/lwjgl-openal-3.2.2-gman64.1-natives-linux-arm64.jar
libraries/org/lwjgl/lwjgl-stb-natives-linux-arm64
libraries/org/lwjgl/lwjgl-stb-natives-linux-arm64/3.3.1-lwjgl.1/lwjgl-stb-natives-linux-arm64-3.3.1-lwjgl.1.jar
libraries/org/lwjgl/lwjgl-glfw-natives-linux-arm64
libraries/org/lwjgl/lwjgl-glfw-natives-linux-arm64/3.3.1-lwjgl.1/lwjgl-glfw-natives-linux-arm64-3.3.1-lwjgl.1.jar
libraries/org/lwjgl/lwjgl-jemalloc/3.2.2-gman64.2/lwjgl-jemalloc-3.2.2-gman64.2-natives-linux-arm64.jar
libraries/org/lwjgl/lwjgl-jemalloc-natives-linux-arm64
libraries/org/lwjgl/lwjgl-jemalloc-natives-linux-arm64/3.3.1-gman64.1/lwjgl-jemalloc-natives-linux-arm64-3.3.1-gman64.1.jar
libraries/org/lwjgl/lwjgl-glfw/3.2.2-gman64.1/lwjgl-glfw-3.2.2-gman64.1-natives-linux-arm64.jar
libraries/org/lwjgl/lwjgl-natives-linux-arm64
libraries/org/lwjgl/lwjgl-natives-linux-arm64/3.3.1-lwjgl.1/lwjgl-natives-linux-arm64-3.3.1-lwjgl.1.jar
libraries/org/lwjgl/lwjgl-stb/3.2.2-gman64.1/lwjgl-stb-3.2.2-gman64.1-natives-linux-arm64.jar
libraries/org/lwjgl/lwjgl-tinyfd/3.2.2-gman64.1/lwjgl-tinyfd-3.2.2-gman64.1-natives-linux-arm64.jar
libraries/org/lwjgl/lwjgl-opengl/3.2.2-gman64.1/lwjgl-opengl-3.2.2-gman64.1-natives-linux-arm64.jar
libraries/org/lwjgl/lwjgl-tinyfd-natives-linux-arm64
libraries/org/lwjgl/lwjgl-tinyfd-natives-linux-arm64/3.3.1-lwjgl.1/lwjgl-tinyfd-natives-linux-arm64-3.3.1-lwjgl.1.jar
libraries/org/lwjgl/lwjgl/3.2.2-gman64.1/lwjgl-3.2.2-gman64.1-natives-linux-arm64.jar
libraries/org/lwjgl/lwjgl-openal-natives-linux-arm64
libraries/org/lwjgl/lwjgl-openal-natives-linux-arm64/3.3.1-lwjgl.1/lwjgl-openal-natives-linux-arm64-3.3.1-lwjgl.1.jar

Also that try to copy build from gman but crash too :
lwjgl.zip
crash-2023-02-13_18.27.03-client.txt

If you have any idea ?
I remain available for tests as needed.

Best Regards

@Kron4ek
Copy link
Owner

Kron4ek commented Feb 13, 2023

Try this client, i adapted it for ARM64, maybe it will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants