-
-
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 post-install fails without Xcode on M1 #69100
Comments
@tresf I hadn't thought about it, but the
The CLT has a framework by the same name:
do you think we could use that? Homebrew requires all users to have the CLT installed, so this is guaranteed to be present. |
Please run |
Postinstall step no longer fails, but I still get
And running just
|
Can you post the output of:
and possibly do the same thing with the pristine |
Sure thing.
Pristine from https://homebrew.bintray.com/bottles/openjdk-15.0.1.arm64_big_sur.bottle.1.tar.gz, freshly untarred:
|
Can you run this on the pristine file and post the output?
|
|
With the
|
hum I wonder what the “detritus” is. Can you try:
|
|
https://developer.apple.com/library/archive/qa/qa1940/_index.html -- maybe useful? |
Aha! Just found that page as well, and Though note the FinderInfo is on the .jdk bundle, nothing on the .dylib file itself.
|
|
OK I think this warrants a report to openjdk, since the FinderInfo resource extended attribute was generated in their build. There is an adoptopenjdk thread adoptium/adoptium-support#97 where @tresf commented, so he probably knows more.
Depending on that, we can implement a workaround/hack of calling |
I can't either. Are you sure this is an openjdk bug? I think I'm missing the part which isolates this to openjdk. Note, filing bugs with openjdk is a bit tricky, it's not a public bug report system like most similar projects. At a very high-level glance, it appears that there are some openjdk tools which attempt to codesign at build time and homebrew's codesigning steps are -- for some files -- redundant with those steps, requiring a forced removal, which comes with it it's own complications due to caching, etc. If it is a bug with the build system, we should probably write-up an expected vs. actual, otherwise, it's a packaging issue that Homebrew needs to keep in the build system indefinitely (like the framework requirement). The AdoptOpenJDK bug linked above was ruled as a packaging issue as well, putting the onus of code signature removal/addition onto the packager (in this case, Homebrew). If I'm misunderstanding something, please let me know. I've sponsored several openjdk bug reports so I feel a bit of onus when I'm tagged. 🍻 |
I don't understand why, though. The build process produces a signed library with invalid signature, this sounds like a bug in the build process, not a packaging issue. I'm trying to confirm this in #69279 |
Hmm... If that's true, then Adopt maintainers would have similar workarounds in their packaging code. That specific bug report was about how hard it is to repackage the already working Adopt installation to be bundled and redistributed by yet another project (e.g. Cyberduck or some Adopt user looking to repackage), so the signature removal is critical, hence companies like BellSoft offering unsigned versions as explicit downloads. |
If I'm understanding it correctly, it's not that it's a signed library with an invalid signature, but a directory of what homebrew is trying to sign has Finder xattrs set. |
Which makes the signature invalid, as I understand. |
Does that mean it's invalid? My understanding is that Apple now just doesn't want you to codesign anything that has an extended attribute containing a resource fork or Finder info. It seems like this would be true whether that thing is signed or not. If this is the case, then it's not really an invalid signature problem. |
@carlocab that's playing on words, really. The resulting binary does not pass |
@tresf Yes, I can confirm it is a build bug. After running
|
This comment has been minimized.
This comment has been minimized.
Has this been reported to AdoptOpenJDK? Until it's resolved, should we try and work around it in Homebrew for CLT-only users or make Xcode an unconditional requirement on ARM instead of build-only? |
Note, Adopt isn't openjdk proper, but rather a downstream JDK binary provider. openjdk's formulae uses a version fetched directly from upstream. At time of writing this, no bug report has been filed with openjdk.
Two separate issues... The post-install is just a packaging fix, the issues being discussed now are related to bugs surrounding the upstream build scripts and how they apply code signatures. They may warrant splitting the latter off into a separate bug report. |
Hello, I might be missing something but I still get:
even with XCode installed. Funny enough both homebrew openjdk and openjdk@11 work well and both throw mentioned error. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Commenting to keep issue open. |
Just to copy what I mentioned elsewhere: I consider this a blocker for making codesign errors fatal in |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
After #69460 , I'm no longer seeing the codesigning errors |
Bug report
brew update
and can still reproduce the problem?brew doctor
, fixed all issues and can still reproduce the problem?brew gist-logs <formula>
(where<formula>
is the name of the formula that failed) and included the output link?brew gist-logs
didn't work: ranbrew config
andbrew doctor
and included their output with your issue?What you were trying to do (and why)
Install openjdk on an M1 Mac that doesn't have Xcode installed.
What happened (include command output)
The post-install stage had an error.
Command output
What you expected to happen
Post-install to not fail or to enforce an Xcode dependency on Apple Silicon.
Step-by-step reproduction instructions (by running
brew install
commands)brew install openjdk
The text was updated successfully, but these errors were encountered: