Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

JNA not built for aarch64 #85

@jcrm1

Description

@jcrm1

!! 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:

  1. Download LabyMod 3 from labymod.net 2.
  2. Run jar with java -jar LabyMod*.jar
  3. 1.8.9, Forge, Other (Extract)
  4. Add mod to 1.8.9 with Forge instance
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions