Skip to content

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

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

Closed
processing-bot opened this issue Aug 2, 2022 · 18 comments
Closed

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

processing-bot opened this issue Aug 2, 2022 · 18 comments

Comments

@processing-bot
Copy link
Collaborator

Created by: ekawahyu

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.

@processing-bot
Copy link
Collaborator Author

Created by: benfry

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.

@processing-bot
Copy link
Collaborator Author

Created by: ld21

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!

@processing-bot
Copy link
Collaborator Author

Created by: benfry

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.

@processing-bot
Copy link
Collaborator Author

Created by: ld21

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.

@processing-bot
Copy link
Collaborator Author

Created by: benfry

Great, thanks for letting me know.

@processing-bot
Copy link
Collaborator Author

Created by: hkiel

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?

@processing-bot
Copy link
Collaborator Author

Created by: RaphAtMatrix

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

@processing-bot
Copy link
Collaborator Author

Created by: sampottinger

Hello all! Apologies for the delay. Ben - I’ll reach about testing and fast forward of our JSSC fork.

On Sep 26, 2022, at 5:40 AM, RaphAtMatrix @.***> wrote:


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


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.

@processing-bot
Copy link
Collaborator Author

Created by: jesse-harding

@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

@processing-bot
Copy link
Collaborator Author

Created by: sampottinger

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).

@processing-bot
Copy link
Collaborator Author

Created by: sampottinger

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

@processing-bot
Copy link
Collaborator Author

Created by: sampottinger

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.

@processing-bot
Copy link
Collaborator Author

Created by: benfry

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

@processing-bot
Copy link
Collaborator Author

In GitLab by @osteele on Oct 27, 2022, 15:52

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.

@processing-bot
Copy link
Collaborator Author

Created by: gerardjosraudale

@osteele thank you so much!
it worked!

@processing-bot
Copy link
Collaborator Author

Created by: SeanCarrigan

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?

@processing-bot
Copy link
Collaborator Author

Created by: Vamoss

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

image

@processing-bot
Copy link
Collaborator Author

Created by: github-actions[bot]

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 Sep 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant