-
Notifications
You must be signed in to change notification settings - Fork 7
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
Apple M1 compatibility/Updated build instructions #7
Comments
Hi. I'll be honest I haven't kept up with Java intricacies or changes in the mean time. Feel free to provide a PR with documentation updates, it would be appreciated! If you get it building, we can use the instructions to provide release for M1 |
Got it, I can take a shot at a new build. To build against the newest version of https://github.com/Syphon/Syphon-Framework and https://github.com/Syphon/Shared, would any changes to the Java source in this repo be necessary? |
@AvneeshSarwate just looked at this briefly and seems like the gen_headers.sh could be fixed by using '''javac -h''' (whih is the replacement of javah) to read the source java files:
I still need to review the rest of the build process. |
Another issue is that some header files are no longer available on recent MacOS versions: @vade just flagging this issue, will try to look at it again at a later time. |
I think Java hasn't been included in macOS for some time, and the SDK has to be installed via something like https://adoptium.net (found via https://wolfpaulus.com/installing-java-on-macos/) This likely changes some includes and complicates things? |
Yes, I was testing things with Adoptium JDK 17 on macOS 13. It comes with a headers folder, including jni.h but not JavaVM.h so need to investigate further. |
I've started a branch here working on supporting Apple silicon. I tried to make everything cross-architecture but failed in the Xcode project itself, I think we need to different builds in Xcode, one for ARM and one for non-ARM. The ARM one needs to link to Here's what's updated:
Still need to fix Feel free to work on this PR if anyone wants to take a stab at the string portion! |
Also note to get away from
|
Builds are succeeding! Though I haven't looked at how it plugs into the other repos and no idea if it actually works :) Also added an Can someone see if this is actually working or if we need more changes? I've submitted PR #8 |
Okay, still needs some work, here it is using ARM Processing 4.2 + ARM Syphon bins w/SendFrames.pde + ReceiveFrames.pde. Note I adjusted the following since the PR (not sure if any were necessary)
SendFrames.pde (appears to work and displays when ReceiveFrames attempts to connect)
ReceiveFrames.pde
|
@samyk thanks so much for taking a stab at this! Judging from your last couple of updates, seems like you figured out how to get this Java library into the Processing library, essentially you have to pull Syphon Java as a submodule into the Processing library source, as explained in the readme: https://github.com/Syphon/Processing#getting-started I'm not able to look at it in detail at this moment, but it sounds like when you try running the updated library in Processing, the client sketch crashes with the errors you posted above, before showing any frames from the server, correct? |
Correct, I manually finagled the files/dirs in the Processing repo in order to get the right versions (since git would pull down the original), and I think I ultimately updated the Processing .zip with the binaries (and
I suspect the issue is with the |
Hey! Just chiming in to say I really appreciate all the diligent work here. I haven't touched Java or the P5 stuff in a hot minute, and it's great to have folks hacking on it. Sincerely appreciate it. Thank you @samyk @codeanticode ! |
Hi, I posted in Syphon/Processing#45 and was directed to this thread. Is there a very short summary of how I can install the Apple M1 update? And I'd love to understand exactly which files need updating: is it the contents of the Processing library (in ~/Documents/Processing/Libraries) or is this stuff that is installed deeper down? |
@orsjb if you just want things to work, you can use the x86 version of Processing on your M1 (runs via Rosetta), and use the standard Syphon library. The goal here is to get a Syphon+Processing to be native on M1 without Rosetta |
Is there any update on an Apple Silicon compatible version of the Syphon lib for Java? How can we help to have this? Where to start? |
Latest updates are in this branch and documented in this thread above, no changes since then so please feel free to improve from there! |
I am trying to build the library for M1 macs (pulling the latest Syphon-Framework branch), but the build instructions seem to be outdated (https://stackoverflow.com/questions/50352098/javah-missing-after-jdk-install) - it seems
javah
is no longer distributed with the JDK (in favor ofjavac -h
). Would it be possible to update the build instructions and/or provide updatednative_libs
artifacts?The text was updated successfully, but these errors were encountered: