安装`brew install llvm`导致macOS上出现“Segmentation fault:11”

问题描述 投票:3回答:1

对于某些程序LDSTORE我需要在我的Mac上安装llvm(macOS 10.13)。我这样做是使用brew install llvm。这在运行Segmentation fault: 11或其他(基于C ++的?)程序时会导致ldstore消息。我怎样才能解决这个问题?

这显然与llvm有关,因为做brew uninstall llvm解决了这个问题(明显的ldstore在这种情况下不起作用)。值得一提的是:我使用原生的python 2.7.10。

根据Stanislav Pankevich的建议,我运行了lldb ldstore_v11,然后是r,结果如下:

lldb ldstore_v11
(lldb) target create "ldstore_v11"
Current executable set to 'ldstore_v11' (x86_64).
(lldb) r
Process 15841 launched: '/Users/swvanderlaan/bin/ldstore_v11' (x86_64)
dyld: Library not loaded: /usr/local/opt/libiomp/lib/libiomp5.dylib
  Referenced from: /Users/swvanderlaan/bin/ldstore_v11
  Reason: image not found
Process 15841 stopped
* thread #1, stop reason = signal SIGABRT
    frame #0: 0x0000000100095216 dyld`__abort_with_payload + 10
dyld`__abort_with_payload:
->  0x100095216 <+10>: jae    0x100095220               ; <+20>
    0x100095218 <+12>: movq   %rax, %rdi
    0x10009521b <+15>: jmp    0x100094a74               ; cerror_nocancel
    0x100095220 <+20>: retq
Target 0: (ldstore_v11) stopped.

奇怪的是找不到库,因为我明确地在我的bash_profile中添加了以下行:export PATH="/usr/local/opt/llvm/bin:$PATH",根据安装消息的建议。

希望有人可以帮我调试这个。

谢谢,

桑德P.S.我希望很清楚,我不是在尝试开发任何东西,我只是想尝试使用LDSTORE。

llvm homebrew
1个回答
1
投票

问题是这个工具是动态链接libiomp5.dylib,它必须出现在/usr/local/opt/libiomp/lib/libiomp5.dylib才能工作。

正如Stanislav所建议的,从http://releases.llvm.org/5.0.0/clang+llvm-5.0.0-x86_64-apple-darwin.tar.xz下载预编译的二进制文件。这包含您需要的库:./lib/libiomp5.dylib。您必须将库复制到/usr/local/opt/libiomp/lib,这可能还不存在。

一旦你完成了,你将能够运行ldstore

© www.soinside.com 2019 - 2024. All rights reserved.