ruby - 在 RVM 中安装 Ruby 1.9.3 时出错 - Make error

标签 ruby macos makefile rvm

我在 OSX 中使用 RVM 编译 Ruby 1.9.3 时出错。我已经搜索了很多解决方案,但不是常见错误。我认为是权限错误,但我不知道如何解决。

查看我的 make.log 文件:

[2013-04-03 09:37:41] make
    CC = clang
    LD = ld
    LDSHARED = clang -dynamiclib
    CFLAGS = -O2 -arch x86_64 -fno-common -pipe 
    XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
    CPPFLAGS = -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -I/opt/local/include -I. -I.ext/include/x86_64-darwin12.3.0 -I./include -I.
    DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -install_name /Users/brunno/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.1.9.1.dylib -current_version 1.9.1 -compatibility_version 1.9.1  -Wl,-u,_objc_msgSend   
    SOLIBS = 
compiling main.c
compiling dmydln.c
compiling dmyencoding.c
compiling version.c
compiling miniprelude.c
compiling array.c
compiling bignum.c
compiling class.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
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
1 warning generated.
compiling file.c
compiling gc.c
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
compiling regsyntax.c
compiling ruby.c
compiling safe.c
compiling signal.c
compiling sprintf.c
compiling st.c
compiling strftime.c
compiling string.c
compiling struct.c
compiling time.c
compiling transcode.c
compiling util.c
compiling variable.c
compiling compile.c
compiling debug.c
compiling iseq.c
compiling vm.c
compiling vm_dump.c
compiling thread.c
thread.c:2550:34: warning: variable 'orig_read' is uninitialized when used within its own initialization [-Wuninitialized]
    rb_fdset_t UNINITIALIZED_VAR(orig_read);
                                 ^~~~~~~~~
./vm_core.h:115:34: note: expanded from macro 'UNINITIALIZED_VAR'
#define UNINITIALIZED_VAR(x) x = x
                                 ^
thread.c:2551:34: warning: variable 'orig_write' is uninitialized when used within its own initialization [-Wuninitialized]
    rb_fdset_t UNINITIALIZED_VAR(orig_write);
                                 ^~~~~~~~~~
./vm_core.h:115:34: note: expanded from macro 'UNINITIALIZED_VAR'
#define UNINITIALIZED_VAR(x) x = x
                                 ^
thread.c:2552:34: warning: variable 'orig_except' is uninitialized when used within its own initialization [-Wuninitialized]
    rb_fdset_t UNINITIALIZED_VAR(orig_except);
                                 ^~~~~~~~~~~
./vm_core.h:115:34: note: expanded from macro 'UNINITIALIZED_VAR'
#define UNINITIALIZED_VAR(x) x = x
                                 ^
