-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Fragile signatures that break with install_name_tool #19144
Comments
The problem is that macOS on ARM requires everything to be "signed". It is perfectly happy with what Apple calls "adhoc" signatures, though. Homebrew properly provides those since #9102. But the details make them fragile and break easily. To make your application independent of Homebrew, you usually include the required libraries in the app bundle. This requires modifying the libraries so that they find their dependencies in the bundle, and not in the standard homebrew path. Apple includes the tool The problem is that changing the path of those dependencies changes the contents of the files, and hence breaks the signatures, which in turn makes the system refuse to load them. In most other cases, this works fine for two reasons:
This does not work with homebrew libraries because homebrew adds it own signatures, rather than getting them from the linker.
|
I think the ideal fix is that homebrew also has those implicit signatures. I don't know why you aren't getting them already from the linker, so I don't know how difficult it would be to fix things to get them the "normal" way. There is an easy alternative, though. You can add the flag |
I'll let others chime in but: note that Homebrew does not provide libraries for distribution but for our own use. A used to be a professional Qt developer and Homebrew maintainer at the same time and when I was: I used the official Qt libraries for distribution for this reason (among others). |
Most open source projects don't have official binaries to use. So even if we would go that more complicated path, it wouldn't really be feasible. It would most likely mean we need to build everything ourselves if we want to provide a complete app bundle to our users. :/ |
You referenced
Yes, you probably should be doing this. Even if the |
brew doctor
outputVerification
brew doctor
output" above saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
twice and am still able to reproduce my issue.brew install wget
. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.brew config
outputWhat were you trying to do (and why)?
Construct a shippable bundle using
macdeployqt
, which in turn usesinstall_name_tool
. Without this tool, my application would not run on users systems, as the required libraries from homebrew would not be included.What happened (include all command output)?
My application crashes on load with SIGKILL.
What did you expect to happen?
My application starts normally.
Step-by-step reproduction instructions (by running
brew
commands)The text was updated successfully, but these errors were encountered: