-
-
Notifications
You must be signed in to change notification settings - Fork 256
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
Provide native builds for ARM based Macs #1922
Comments
WWDC 2020 session "Port your Mac app to Apple Silicon": https://developer.apple.com/videos/play/wwdc2020/10214/ |
Will need to see Apple's Mac OS X Port arrive upstream and get a developer kit |
One open point is the support for the new Metal rendering pipeline of Apple. OpenGL is deprecated in MacOS and I assume that it won't be supported on ARM based Macs anymore (verification is needed). Since OpenGL is already deprecated for some time the OpenJDK will take care of that by implementing a new rendering pipeline for Metal. You can find more info in JEP 382 and the Lanai project page. An early access build can be found here. How much of project Lanai must be refactored when targeting ARM is unknown. |
It is not clear how Java 8 and 11 will be handled. Even if we will get commits to the upstream to have OpenJDK working on ARM based Macs all this must be back ported if Java 8 and 11 LTS versions will be supported. I do not know how this is handled for similar projects like https://openjdk.java.net/jeps/237. Maybe @jerboaa can give an answer? Next to this Microsoft published an article about the work on OpenJDK for Win/ARM. Repo can be found here. Maybe @karianna can say how that will be handled for 8 / 11? |
Regading OpenGL, quoting https://developer.apple.com/documentation/xcode/porting_your_macos_apps_to_apple_silicon:
|
I'd like to caution to not speculate on this at this stage. It's not clear what comes of this Mac on ARM announcement in terms of OpenJDK. So speaking of a backport of something which doesn't exist is way too early ;-) Speaking for JEP 237 (Linux Aarch64 port integration into mainline). Originally the Aarch64 port project was incepted as an OpenJDK project. This is where development happened. That was well before JEP 237 happened. At some point it got proposed for inclusion into mainline. That's what JEP 237 is. It targeted JDK 9. Thus, OpenJDK 9+ has Aarch64 as supported architecture (on Linux) in mainline. The OpenJDK 8u code for Aarch64 is still maintained in an Aarch64 ports project's repository[1]. That is, Aarch64 support in OpenJDK 8u isn't in mainline OpenJDK 8u. Though, it's been proposed to get integrated into mainline OpenJDK 8u before and there is interest to get it integrated. Question is when that will happen. [1] http://hg.openjdk.java.net/aarch64-port/jdk8u-shenandoah/ |
@jerboaa THX for that feedback. I do not want to speculate. I just collect information to understand the big picture :) |
Thread in JavaFX Dev Mailing List: https://mail.openjdk.java.net/pipermail/openjfx-dev/2020-July/026949.html |
SWT issue to provide universal binaries: https://bugs.eclipse.org/bugs/show_bug.cgi?id=565690 |
"JEP 391: macOS/AArch64 Port" - http://openjdk.java.net/jeps/391 - references JEP 237 (linux/aarch64) and JEP 388 (Windows on Arm). |
JDK Bugdatabase issue: https://bugs.openjdk.java.net/browse/JDK-8253795 |
If someone would have told me 5 years ago that Microsoft provides the first Java 16 build for ARM based Macs ... :D |
openjdk8/11/13 builds are available from azul - https://www.azul.com/downloads/zulu-community/?os=macos&architecture=arm-64-bit&package=jdk |
Will there be a "universal binary" version available? |
Hello I'm not sure if it's even possible for 11+, considering the module system |
Why shouldn't it be? I would assume you can just merge the arm and x86 binary and libs into universal versions using the |
don't forget to unpack some modules which has binaries ( like libjvm), lipo and then repack the modules. |
Hi there, is there any roadmap when AdoptOpenJDK will support apple silicon architecture? Thanks |
The ARM port for Apple Silicon is in development at OpenJDK, see http://openjdk.java.net/jeps/391. As long as it isn't finished, it's unlikely that there's going to be a release from AdoptOpenJDK. We would like to provide nightly-builds soon-ish, but the build jobs haven't been set up yet (PRs are welcome). |
ARM-64 builds are already available here (Java 8, 11, 13, 16) https://www.azul.com/downloads/zulu-community/?os=macos&architecture=arm-64-bit&package=jdk |
@ppetrosh Thanks a lot, very kind. We're basically waiting for a public branch to appear in OpenJDK. Is there already one? I've only seen that the JEP has been proposed. |
JEP-391 was integrated into jdk17 now everyone can build 17ea for macarm |
Let's get going.
|
Testing executes although work will be done to make it pass all the suites. Closing this as https://ci.adoptopenjdk.net/job/build-scripts/job/jobs/job/jdk/job/jdk-mac-arm64-hotspot/ will now run on a regular basis. |
@sxa Are you sure the artifacts in there contain arm64 binaries? |
Hmm that's a bit worrying, let me double check again |
@devLotto can you confirm that this is now fixed on your end? Thanks |
Hi gdams - we think that it is not fixed. Downloading this: https://github.com/adoptium/temurin17-binaries/releases/download/jdk17-2021-09-10-10-18-beta/OpenJDK17-jre_aarch64_mac_hotspot_2021-09-10-10-18.tar.gz (which at this time, is the latest nightly openjdk jre 17 mac aarch hotspot build) provides you with an x86_64 build. |
Confirmed - that definitely appears to be a x64-capable binary:
|
Got a fix ready, looks like someone missed a line of code a while back |
Confirmed to be fixed: administrator@build-macstadium-macos11-arm64-2 bin % file java
java: Mach-O 64-bit executable arm64 |
At WWDC20 Apple announced to move from Intel to ARM chips for Mac hardware. For the Java Community it will be important to support Java on those new devices. At Adopt we should provide native Java builds for the new hardware if possible.
This issue can be used to collect information about porting Java to ARM on Mac.
The text was updated successfully, but these errors were encountered: