【问题标题】:llvm error: linking error to libLTO.sollvm 错误:将错误链接到 libLTO.so
【发布时间】:2013-11-22 05:43:19
【问题描述】:

在编译llvm 时出现以下错误:

llvm[2]: ======= Finished Linking Debug+Asserts Executable llvm-config
llvm[2]: Installing Debug+Asserts /usr/local/bin/llvm-config
make[2]: Leaving directory `/usr/bin/tools/llvm-config'
make[2]: Entering directory `/usr/bin/tools/lto'
llvm[2]: Compiling LTODisassembler.cpp for Debug+Asserts build (PIC)
llvm[2]: Compiling lto.cpp for Debug+Asserts build (PIC)
llvm[2]: Linking Debug+Asserts Shared Library libLTO.so
collect2: ld terminated with signal 9 [Killed]
make[2]: *** [/usr/bin/Debug+Asserts/lib/libLTO.so] Error 1
make[2]: Leaving directory `/usr/bin/tools/lto'
make[1]: *** [install] Error 1
make[1]: Leaving directory `/usr/bin/tools'
make: *** [install] Error 1

我通过提供gccg++ 编译器的路径来配置llvm。 我在配置过程中没有收到任何错误;但在构建过程中,clang 也会出现同样的错误。我正在使用Ubntu-12.10 32 位。

【问题讨论】:

标签: llvm


【解决方案1】:

好的,所以为了解决这个问题,我参考了 llvm.org 并在配置过程中添加了一些选项,如下所示: sudo ./configure CC="/usr/bin/gcc" CXX="/usr/bin/g++" --enable-optimization --enable-jit --enable-debug-runtime --enable-targets=all

我以SuperUser 运行构建。

【讨论】:

    【解决方案2】:

    我在使用 Ubuntu 13.04 (arch: x86_64) 时遇到了同样的错误。以下错误

    collect2: ld 以信号 9 [Killed] 终止

    是内存使用问题。我确实在使用具有 1GB RAM 的 Koding.com 云虚拟机。

    我以普通用户的身份在笔记本电脑上尝试编译,编译完成,没有任何问题。我用过:

    $ ./配置

    $ make -j4

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-02-26
    • 2012-10-06
    • 1970-01-01
    • 1970-01-01
    • 2020-09-19
    相关资源
    最近更新 更多