collect2:致命错误:ld以信号9终止[已杀死] [英] collect2: fatal error: ld terminated with signal 9 [Killed]

查看:2337
本文介绍了collect2:致命错误:ld以信号9终止[已杀死]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Ubuntu 16.04.3 x64上构建 precimonious .我为此分配了1GB内存.我的文件结构看起来像

I'm trying to build precimonious on Ubuntu 16.04.3 x64. I allocated 1GB memory for it. My file structure looks like

~
|--- llvm/
|--- precimonious/

llvm在版本3.0上,如 https://github.com/corvette所述-berkeley/precimonious#requirement .然后,我按照自述文件中的步骤进行操作,但是命令make

where the llvm is on version 3.0 as mentioned at https://github.com/corvette-berkeley/precimonious#requirement. Then I followed the steps on the README but command make ended with

...
llvm[1]: Linking Debug Shared Library libLLVM-3.0.so
collect2: fatal error: ld terminated with signal 9 [Killed]
compilation terminated.
...

我在线查看了一些答案,他们说这可能是因为没有足够的内存来执行链接.但是内存使用情况就像

I went through some answers online and they say it might because there's not enough memory to perform the link. But the memory usage is like

我机器上的gcc版本是gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4),并且是通过apt-get install build-essential安装的.这是我刚在DigitalOcean btw上创建的一个新鲜的小滴.感谢您的帮助.

The gcc version on my machine is gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) and was installed via apt-get install build-essential. This is a fresh droplet I just created on DigitalOcean btw. Any help is appreciated.

推荐答案

有时,由于CPU过载,系统会杀死链接器.如果您的构建是并行的,请尝试-l选项(make和ninja支持它). 外观与您的情况类似.

Sometimes system kills linker due to CPU overload. If your build is parallel, try -l option (make and ninja support it). Looks similar to your case.

要减少系统负载,请构建llvm的发行版本.链接调试版本要昂贵得多.

To decrease system load, build release version of llvm. Linking of debug version is much more expensive.

llvm [1]:链接调试共享库libLLVM-3.0.so

llvm[1]: Linking Debug Shared Library libLLVM-3.0.so

这篇关于collect2:致命错误:ld以信号9终止[已杀死]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