make -j 8 g ++:内部编译器错误:Killed(程序cc1plus) [英] make -j 8 g++: internal compiler error: Killed (program cc1plus)

查看:1622
本文介绍了make -j 8 g ++:内部编译器错误:Killed(程序cc1plus)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在Ubuntu12.04上部署Apache Mesos时,我遵循官方文档,在步骤make -j 8中,我在控制台中发现了这个错误:

  g ++:内部编译器错误:Killed(程序cc1plus)
请提交完整的错误报告,
包含预处理源(如果适用)。
请参阅< file:///usr/share/doc/gcc-4.9/README.Bugs>为说明。
make [2]:*** [slave / containerizer / mesos / libmesos_no_3rdparty_la-containerizer.lo] Error 1
make [2]:***等待未完成的作业....
mv -f log / .deps / liblog_la-log.Tpo log / .deps / liblog_la-log.Plo
mv -f slave / containerizer / .deps / libmesos_no_3rdparty_la-docker.Tpo slave / containerizer / .deps / libmesos_no_3rdparty_la-docker.Plo
mv -f log / .deps / liblog_la-consensus.Tpo log / .deps / liblog_la-consensus.Plo

mv -f slave / containerizer / .deps / libmesos_no_3rdparty_la-external_containerizer.Tpo slave / containerizer / .deps / libmesos_no_3rdparty_la-external_containerizer.Plo
mv -f log / .deps / liblog_la-coordinator.Tpo log / .deps / liblog_la-coordinator.Plo
mv - f slave / .deps / libmesos_no_3rdparty_la-slave.Tpo slave / .deps / libmesos_no_3rdparty_la-slave.Plo
mv -f master / .deps / libmesos_no_3rdparty_la-master.Tpo master / .deps / libmesos_no_3rdparty_la-master.Plo
make [2]:离开目录`/ root / Mesos / mesos / build / src'
make [1]:*** [all]错误2
make [1]:Le aving directory`/ root / Mesos / mesos / build / src'
make:*** [all-recursive]错误1

我应该怎么做? 解决方案

尝试运行(仅在失败后)dmesg。

你看到这样的一条线吗?

 内存不足:杀死进程23747(cc1plus)得分15或牺牲子进程
杀死进程23747,UID 2243, (cc1plus)total-vm:214456kB,anon-rss:178936kB,file-rss:5908kB

大多数可能是你的问题。运行make -j 8会运行大量使用更多内存的进程。上述问题发生在系统内存不足时。在这种情况下,操作系统不是整个系统崩溃,而是运行一个过程来评估系统上的每个进程。得分最高者被操作系统杀死以释放内存。如果被杀死的进程是cc1plus,gcc(可能不正确)将此解释为进程崩溃,并因此认为它必定是编译器错误。但事实并非如此,问题在于操作系统杀死了cc1plus,而不是崩溃。

如果是这样,您的内存不足。所以运行也许make -j 4。这意味着更少的并行作业,这意味着编译将花费更长时间,但希望不会耗尽系统内存。

When I deploy Apache Mesos on Ubuntu12.04, I follow the official document, in step "make -j 8" I'm getting this error in the console:

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
make[2]: *** [slave/containerizer/mesos/libmesos_no_3rdparty_la-containerizer.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
mv -f log/.deps/liblog_la-log.Tpo log/.deps/liblog_la-log.Plo
mv -f slave/containerizer/.deps/libmesos_no_3rdparty_la-docker.Tpo slave/containerizer/.deps/libmesos_no_3rdparty_la-docker.Plo
mv -f log/.deps/liblog_la-consensus.Tpo log/.deps/liblog_la-consensus.Plo

mv -f slave/containerizer/.deps/libmesos_no_3rdparty_la-external_containerizer.Tpo slave/containerizer/.deps/libmesos_no_3rdparty_la-external_containerizer.Plo
mv -f log/.deps/liblog_la-coordinator.Tpo log/.deps/liblog_la-coordinator.Plo
mv -f slave/.deps/libmesos_no_3rdparty_la-slave.Tpo slave/.deps/libmesos_no_3rdparty_la-slave.Plo
mv -f master/.deps/libmesos_no_3rdparty_la-master.Tpo master/.deps/libmesos_no_3rdparty_la-master.Plo
make[2]: Leaving directory `/root/Mesos/mesos/build/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/Mesos/mesos/build/src'
make: *** [all-recursive] Error 1

what should I do?

解决方案

Try running (just after the failure) dmesg.

Do you see a line like this?

Out of memory: Kill process 23747 (cc1plus) score 15 or sacrifice child
Killed process 23747, UID 2243, (cc1plus) total-vm:214456kB, anon-rss:178936kB, file-rss:5908kB

Most likely that is your problem. Running make -j 8 runs lots of process which use more memory. The problem above occurs when your system runs out of memory. In this case rather than the whole system falling over, the operating systems runs a process to score each process on the system. The one that scores the highest gets killed by the operating system to free up memory. If the process that is killed is cc1plus, gcc (perhaps incorrectly) interprets this as the process crashing and hence assumes that it must be a compiler bug. But it isn't really, the problem is the OS killed cc1plus, rather than it crashed.

If this is the case, you are running out of memory. So run perhaps make -j 4 instead. This will mean fewer parallel jobs and will mean the compilation will take longer but hopefully will not exhaust your system memory.

这篇关于make -j 8 g ++:内部编译器错误:Killed(程序cc1plus)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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