arm64 上的 install_name_tool 错误
我有C ++应用具有多种依赖性,以动态库的形式。 install_name_tool可以很好地更改与主要可执行文件相关的这些库的路径,但是问题在于,某些库本身具有依赖关系。
对于X64,在这些依赖项上再次运行install_name_tool可以正常运行,但是对于ARM64,它错误的“警告:对文件进行更改将使代码签名无效”。
运行“ codesign -v/path/to/dylib'返回'无效签名(已修改了代码或签名)”。
试图使用segfault运行可执行文件。
我该如何解决?
I have c++ app that has multiple dependencies that takes the form of dynamic libraries.
install_name_tool works fine to change the paths of those libraries in relation to the main executable, but the problem is that some of those libraries have dependencies themselves.
For x64, running install_name_tool again on those dependencies works fine, but for arm64, it errors with ‘warning: changes being made to the file will invalidate the code signature’.
Running ‘codesign -v /path/to/dylib’ returns ‘invalid signature (code or signature have been modified)’.
Trying to run the executable crashes with a segfault.
How can I fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
弄清楚了!
由于Big Sur,ARM64的代码比X64要严格得多。
因此,我需要在每个迪利布上运行
codeSign -force -s-/path/to/dylib
Figured it out!
Since Big Sur, codesigning for arm64 is much more strict than it is for x64.
So, I needed to run
codesign --force -s - /path/to/dylib
on every dylib