【发布时间】:2018-12-24 15:23:01
【问题描述】:
我正在关注 this 教程,以便在 Ubuntu 18.10 上集成 Visual Studio Code 和 SourceKit-LSP,但是,我在构建 sourcekit-lsp 项目时遇到了困难。
我得到的错误:
fatal error
:
error in backend: invalid llvm.linker.options
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 7.0.0-3 (tags/RELEASE_700/final)
Target: x86_64-unknown-linux
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
我不确定它是否相关,但在控制台中输入 Swift 后,我收到以下错误:
error: ld-2.28.so 0xffffffff0005f117: adding range [0x14167-0x141ca) which has a base that is less than the function's low PC 0x148c0. Please file a bug and attach the file at the start of this error message
error: ld-2.28.so 0xffffffff0005f117: adding range [0x141e0-0x141e6) which has a base that is less than the function's low PC 0x148c0. Please file a bug and attach the file at the start of this error message
error: ld-2.28.so 0xffffffff0005f184: adding range [0x14167-0x141ca) which has a base that is less than the function's low PC 0x148c0. Please file a bug and attach the file at the start of this error message
error: ld-2.28.so 0xffffffff0005f184: adding range [0x141e0-0x141e6) which has a base that is less than the function's low PC 0x148c0. Please file a bug and attach the file at the start of this error message
Welcome to Swift version 5.0-dev (LLVM b10ce3d642, Clang c1979d7668, Swift 94b167db75).
Type :help for assistance.
如果有人能给我提示如何解决问题,我将不胜感激。我唯一想到的就是重新安装clang,但它并没有解决问题。
【问题讨论】:
-
error in backend: invalid llvm.linker.options说问题出在您的链接器选项上。显而易见,您应该告诉我们您使用了哪些链接器选项。 -
我不知道如何更改链接器选项,所以我假设使用了默认选项。如果其他人遇到这个问题 - 我只是在实时模式下从 pendrive 运行 Ubuntu 18.04,构建 sourceKit-LSP 并在 Ubuntu 18.10 上使用编译的二进制文件,它可以工作。
标签: swift linux ubuntu clang sourcekit