Fazecast / jSerialComm

Platform-independent serial port access for Java
GNU Lesser General Public License v3.0
1.35k stars 287 forks source link

Missing Support for Apple Silicon / AArm64/aarch64 #332

Closed dominikjungo closed 3 years ago

dominikjungo commented 3 years ago

Running jSerialComm on an Apple M1/Apple Silicon/AArm64 only works using the Intel x86_64 Java binaries. Using the Apple Silicon Java binaries I get the following error:

java.lang.UnsatisfiedLinkError: /private/var/folders/ls/_9vz68qs799bxk26f0_30vj80000gn/T/jSerialComm/1614519596533-libjSerialComm.jnilib: dlopen(/private/var/folders/ls/_9vz68qs799bxk26f0_30vj80000gn/T/jSerialComm/1614519596533-libjSerialComm.jnilib, 1): no suitable image found. Did find: /private/var/folders/ls/_9vz68qs799bxk26f0_30vj80000gn/T/jSerialComm/1614519596533-libjSerialComm.jnilib: mach-o, but wrong architecture /private/var/folders/ls/_9vz68qs799bxk26f0_30vj80000gn/T/jSerialComm/1614519596533-libjSerialComm.jnilib: mach-o, but wrong architecture at java.base/jdk.internal.loader.NativeLibraries.load(Native Method) ~[na:na] at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:383) ~[na:na] at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:227) ~[na:na] at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:169) ~[na:na] at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2383) ~[na:na] at java.base/java.lang.Runtime.load0(Runtime.java:746) ~[na:na] at java.base/java.lang.System.load(System.java:1857) ~[na:na] at com.fazecast.jSerialComm.SerialPort.<clinit>(SerialPort.java:248) ~[jSerialComm-2.6.2.jar:2.6.2]

nuntipat commented 3 years ago

I have built the native library needed for native M1 support. You can pull #343 or download the jar file here to help test this build.

dominikjungo commented 3 years ago

I tested the jar on my M1. It works fine. Thanks a lot. I'm looking forward seeing it in a release

recepsahin commented 3 years ago

I have built the native library needed for native M1 support. You can pull #343 or download the jar file here to help test this build.

Thank you very much. I've been searching an alternative solution for Apple Silicon.

hedgecrw commented 3 years ago

Native M1 is now supported.