-
Notifications
You must be signed in to change notification settings - Fork 18
JNA not built for aarch64 #85
Description
!! Please fill in this template, DO NOT ignore or delete it. !!
I tried basic troubleshooting first
- Carefully read the installation guide
- Carefully read the troubleshooting guide
Describe the bug
ManyMC is not patching a version (3.4.0) of JNA that does not support arm64 by default, so Minecraft 1.8.9 is crashing when loading a mod (LabyMod 3) that requires it.
To reproduce
Steps to reproduce the behavior:
- Download LabyMod 3 from labymod.net 2.
- Run jar with java -jar LabyMod*.jar
- 1.8.9, Forge, Other (Extract)
- Add mod to 1.8.9 with Forge instance
- Launch, crash and see the below error
Expected behavior
Game should launch normally
Logs
Caused by: java.lang.UnsatisfiedLinkError: /private/var/folders/h9/3qh3y4ts7wz2f1qllz1yv7w80000gn/T/jna/jna2002535842885038387.tmp: dlopen(/private/var/folders/h9/3qh3y4ts7wz2f1qllz1yv7w80000gn/T/jna/jna2002535842885038387.tmp, 0x0001): tried: '/private/var/folders/h9/3qh3y4ts7wz2f1qllz1yv7w80000gn/T/jna/jna2002535842885038387.tmp' (fat file, but missing compatible architecture (have 'i386,x86_64,unknown', need 'arm64e'))
Screenshots
N/A
System configuration
- ManyMC version: 0.1.2-develop
- Java version: zulu8.62.0.19-ca-jdk8.0.332-macosx_aarch64
Additional context
~/Library/Application Support/ManyMC/libraries/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar contains a file in com/sun/jna/darwin/*.jnilib that is identical to the file (jna2002535842885038387.tmp) referenced in the error above. file jna2002535842885038387.tmp
returns Mach-O universal binary with 3 architectures: [i386:Mach-O dynamically linked shared library i386Mach-O dynamically linked shared library i386] [x86_64:Mach-O 64-bit dynamically linked shared library x86_64Mach-O 64-bit dynamically linked shared library x86_64] [ppc_7400:Mach-O dynamically linked shared library ppc_7400Mach-O dynamically linked shared library ppc_7400] jna6932855343444723145.tmp (for architecture i386): Mach-O dynamically linked shared library i386 jna6932855343444723145.tmp (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64 jna6932855343444723145.tmp (for architecture ppc7400): Mach-O dynamically linked shared library ppc_7400
This shows that the library lacks support for arm64/aarch64 in its current state.
jna6932855343444723145.tmp.zip
The solution could be to rebuild JNA 3.4.0 for aarch64- however, I am not experienced with ant, and I was unable to get this working. I can, however, provide the commit in which aarch64 support was added to JNA.