【发布时间】:2013-11-04 03:31:08
【问题描述】:
rvm install 1.9.3
导致make.log中的错误:
...
compiling ./enc/trans/emoji_sjis_docomo.c
compiling ./enc/trans/emoji_sjis_kddi.c
gcc: internal compiler error: Killed (program cc1)
gcc: internal compiler error: Killed (program cc1)
gcc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
...
dmesg 显示
[180031.341709] send sigkill to 3705 (cc1), adj 0, size 3394
free 显示在某些时候运行配置过程:
total used free shared buffers cached
Mem: 241668 238676 2992 0 92 2020
-/+ buffers/cache: 236564 5104
Swap: 262140 262140 0
所以我假设 256MB RAM 和 256MB Swap 不足以在其上编译 Ruby。
我读到应该可以为 gcc 使用一些参数,请参阅: http://hostingfu.com/article/compiling-with-gcc-on-low-memory-vps
但是
rvm install 1.9.3 --with-CFLAGS="$CFLAGS --param ggc-min-expand=0 --param ggc-min-heapsize=8192"
将标志提供给 gcc 不起作用,标志的日志仍然相同:
command(2): __rvm_make -j4
CC = gcc
LD = ld
LDSHARED = gcc -shared
CFLAGS = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-fiel$
XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -I. -I.ext/include/x86_64-linux -I./include -I.
DLDFLAGS = -Wl,-soname,libruby.so.1.9
SOLIBS = -lpthread -lrt -ldl -lcrypt -lm
如何在那台机器上编译 ruby?
【问题讨论】:
-
试试
rvm install 1.9.3 -- CFLAGS="$CFLAGS --param ggc-min-expand=0 --param ggc-min-heapsize=8192" -
[205242.284757] send sigkill to 17549 (cc1), adj 0, size 11726也是如此。现在 make.log 有这些 CFLAGS:CFLAGS = --param ggc-min-expand=0 --param ggc-min-heapsize=8192 -fPIC最初/上面显示了一些缺少的标志。 make.log 继续:` .. 配置 -test-/funcall 配置 -test-/load/dot.dot gcc: internal compiler error: Killed (program cc1) gcc: internal compiler error: Killed (program cc1) Please submit a完整的错误报告,如果合适的话,带有预处理的源代码。 .. ` 并以configuring zlib结尾 -
导出的 CFLAG 变量,现在是
echo $CFLAGS:CFLAGS = --param ggc-min-expand=0 --param ggc-min-heapsize=8192 -fPIC。rvm reinstall 1.9.3导致 make.logCFLAGS = --param ggc-min-expand=0 --param ggc-min-heapsize=8192 -fPIC和同样的内存不足退出。
标签: ruby gcc installation rvm low-memory