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

Need to update to the latest JSSC to work on Apple M1 #525

Closed
ekawahyu opened this issue Aug 2, 2022 · 18 comments · Fixed by #577
Closed

Need to update to the latest JSSC to work on Apple M1 #525

ekawahyu opened this issue Aug 2, 2022 · 18 comments · Fixed by #577
Assignees

Comments

@ekawahyu
Copy link

ekawahyu commented Aug 2, 2022

Platform: macOS Monterey 12.4 Apple M1.
Issue Description: Processing 4.0b8 is having issue with incompatible JSSC library.
The Fix/Solution: Grab the latest JSSC jar file (as of this writing, v2.9.4) and overwrite the existing jssc.jar within Processing.app.
Step to Reproduce: Open and run SimpleRead example throws an error that JSSC is not available.

@benfry
Copy link
Owner

benfry commented Aug 2, 2022

Thanks for letting me know. Unfortunately the version we're using has been modified from the original, see: https://github.com/processing/processing4/blob/main/java/libraries/serial/library/jssc.txt

I can't say whether those changes are still required, and would need @sampottinger to weigh in since that was his original PR. With any luck we can just drop things in—I don't see anything obvious in those edits that should be required.

@benfry benfry changed the title [Issue and Fix] Need to update to the latest JSSC to work on Apple M1 Need to update to the latest JSSC to work on Apple M1 Aug 2, 2022
@benfry benfry added the Help Wanted We have very little time and would like some help label Aug 2, 2022
@ld21
Copy link

ld21 commented Aug 19, 2022

I would very much appreciate if you would fix the JSSC-issue. Without it, it is not possible, to use external hardware with processing 4 on a M1-Mac. Thank you!

@benfry
Copy link
Owner

benfry commented Aug 20, 2022

You can manually replace jssc.jar, as noted in the original post to get things working in the meantime.

I just can't blindly make that change and push it out to thousands of people until I hear from Sam or have time to look into the changes that he made when adding that library.

@ld21
Copy link

ld21 commented Aug 20, 2022

Hi Benfry – I replaced jssc.jar inside Processing.app with jssc.jar from https://github.com/java-native/jssc/releases as suggested – and Processing and Serial now work flawlessly as you mentioned. Thank you very much.

@benfry
Copy link
Owner

benfry commented Aug 20, 2022

Great, thanks for letting me know.

@hkiel
Copy link
Contributor

hkiel commented Sep 1, 2022

Plugging in the original jssc.jar works fine on my M1 as well.
MacOS arm64 seems to be implemented in 2.9.3 release on 2021-08-05.

Looking at @sampottinger's repository I see some RaspberryPi specific changes that might be missing in the official version. To (fully) support both M1 and RPi a new version might be necessary.

Can anybody check the official jssc.jar on RPi?

@RaphAtMatrix
Copy link

Hi there, sorry if it is obvious for you but I get the "UnsatisfiedLinkError: Could not load the jssc library: Couldn't load library library jssc" too and do not understand the fix. I have downloaded the latest processing stable version (4.0.1) from the processing website and then have installed it. If I open the package content of processing I don't see any libraries/serial folder in the Java folder. I've download processing rom GitHub and then have copy the serial libraries content into the package of my installed processing, so I get Java/libraries/Serial/libraries/jssc.rar (and it is JSSC 2.0.8). I 've also try to add this to Java/lib/serial/libraries/jssc.jar But nothing changes, I still get the error message. Is it possible to get a previous version of processing not having this problem or an explanation about what I'm doing wrong? Thank you very much

@sampottinger
Copy link
Collaborator

sampottinger commented Sep 26, 2022 via email

@jesse-harding
Copy link

@RaphAtMatrix, once you download the latest jssc, rename it to jssc.jar, open up the package contents of the Processing app and put that jssc.jar file into: Contents/Java/modes/java/libraries/serial/library

@sampottinger
Copy link
Collaborator

sampottinger commented Oct 10, 2022

I did a fast forward at sampottinger/jssc#8. I think things are working correctly after resolving some merge conflicts but I need to do some more testing. There were quite a few changes upstream and I couldn't execute their Travis build (I don't have credits).

@sampottinger
Copy link
Collaborator

@benfry I think #577 is almost ready to go. I need to get my hands on an m1 to test though.

@sampottinger sampottinger self-assigned this Oct 18, 2022
@sampottinger sampottinger removed the Help Wanted We have very little time and would like some help label Oct 18, 2022
@sampottinger
Copy link
Collaborator

sampottinger commented Oct 23, 2022

Opened PR for review after test both in IDE and in exported application. Unfortunately, I don’t have access to an M1/M2 I can use for Processing development but tested #577 on Intel Mac, Windows, and Linux.

@benfry
Copy link
Owner

benfry commented Oct 25, 2022

Fix from @sampottinger now incorporated and will be part of 4.0.2 when released. Thanks, Sam!

benfry added a commit that referenced this issue Oct 25, 2022
@osteele
Copy link

osteele commented Oct 27, 2022

I've turned the workaround in this issue into step-by-step instructions with screenshots, in order to reduce the instructor load for some colleagues who are introducing serial communications to their students, many of whom have M1 laptops, this week.

If you are comfortable performing the steps described above, there is nothing new for you on the linked page. For those of you are supporting students who find those steps cryptic, and your curriculum requires use of Serial before 4.0.2 is released, hopefully this page may reduce the number of students who need individual assistance in the meantime to a manageable load.

@gerardjosraudale
Copy link

@osteele thank you so much!
it worked!

@SeanCarrigan
Copy link

SeanCarrigan commented Nov 13, 2022

Screen Shot 2022-11-13 at 3 35 19 PM
@osteele
After following the step-by-step instructions I get the above message. Any suggestions on how to fix?

@Vamoss
Copy link

Vamoss commented Nov 21, 2022

After the @osteele steps I got this error:
The type jssc.SerialPortEventListener cannot be resolved. It is indirectly referenced from required .class files

image

@github-actions
Copy link

This issue has been automatically locked. To avoid confusion with reports that have already been resolved, closed issues are automatically locked 30 days after the last comment. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.