这是我第一次使用 Ruby。我意识到不要使用 sudo 来安装 Gems,所以我按照这个教程(http://pragmaticstudio.com/blog/2010/9/23/install-rails-ruby-mac)安装 RVM 以便我可以更新我的版本Ruby,然后安装 Middleman ( http://middlemanapp.com/ )。
RVM 安装成功,但在“#compiling”阶段安装 Ruby 1.9.3 时出现以下错误:
运行“make”时出错,请阅读 /Users/Mark/.rvm/log/ruby-1.9.3-p385/make.log 运行 make 时出错。停止安装。
我打开了日志文件,与我见过的许多其他问题不同,该文件不包含对“readline”的引用,而是对“编译”的引用,我认为这与 Ruby 安装的“#compiling”阶段有关。以下是 make.log 的输出:
[2013-02-12 09:04:26] make
CC = clang
LD = ld
LDSHARED = clang -dynamic -bundle
CFLAGS = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -pipe
XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/Users/Mark/.rvm/usr/include -I. -I.ext/include/x86_64-darwin12.2.0 -I./include -I.
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace
SOLIBS =
compiling main.c
compiling dmydln.c
compiling dmyencoding.c
compiling version.c
compiling dmyversion.c
compiling miniprelude.c
compiling array.c
compiling bignum.c
bignum.c:2732:26: warning: while loop has empty body [-Wempty-body]
while (--ny && !zds[ny]); ++ny;
^
bignum.c:2732:26: note: put the semicolon on a separate line to silence this warning
1 warning generated.
compiling class.c
compiling compar.c
compiling complex.c
compiling dir.c
compiling dln_find.c
compiling enum.c
compiling enumerator.c
compiling error.c
compiling eval.c
compiling load.c
compiling proc.c
compiling file.c
compiling gc.c
gc.c:3060:1: warning: unused function 'chain_finalized_object' [-Wunused-function]
chain_finalized_object(st_data_t key, st_data_t val, st_data_t arg)
^
1 warning generated.
compiling hash.c
compiling inits.c
compiling io.c
compiling marshal.c
compiling math.c
compiling node.c
compiling numeric.c
compiling object.c
compiling pack.c
compiling parse.c
compiling process.c
compiling random.c
compiling range.c
compiling rational.c
compiling re.c
compiling regcomp.c
compiling regenc.c
compiling regerror.c
compiling regexec.c
compiling regparse.c
regparse.c:582:15: error: implicit conversion loses integer precision: 'st_index_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
return t->num_entries;
~~~~~~ ~~~^~~~~~~~~~~
1 error generated.
make: *** [regparse.o] Error 1
如果我运行'make --version',我会得到以下输出:
GNU Make 3.81 版权所有 (C) 2006 Free Software Foundation, Inc. 这是免费软件;查看复制条件的来源。没有保修;甚至不考虑适销性或特定用途的适用性。
该程序为 i386-apple-darwin11.3.0 构建
我正在努力寻找一个完全匹配的问题,所以如果有人能提供帮助,那就太好了。
干杯,
标记。