
Crash on macOS running ARM M1 processor (Mumble is also running ARM native)
josefleventon opened this issue · 8 comments
-- MOD mumblelink --
Details:
Mod File: mumblelink-1.16.4-4.6.2.jar
Failure message: MumbleLink for Forge (mumblelink) encountered an error during the sided_setup event phase
java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
Mod Version: 4.6.2
Mod Issue URL: http://sourceforge.net/projects/modmumblelink//issues
Exception message: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
Stacktrace:
at com.sun.jna.NativeLibrary.<clinit>(NativeLibrary.java:96) ~[jna-4.4.0.jar:4.4.0 (b0)] {re:classloading}
at zsawyer.mods.mumblelink.loader.PackageLibraryLoader.loadLibrary(PackageLibraryLoader.java:74) ~[mumblelink:1.16.4-4.6.2] {re:classloading}
at zsawyer.mods.mumblelink.MumbleLinkBase.initComponents(MumbleLinkBase.java:69) ~[mumblelink:1.16.4-4.6.2] {re:classloading}
at zsawyer.mods.mumblelink.MumbleLinkBase.load(MumbleLinkBase.java:61) ~[mumblelink:1.16.4-4.6.2] {re:classloading}
at zsawyer.mods.mumblelink.MumbleLinkImpl.load(MumbleLinkImpl.java:104) ~[mumblelink:1.16.4-4.6.2] {re:classloading,pl:runtimedistcleaner:A}
at zsawyer.mods.mumblelink.MumbleLinkImpl.setup(MumbleLinkImpl.java:80) ~[mumblelink:1.16.4-4.6.2] {re:classloading,pl:runtimedistcleaner:A}
at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:247) ~[eventbus-3.0.5-service.jar:?] {}
at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:239) ~[eventbus-3.0.5-service.jar:?] {}
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:297) ~[eventbus-3.0.5-service.jar:?] {}
at net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:120) ~[forge:35.1] {re:classloading}
at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:121) ~[forge:?] {re:classloading}
at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1640) ~[?:1.8.0_282] {}
at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1632) ~[?:1.8.0_282] {}
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) ~[?:1.8.0_282] {}
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) ~[?:1.8.0_282] {}
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) ~[?:1.8.0_282] {re:computing_frames}
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175) ~[?:1.8.0_282] {}```
I managed to compile an arm version of the dylib:
build_osx64/libmod_MumbleLink.dylib: Mach-O 64-bit dynamically linked shared library arm64
I think I can make an x86 and amr64 dylib .. maybe it's time to drop 32bit and support a new version of universal binary (x86/arm)?
I'm not familiar with gradlew or all the java stuff so I can't compile the mod, but I'm willing to be the mac build and test environment to get this mod working on M1 Macs.
Hey! That sounds great. You do not need to compile the mod. All you should need to do is use some zip tool and replace the dylib inside the mod's jar file within it's darwin folder.
I am sorry. We still might have a problem ... I had not updated the natives folder in this repo see #8. It might be that you compiled for JNI and not JNA?
I managed to compile an arm version of the dylib:
build_osx64/libmod_MumbleLink.dylib: Mach-O 64-bit dynamically linked shared library arm64
I think I can make an x86 and amr64 dylib .. maybe it's time to drop 32bit and support a new version of universal binary (x86/arm)?
I'm not familiar with gradlew or all the java stuff so I can't compile the mod, but I'm willing to be the mac build and test environment to get this mod working on M1 Macs.
It does. It just does it a bit differently: https://github.com/magneticflux-/jvm-shared-memory