arm64 上的 install_name_tool 错误

发布于 2025-01-19 03:50:31 字数 278 浏览 2 评论 0原文

我有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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

轻许诺言 2025-01-26 03:50:31

弄清楚了!

由于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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文