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

Crash on macOS running ARM M1 processor (Mumble is also running ARM native) #42

Open
josefleventon opened this issue Mar 19, 2021 · 8 comments
Labels

Comments

@josefleventon
Copy link

-- 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] {}```
@zsawyer zsawyer added the bug label Mar 20, 2021
@zsawyer
Copy link
Owner

zsawyer commented Mar 20, 2021

see zsawyer/mumble-LinkAPI#2

@josefleventon
Copy link
Author

Thank you! I'll give it a try tomorrow and comment if it worked.

@josefleventon
Copy link
Author

fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: build/libLinkAPI.dylib (No such file or directory)

@jason-green-io
Copy link

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.

@zsawyer
Copy link
Owner

zsawyer commented Jul 24, 2021

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.

@zsawyer
Copy link
Owner

zsawyer commented Jul 24, 2021

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?

@jason-green-io
Copy link

jason-green-io commented Jul 24, 2021 via email

@zsawyer
Copy link
Owner

zsawyer commented Aug 23, 2021

It does. It just does it a bit differently: https://github.com/magneticflux-/jvm-shared-memory

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

No branches or pull requests

3 participants