compiling cont.c
compiling ./enc/ascii.c
compiling ./enc/us_ascii.c
compiling ./enc/unicode.c
3 warnings generated.
compiling ./enc/utf_8.c
compiling newline.c
compiling ./missing/setproctitle.c
compiling dln.c
compiling encoding.c
compiling dmyversion.c
linking miniruby
generating encdb.h
rbconfig.rb updated
generating enc.mk
generating prelude.c
compiling prelude.c
encdb.h unchanged
making srcs under enc
linking static-library libruby.1.9.1-static.a
make[1]: Nothing to be done for `srcs'.
generating transdb.h
transdb.h unchanged
linking shared-library libruby.1.9.1.dylib
making enc
making trans
compiling ./enc/trans/transdb.c
compiling ./enc/big5.c
compiling ./enc/encdb.c
compiling ./enc/cp949.c
compiling ./enc/trans/big5.c
configuring -test-/array/resize
configuring -test-/bug-3571
compiling ./enc/emacs_mule.c
configuring -test-/bug-3662
configuring -test-/funcall
configuring -test-/load/dot.dot
configuring -test-/old_thread_select
configuring -test-/st/numhash
configuring -test-/string
configuring -test-/wait_for_single_fd
configuring -test-/win32/dln
Failed to configure -test-/win32/dln. It will not be installed.
configuring -test-/win32/fd_setsize
Failed to configure -test-/win32/fd_setsize. It will not be installed.
compiling ./enc/trans/chinese.c
configuring bigdecimal
compiling ./enc/euc_jp.c
compiling ./enc/euc_kr.c
compiling ./enc/euc_tw.c
configuring continuation
configuring coverage
configuring curses
compiling ./enc/gb2312.c
compiling ./enc/gb18030.c
compiling ./enc/gbk.c
compiling ./enc/iso_8859_1.c
compiling ./enc/iso_8859_2.c
compiling ./enc/iso_8859_3.c
compiling ./enc/iso_8859_4.c
compiling ./enc/iso_8859_5.c
compiling ./enc/iso_8859_6.c
compiling ./enc/iso_8859_7.c
compiling ./enc/iso_8859_8.c
compiling ./enc/iso_8859_9.c
compiling ./enc/iso_8859_10.c
compiling ./enc/iso_8859_11.c
compiling ./enc/iso_8859_13.c
compiling ./enc/iso_8859_14.c
compiling ./enc/iso_8859_15.c
compiling ./enc/iso_8859_16.c
compiling ./enc/koi8_r.c
compiling ./enc/koi8_u.c
compiling ./enc/shift_jis.c
compiling ./enc/utf_16be.c
compiling ./enc/trans/emoji.c
compiling ./enc/utf_16le.c
compiling ./enc/utf_32be.c
compiling ./enc/utf_32le.c
compiling ./enc/windows_1251.c
linking encoding encdb.bundle
linking encoding big5.bundle
compiling ./enc/trans/emoji_iso2022_kddi.c
linking encoding cp949.bundle
linking encoding emacs_mule.bundle
linking encoding euc_jp.bundle
linking encoding euc_kr.bundle
linking encoding euc_tw.bundle
linking encoding gb2312.bundle
linking encoding gb18030.bundle
linking encoding gbk.bundle
linking encoding iso_8859_1.bundle
linking encoding iso_8859_2.bundle
linking encoding iso_8859_3.bundle
linking encoding iso_8859_4.bundle
linking encoding iso_8859_5.bundle
linking encoding iso_8859_6.bundle
linking encoding iso_8859_7.bundle
linking encoding iso_8859_8.bundle
linking encoding iso_8859_9.bundle
linking encoding iso_8859_10.bundle
linking encoding iso_8859_11.bundle
linking encoding iso_8859_13.bundle
linking encoding iso_8859_14.bundle
linking encoding iso_8859_15.bundle
linking encoding iso_8859_16.bundle
linking encoding koi8_r.bundle
linking encoding koi8_u.bundle
linking encoding shift_jis.bundle
linking encoding utf_16be.bundle
linking encoding utf_16le.bundle
linking encoding utf_32be.bundle
linking encoding utf_32le.bundle
linking encoding windows_1251.bundle
compiling ./enc/trans/emoji_sjis_docomo.c
compiling ./enc/trans/emoji_sjis_kddi.c
compiling ./enc/trans/emoji_sjis_softbank.c
compiling ./enc/trans/escape.c
compiling ./enc/trans/gb18030.c
compiling ./enc/trans/gbk.c
compiling ./enc/trans/iso2022.c
compiling ./enc/trans/japanese.c
compiling ./enc/trans/japanese_euc.c
compiling ./enc/trans/japanese_sjis.c
configuring date
configuring dbm
configuring digest
configuring digest/bubblebabble
configuring digest/md5
configuring digest/rmd160
compiling ./enc/trans/korean.c
configuring digest/sha1
configuring digest/sha2
compiling ./enc/trans/single_byte.c
configuring dl
compiling ./enc/trans/utf8_mac.c
compiling ./enc/trans/utf_16_32.c
linking transcoder transdb.bundle
linking transcoder big5.bundle
linking transcoder chinese.bundle
linking transcoder emoji.bundle
linking transcoder emoji_iso2022_kddi.bundle
linking transcoder emoji_sjis_docomo.bundle
linking transcoder emoji_sjis_kddi.bundle
linking transcoder emoji_sjis_softbank.bundle
linking transcoder escape.bundle
configuring dl/callback
configuring dl/win32
Failed to configure dl/win32. It will not be installed.
configuring etc
linking transcoder gb18030.bundle
linking transcoder gbk.bundle
linking transcoder iso2022.bundle
linking transcoder japanese.bundle
linking transcoder japanese_euc.bundle
linking transcoder japanese_sjis.bundle
linking transcoder single_byte.bundle
linking transcoder utf8_mac.bundle
linking transcoder utf_16_32.bundle
linking transcoder korean.bundle
making encs
configuring fcntl
configuring fiber
configuring fiddle
configuring gdbm
configuring iconv
configuring io/console
configuring io/nonblock
configuring io/wait
configuring json
configuring json/generator
configuring json/parser
configuring mathn/complex
configuring mathn/rational
configuring nkf
configuring objspace
configuring openssl
configuring pathname
configuring psych
configuring pty
configuring racc/cparse
configuring readline
configuring ripper
configuring sdbm
configuring socket
configuring stringio
configuring strscan
configuring syck
configuring syslog
configuring tk/tkutil
Failed to configure tk/tkutil. It will not be installed.
configuring win32ole
Failed to configure win32ole. It will not be installed.
configuring zlib
compiling resize.c
compiling bug.c
compiling bug.c
compiling passing_block.c
installing default bug libraries
installing default funcall libraries
linking shared-object -test-/bug-3571/bug.bundle
installing default bug libraries
linking shared-object -test-/funcall/funcall.bundle
linking shared-object -test-/bug-3662/bug.bundle
installing default resize libraries
linking shared-object -test-/array/resize.bundle
ld: can't open output file for writing: ../../../.ext/x86_64-darwin12.3.0/-test-/bug-3571/bug.bundle, errno=2 for architecture x86_64
ld: can't open output file for writing: ../../../.ext/x86_64-darwin12.3.0/-test-/bug-3662/bug.bundle, errno=2 for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: can't open output file for writing: ../../../.ext/x86_64-darwin12.3.0/-test-/funcall/funcall.bundle, errno=2 for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../../../.ext/x86_64-darwin12.3.0/-test-/bug-3662/bug.bundle] Error 1
make[1]: *** [ext/-test-/bug-3662/all] Error 2
make[2]: *** [../../../.ext/x86_64-darwin12.3.0/-test-/funcall/funcall.bundle] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [ext/-test-/funcall/all] Error 2
make[2]: *** [../../../.ext/x86_64-darwin12.3.0/-test-/bug-3571/bug.bundle] Error 1
make[1]: *** [ext/-test-/bug-3571/all] Error 2
ld: can't open output file for writing: ../../../../.ext/x86_64-darwin12.3.0/-test-/array/resize.bundle, errno=2 for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../../../../.ext/x86_64-darwin12.3.0/-test-/array/resize.bundle] Error 1
make[1]: *** [ext/-test-/array/resize/all] Error 2
make: *** [build-ext] Error 2

谢谢你们的时间!

最佳答案

我知道这个问题已经得到回答,但我想我会提供解决解决这个问题所需的命令:

cd ~/.rvm/src/ruby-1.9.3-p392
mkdir -p .ext/x86_64-darwin12.3.0/-test-/array
mkdir -p .ext/x86_64-darwin12.3.0/-test-/bug-3571
mkdir -p .ext/x86_64-darwin12.3.0/-test-/bug-3662
mkdir -p .ext/x86_64-darwin12.3.0/-test-/funcall/
mkdir -p .ext/x86_64-darwin12.3.0/-test-/load/dot.dot/
mkdir -p .ext/x86_64-darwin12.3.0/-test-/old_thread_select
mkdir -p .ext/x86_64-darwin12.3.0/-test-/st
mkdir -p .ext/x86_64-darwin12.3.0/-test-/string
mkdir -p .ext/x86_64-darwin12.3.0/-test-/wait_for_single_fd
mkdir -p .ext/x86_64-darwin12.3.0/digest
mkdir -p .ext/x86_64-darwin12.3.0/dl
mkdir -p .ext/x86_64-darwin12.3.0/io
mkdir -p .ext/x86_64-darwin12.3.0/json/ext
mkdir -p .ext/x86_64-darwin12.3.0/mathn

关于ruby - 在 RVM 中安装 Ruby 1.9.3 时出错 - Make error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15787818/

相关文章:

ruby - 无法加载此类文件 -- ruby​​gems/core_ext/kernel_warn (LoadError)

ruby - 杰基尔 vs RefineryCMS?

linux - OSX 中的环回挂载

C++ Mac OS X semaphore.h : trouble with `sem_open()` and `sem_wait()`

linux - 遍历 Makefile 中的列表?

ruby - 无法推送 gem : Home does not appear to be a valid URL

macos - 为 Mac 编译 OpenSSL 时出现 libcrypto ar 错误

C Makefile - 缺少分隔符。停止

makefile - cmake 用于具有通用代码的更大项目

ruby - 使用 Ruby 将 SEC Edgar XML 文件解析为 Nokogiri