-
Notifications
You must be signed in to change notification settings - Fork 19
JNA not built for aarch64 #85
Comments
@r58Playz did we have a solution for this? |
https://github.com/r58Playz/jna-4.4.0-m1 has jna 4.4.0, i guess you could use the patches from there |
Applied the changes from that repo to https://github.com/jcrm1/jna-3.4.0-m1, but still getting the same error I got when trying to build it without modifications.
|
(replace the contents of config.sub in libffi source with PS: use three ticks (```) for better code blocks |
Well, I had a long comment written up detailing what I've tried, but then I got a kernel panic. Instead, I'll just leave the key error message here (from config.log):
My guess is that somewhere in the configure process, the target architecture is getting set to aarch64 instead of arm64, which neither apple-clang nor GNU gcc recognize as a valid architecture. |
Here you have to change the libffi makefile a bit since thats probably where it's setting the arch. probably try getting some patches from either your commit or my 4.4.0 repo |
I tried a lot of stuff, but I couldn't get it to build. Regardless, it turns out that the game works fine if you swap 3.4.0 for 5.10.0. I did this by changing
to as follows:
in net.minecraft.json for 1.8.9. You can find this file through Closing the issue because my original issue is solved, and I believe that hosting modified libraries (not natives) could be out-of-scope for ManyMC since I can't find any that are currently hosted. |
Glad you found a solution! Apologies I haven't been able to help, been very busy lately. This is definitely in scope for ManyMC as we maintain and host various modified libraries specifically to work on M1. Eventually I will look into this, when I get some free time. |
Good to know, and good luck! |
!! Please fill in this template, DO NOT ignore or delete it. !!
I tried basic troubleshooting first
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:
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
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
returnsMach-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.
The text was updated successfully, but these errors were encountered: