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

Issues Compiling Example Sketches on M1 Mac in Processing 4 #44

Open
pyronox opened this issue Apr 29, 2022 · 8 comments
Open

Issues Compiling Example Sketches on M1 Mac in Processing 4 #44

pyronox opened this issue Apr 29, 2022 · 8 comments

Comments

@pyronox
Copy link

pyronox commented Apr 29, 2022

I am attempting to use Syphon with the Processing IDE.

I have installed Processing 4 on a fresh Apple M1 running macOS Monterey.
I have installed the Syphon Library using the in built in Library Manager of the Processing IDE.

The Example sketches included in the library fails to compile (I have tried both getImage and ReceiveFrames)

Syphon 4.0 by Andres Colubri, Tom Butterworth, Anton Marini http://syphon.v002.info/ UnsatisfiedLinkError: no JSyphon in java.library.path: :/Applications/Processing.app/Contents/Java/core/library/macos-aarch64:/Users/ivy/Documents/Processing/libraries/Syphon/library:/Applications/Processing.app/Contents/MacOS java.lang.UnsatisfiedLinkError: no JSyphon in java.library.path: :/Applications/Processing.app/Contents/Java/core/library/macos-aarch64:/Users/ivy/Documents/Processing/libraries/Syphon/library:/Applications/Processing.app/Contents/MacOS at processing.opengl.PSurfaceJOGL.lambda$initAnimator$2(PSurfaceJOGL.java:409) at java.base/java.lang.Thread.run(Thread.java:833) A library used by this sketch relies on native code that is not available. UnsatisfiedLinkError: no JSyphon in java.library.path: :/Applications/Processing.app/Contents/Java/core/library/macos-aarch64:/Users/ivy/Documents/Processing/libraries/Syphon/library:/Applications/Processing.app/Contents/MacOS UnsatisfiedLinkError: no JSyphon in java.library.path: :/Applications/Processing.app/Contents/Java/core/library/macos-aarch64:/Users/ivy/Documents/Processing/libraries/Syphon/library:/Applications/Processing.app/Contents/MacOS

I have then installed Azul's Zulu JDK (18.0.1) macOS (ARM 64-bit v8), after initially thinking that perhaps java was not installed.
This has not made any difference and I am still receiving the same error.

Can you think of any reason this might be occurring? Would you expect it to work?

Many thanks,

Lee

@pyronox
Copy link
Author

pyronox commented Apr 29, 2022

To add a little more information:

My initial tests with with Processing 4.0 (Apple Silicon).

I have just downloaded version 3.5.3 of processing.
When attempting to load the same example sketches, everything works fine. (After adding frameRate(30) in the setup).

I then downloaded version 4 of processing (Intel 64 bit).
When attempting to load the same example sketches, everything works fine.

So it appears, that the error compiling only happens when using the Apple Silicon version of processing.

@1l0
Copy link

1l0 commented Jun 24, 2022

Same to me on Apple Silicon.

@codeanticode
Copy link
Member

@pyronox @1l0 thanks for filing this issue. I can confirm that the Syphon library does not work on macs with the new Apple Silicon chips, because it only includes the Syphon native libraries for the x86 64 bit architecture. I will look into building the corresponding libraries for the arm64 architecture when I get a chance. For the time being, you can install the MacOS (Intel 64-bit) version of Processing on you M1 Mac, and the library should work.

@pifragile
Copy link

@codeanticode i tried using Processing 4 intel 64-bit version with Syphon 4.0 from the library manager on Mac Studio (2022), Apple M1 Ultra, OSX 12.5.1 and this example fails with:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x00007ff804c1b7ba, pid=2369, tid=7683
#
# JRE version: OpenJDK Runtime Environment Temurin-17.0.4+8 (17.0.4+8) (build 17.0.4+8)
# Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.4+8 (17.0.4+8, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-amd64)
# Problematic frame:
# C  [CoreFoundation+0x1b77ba]  CFEqual.cold.1+0xe
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /var/folders/nk/nl_7k7n51fn8mwm9ggqxl54h0000gn/T//hs_err_pid2369.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/adoptium/adoptium-support/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Could not run the sketch (Target VM failed to initialize).
For more information, read Help → Troubleshooting.

any advice?

@chillywillywonka
Copy link

Hi @codeanticode,

it would be great if you could update the library to silicon.
Any chance that'll happen soon?
Or can we do it ourselves?

Thanks

@codeanticode
Copy link
Member

I will look at it tomorrow :-)

@codeanticode
Copy link
Member

The Java module needs some work:

Syphon/Java#7

@samyk
Copy link

samyk commented Jun 30, 2023

Note I was able to run x86_64 Processing 4.2 on an M1 with x86_64 Syphon so might be worth trying latest Processing

CleanShot 2023-06-30 at 12 38 47@2x

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

No branches or pull requests

6 participants