ubuntu - 收集2 : fatal error: ld terminated with signal 9 [Killed]

标签 ubuntu gcc ld

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

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

https://github.com/corvette-berkeley/precimonious#requirement 所述,llvm 的版本为 3.0。 .然后我按照自述文件中的步骤操作,但命令 make
...
llvm[1]: Linking Debug Shared Library libLLVM-3.0.so
collect2: fatal error: ld terminated with signal 9 [Killed]
compilation terminated.
...

我在网上浏览了一些答案,他们说这可能是因为没有足够的内存来执行链接。但是内存使用情况就像
enter image description here

我机器上的gcc版本是gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)并通过 apt-get install build-essential 安装.这是我刚刚在 DigitalOcean 上创建的新液滴。任何帮助表示赞赏。

最佳答案

这是内存耗尽。内存测量的采样间隔不够小,不足以覆盖 OOM 杀手启动的确切点。

根据容器/VM 技术,您可以设置 vm.overcommit_memory=2在构建之前,这样进程就不会被杀死(但这样做实际上需要更多的内存和交换空间来完成构建)。

关于ubuntu - 收集2 : fatal error: ld terminated with signal 9 [Killed],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46259776/

相关文章:

php - 错误 2002 (HY000) : Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) Ubuntu

c - 尽管已安装并正常运行,但如何修复 make 文件中的 gcc 未找到错误?

c++ - 使用 "itself"初始化 vector 适用于 MSVC2013,不适用于 GCC 4.8.1

c - 如何使用 GNU ld 将两个或多个可重定位 ELF 文件合并为一个可重定位 ELF 文件?

c - 如何防止特定动态库被加载

python - 运行 pgadmin 抛出意外错误

ubuntu - apache2服务器上的多个站点

opencv - "Error: ' 尝试使用 OpenCV 和 CUDA 构建暗网时,IplImage' 没有命名类型?

c++ - GCC#error 不会破坏进一步的编译

ios - 什么是clang中gcc的 __attribute__((constructor)) 的等价物?