-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
openjdk: Add support for Apple silicon #65670
Conversation
Thanks. In this case, the
😅 |
No intel builds, sorry, it has to be built manually, but many vm options can be disabled to speed that build up, for example: but i'm talking onbly about build-jdk, the boot-jdk in your schema is absolutely right. |
So, the main problem I have with this is confusion and compatibility. What version should How many packages in homebrew actually work with JDK 16? |
It should report
Running unit tests will start to help us understand this number. I can start running these, but I'll need help satisfying the - Error: maven is missing test dependencies: openjdk (Speculative) So packages that may potentially work with openjdk16: 6 major blocking projects, 184 others.*
How I obtained this number:
Anecdotally, I use Since brew install --ignore-dependencies maven
export JAVA_HOME=$(brew --prefix openjdk)
git clone https://github.com/apache/pdfbox
cd pdfbox
mvn clean install The result is PDFBOX compiles and passes all unit tests. Even testing it interactively works to a physical printer. java -jar ~pdfbox/app/target/pdfbox-app-3.0.0-SNAPSHOT.jar PrintPDF sample.pdf This is just one project, but I hope it speaks a bit to the viability of an early access JDK as a stop-gap solution. |
The formula version would only be 16 for them though. For everyone else it would be 15. I think 16 should really be a separate formula here because it'll get really hard for users to determine what they're actually using when they install this. |
I'm in no position to argue that, but when someone types: brew intall maven ... it would be beneficial to offer a path to dependency resolution. If you can help me understand how to make that possible using Homebrew, please do, because backports may not come for a while and the stop-gap will significantly speed up viability of dependent projects work with this new hardware without resorting to brute-force techniques. If not, the formula which depend on Quoting @VladimirKempik Homebrew/brew#7857 (comment)
|
If instead it must live as a Any advice forward is appreciated. |
Spitballing here, but does brew support a conditional dependency stub? e.g. If yes, then perhaps we can keep the If no, is there another stop-gap measure used in the past when a bleeding-edge formula was needed? |
I think linuxbrew does a lot of |
Happy to. Do you have advice on a name? e.g.
I've been studying formulas and I can't find any that specifically stub off into a secondary versioned formula. Do you remember any formula specifically so that I can study how it should be done or pointers on how to grep for one? I also am unsure how to prevent the unnecessary jdk14 download as a conditional. Would it be normal to just let it download and not use it? Any pointers are appreciated. |
I'd say just As for the conditional include, I don't have experience with this but I'd expect this to work
|
Maybe it's better to not mention openjdk16 here |
we can rename it once the source changes to be build on the OpenJDK 17 source. But we're going to need some way to distinguish it from the other openjdk formulae and I think the version is the clearest way to do this. |
I still require direction before making this formula. Is the project OK with a recipe downloading a tarball (e.g. openjdk@14) that it has no intention on using? Are there any examples of this out in use to base the PR off of?
I sort of agree, it's not I'll start preparing the PR with a the redundantly downloaded tarball intact, but direction is appreciated. |
As a maintainer and user I'd say having a separate formula for an unreleased version and making other formula conditionally depend on it is the version with the least magic and the nicest. @Homebrew/tsc any opinions? |
I am of the opinion that, being the only It's not ideal, but none of the solutions are. And it is probably what causes the smaller amount of disruption to all the other formulas. And even more importantly, for the migration when the next release ships. |
Not trying to jump the gun while the This also means that Intel and Linux builds will be forced to use this JEP-391 snapshot until upstream lands it on an official branch. Interested to hear others' thoughts. I have a proof of concept for |
On linuxbrew our gcc formula installs gcc5 instead of gcc10. So
I also do not like that idea ... it's basically what we have been doing on linuxbrew; and have tried to reduce that kind of thing to the bare minimum. So we have the choice between two "ugly" solutions. Why not just disable We are adding a new platform here: if it was PPC or linux ARM, the stock answer would be: create a fork of homebrew-core and play around until you have something stable. Especially as we do not have CI for ARM (and it may take some time to have it). For something as important as |
Yes, given that it is the only working version, I agree that this should be the |
It is not a random patch, it is an upstream branch, which is a contribution by Apple: if we trust them enough to run the OS, we probably can extend that to their other contributions as well :) |
Agreed. I'm not terribly happy about the situation but Homebrew should aim to be useful here; people running Homebrew on ARM are already spammed with warnings and this will open quite a bit of the dependency tree for us that's currently blocked. |
Slight clarification, from the press releases, I believe it's Azul and Microsoft that have been predominantly spearheading this effort. I'll begin working this PR to be JEP391-based |
Adds openjdk16 with JEP391 patches Moves openjdk -> openjdk@15
@VladimirKempik the 16-ea links broke, (patched via 3eb4055) I assume this is intentional, but will make the formula fail when they change again. Are there more reliable links I can use for the boot-jdk? |
We now have 70% of formulas bottled for Apple Silicon, and openjdk is the only major blocker remaining at this stage. I'd like us to determine collectively what is needed to finalise this. We have 3 major formulas for where Apple Silicon support is only available in a beta-type release, or in this case, a snapshot of a branch under development: rust, go, and openjdk.
For rust and go, we went with option 2. You can see here 467c932 and here 95c403c how it looks like. This allows us not to expose users to a beta version when there actually is a stable version available for their platform. So, if technically feasible, it is probably a better option for users. I am not sure, however, whether that could work for
@tresf what is your opinion on this? Would “option 2” be feasible for openjdk, or not, in your opinion? |
If that's the desired, path, I'd be happy to start that process. Before merge, I'll need a reliable 16-ea URL or can just hard-link any 16 build if @VladimirKempik thinks it'll be OK. In regards to formula impact, I did some quick investigations in November and found the following:
So assuming Homebrew is OK with the 80/20 rule (focusing on the majority), it's my high-level educated guess that most formula which relies on
If the steering committee's recommendation is to create a "[potentially unreadable and unmaintainable] single formula (with 15 on Intel and 16 on ARM" I can start this. |
jep391 branch will soon be merged with upstream and become 17-ea |
@tresf thanks for your response, I'm asking for feedback from other maintainers @Homebrew/tsc The goal would be to get this into mergeable state over the next few days. Having a formula that remains at the same version on Intel (option 2) has the added benefit that we won't be regressing things for formulas that wouldn't support 16-ea, so unless there is a argument I haven't thought of against it, I expect us to go in that direction. |
Yes, I would rather than direction too 👍🏻 |
@tresf I can confirm other members of the steering committee are in agreement with that, and we would like to go that way for openjdk (as we did for rust and go). Thanks again for your time and help with this! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Please, merge it faster as possible
As it looks like, Apple M1 will receive Java 16 in brew Homebrew/homebrew-core#65670 (comment)
As it looks like, Apple M1 will receive Java 16 in brew Homebrew/homebrew-core#65670 (comment)
As it looks like, Apple M1 will receive Java 16 in brew Homebrew/homebrew-core#65670 (comment)
As it looks like, Apple M1 will receive Java 16 in brew Homebrew/homebrew-core#65670 (comment)
Sorry for the delay, this is behind a few other tasks currently. |
I welcome your guidance and help on #68946 when you have time, of course! |
Backport of JetBrains/JetBrainsRuntime@9c3cd50 and JetBrains/JetBrainsRuntime@9a4bd01 as suggested here: Homebrew/homebrew-core#65670 (comment)
@tresf I have just tried to install it using the latest master branch, it works but with some minor issues: a) When I run java it says openjdk 16, even though it downloaded 15. That seems a bit strange
b) Installation gives an error: Error: Failed applying an ad-hoc signature to /opt/homebrew/Cellar/openjdk/15.0.1/libexec/openjdk.jdk/Contents/MacOS/libjli.dylib Full log:
Let me know if you would like me to test a different branch. Thank you |
There's an open issue for the codesigning issue at #69100.
This is explained in the caveats that you pasted above:
openjdk 15 is not compatible with Apple Silicon. |
As it looks like, Apple M1 will receive Java 16 in brew Homebrew/homebrew-core#65670 (comment)
As it looks like, Apple M1 will receive Java 16 in brew Homebrew/homebrew-core#65670 (comment)
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install <formula>
)?Adds openjdk-16ea as a viable
openjdk
dependency, thanks to the help from @VladimirKempik here.PR is in draft because I have a feeling the Ruby syntax needs improvement.
do macos
for URL magic.Click to expand formula mirror