1

Ruby 1.9.3 (または 1.8.7 以降のバージョン) のインストールで問題が発生しています。

エラーログについては、以下を参照してください。

[2012-10-26 19:26:24] make
    CC = clang
    LD = ld
    LDSHARED = clang -dynamiclib
    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 -I/Users/username/.rvm/usr/include -fno-common -pipe 
    XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
    CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -I. -I.ext/include/x86_64-darwin10.8.0 -I./include -I.
    DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -install_name /Users/username/.rvm/rubies/ruby-1.9.3-p286/lib/libruby.1.9.1.dylib -current_version 1.9.1 -compatibility_version 1.9.1 -Wl,-unexported_symbol,_Init_* -Wl,-unexported_symbol,*_threadptr_*  -Wl,-u,_objc_msgSend   
    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
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
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
In file included from vm.c:25:
In file included from ./vm_exec.c:106:
insns.def:634:9: warning: explicitly assigning a variable of type 'VALUE' (aka 'unsigned long') to itself [-Wself-assign]
    val = val;
    ~~~ ^ ~~~
In file included from vm.c:27:
./vm_method.c:102:85: warning: unused variable 'prev_ume' [-Wunused-variable]
    struct unlinked_method_entry_list_entry *ume = vm->unlinked_method_entry_list, *prev_ume = 0, *curr_ume;
                                                                                    ^
./vm_method.c:102:100: warning: unused variable 'curr_ume' [-Wunused-variable]
    struct unlinked_method_entry_list_entry *ume = vm->unlinked_method_entry_list, *prev_ume = 0, *curr_ume;
                                                                                                   ^
3 warnings generated.
compiling vm_dump.c
compiling thread.c
compiling cont.c
compiling ./enc/ascii.c
compiling ./enc/us_ascii.c
compiling ./enc/unicode.c
compiling ./enc/utf_8.c
compiling newline.c
compiling ./missing/setproctitle.c
linking miniruby
rbconfig.rb updated
generating enc.mk
compiling dln.c
compiling encoding.c
generating prelude.c
compiling prelude.c
linking static-library libruby.1.9.1-static.a
linking shared-library libruby.1.9.1.dylib
generating encdb.h
encdb.h unchanged
making enc
compiling ./enc/encdb.c
linking encoding encdb.bundle
compiling ./enc/big5.c
linking encoding big5.bundle
compiling ./enc/cp949.c
linking encoding cp949.bundle
compiling ./enc/emacs_mule.c
linking encoding emacs_mule.bundle
compiling ./enc/euc_jp.c
linking encoding euc_jp.bundle
compiling ./enc/euc_kr.c
linking encoding euc_kr.bundle
compiling ./enc/euc_tw.c
linking encoding euc_tw.bundle
compiling ./enc/gb2312.c
linking encoding gb2312.bundle
compiling ./enc/gb18030.c
linking encoding gb18030.bundle
compiling ./enc/gbk.c
linking encoding gbk.bundle
compiling ./enc/iso_8859_1.c
linking encoding iso_8859_1.bundle
compiling ./enc/iso_8859_2.c
linking encoding iso_8859_2.bundle
compiling ./enc/iso_8859_3.c
linking encoding iso_8859_3.bundle
compiling ./enc/iso_8859_4.c
linking encoding iso_8859_4.bundle
compiling ./enc/iso_8859_5.c
linking encoding iso_8859_5.bundle
compiling ./enc/iso_8859_6.c
linking encoding iso_8859_6.bundle
compiling ./enc/iso_8859_7.c
linking encoding iso_8859_7.bundle
compiling ./enc/iso_8859_8.c
linking encoding iso_8859_8.bundle
compiling ./enc/iso_8859_9.c
linking encoding iso_8859_9.bundle
compiling ./enc/iso_8859_10.c
linking encoding iso_8859_10.bundle
compiling ./enc/iso_8859_11.c
linking encoding iso_8859_11.bundle
compiling ./enc/iso_8859_13.c
linking encoding iso_8859_13.bundle
compiling ./enc/iso_8859_14.c
linking encoding iso_8859_14.bundle
compiling ./enc/iso_8859_15.c
linking encoding iso_8859_15.bundle
compiling ./enc/iso_8859_16.c
linking encoding iso_8859_16.bundle
compiling ./enc/koi8_r.c
linking encoding koi8_r.bundle
compiling ./enc/koi8_u.c
linking encoding koi8_u.bundle
compiling ./enc/shift_jis.c
linking encoding shift_jis.bundle
compiling ./enc/utf_16be.c
linking encoding utf_16be.bundle
compiling ./enc/utf_16le.c
linking encoding utf_16le.bundle
compiling ./enc/utf_32be.c
linking encoding utf_32be.bundle
compiling ./enc/utf_32le.c
linking encoding utf_32le.bundle
compiling ./enc/windows_1251.c
linking encoding windows_1251.bundle
making srcs under enc
make[1]: Nothing to be done for `srcs'.
generating transdb.h
transdb.h unchanged
making trans
compiling ./enc/trans/transdb.c
linking transcoder transdb.bundle
compiling ./enc/trans/big5.c
linking transcoder big5.bundle
compiling ./enc/trans/chinese.c
linking transcoder chinese.bundle
compiling ./enc/trans/emoji.c
linking transcoder emoji.bundle
compiling ./enc/trans/emoji_iso2022_kddi.c
linking transcoder emoji_iso2022_kddi.bundle
compiling ./enc/trans/emoji_sjis_docomo.c
linking transcoder emoji_sjis_docomo.bundle
compiling ./enc/trans/emoji_sjis_kddi.c
linking transcoder emoji_sjis_kddi.bundle
compiling ./enc/trans/emoji_sjis_softbank.c
linking transcoder emoji_sjis_softbank.bundle
compiling ./enc/trans/escape.c
linking transcoder escape.bundle
compiling ./enc/trans/gb18030.c
linking transcoder gb18030.bundle
compiling ./enc/trans/gbk.c
linking transcoder gbk.bundle
compiling ./enc/trans/iso2022.c
linking transcoder iso2022.bundle
compiling ./enc/trans/japanese.c
linking transcoder japanese.bundle
compiling ./enc/trans/japanese_euc.c
linking transcoder japanese_euc.bundle
compiling ./enc/trans/japanese_sjis.c
linking transcoder japanese_sjis.bundle
compiling ./enc/trans/korean.c
linking transcoder korean.bundle
compiling ./enc/trans/single_byte.c
linking transcoder single_byte.bundle
compiling ./enc/trans/utf8_mac.c
linking transcoder utf8_mac.bundle
compiling ./enc/trans/utf_16_32.c
linking transcoder utf_16_32.bundle
making encs
configuring -test-/add_suffix
configuring -test-/array/resize
configuring -test-/bug-3571
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.
configuring bigdecimal
configuring continuation
configuring coverage
configuring curses
configuring date
configuring dbm
configuring digest
configuring digest/bubblebabble
configuring digest/md5
configuring digest/rmd160
configuring digest/sha1
configuring digest/sha2
configuring dl
configuring dl/callback
configuring dl/win32
Failed to configure dl/win32. It will not be installed.
configuring etc
configuring fcntl
configuring fiber
configuring fiddle
configuring gdbm
Failed to configure gdbm. It will not be installed.
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
check functions.........
check struct members..
check libraries....
Use ActiveTcl libraries (if available).
Search tclConfig.sh and tkConfig.sh....................................
Valid [tclConfig.sh, tkConfig.sh] are found in [["/System/Library/Frameworks/Tcl.framework", "/System/Library/Frameworks/Tk.framework"], ["/usr/lib", "/usr/lib"], ["/System/Library/Frameworks/Tcl.framework/Versions/Current", "/System/Library/Frameworks/Tk.framework/Versions/Current"], ["/System/Library/Frameworks/Tcl.framework/Versions/8.5", "/System/Library/Frameworks/Tk.framework/Versions/8.5"], ["/System/Library/Frameworks/Tcl.framework/Versions/8.4", "/System/Library/Frameworks/Tk.framework/Versions/8.4"]]
Use [tclConfig.sh, tkConfig.sh] == ["/System/Library/Frameworks/Tcl.framework/tclConfig.sh", "/System/Library/Frameworks/Tk.framework/tkConfig.sh"]
Use MacOS X Frameworks.

Find Tcl/Tk libraries. Make tcltklib.so which is required by Ruby/Tk.
configuring tk/tkutil
configuring win32ole
Failed to configure win32ole. It will not be installed.
configuring zlib
Failed to configure zlib. It will not be installed.
linking shared-object -test-/add_suffix/bug.bundle
installing default bug libraries
compiling resize.c
linking shared-object -test-/array/resize.bundle
installing default resize libraries
compiling bug.c
linking shared-object -test-/bug-3571/bug.bundle
installing default bug libraries
compiling bug.c
linking shared-object -test-/bug-3662/bug.bundle
installing default bug libraries
compiling passing_block.c
linking shared-object -test-/funcall/funcall.bundle
installing default funcall libraries
compiling dot.dot.c
linking shared-object -test-/load/dot.dot/dot.dot.bundle
installing default dot.dot libraries
linking shared-object -test-/old_thread_select/old_thread_select.bundle
installing default old_thread_select libraries
compiling numhash.c
linking shared-object -test-/st/numhash.bundle
installing default numhash libraries
compiling cstr.c
compiling ellipsize.c
compiling enc_associate.c
compiling init.c
compiling modify.c
compiling set_len.c
linking shared-object -test-/string/string.bundle
installing default string libraries
linking shared-object -test-/wait_for_single_fd/wait_for_single_fd.bundle
installing default wait_for_single_fd libraries
make[2]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all'.
linking shared-object bigdecimal.bundle
installing default bigdecimal libraries
compiling continuation.c
linking shared-object continuation.bundle
installing default continuation libraries
compiling coverage.c
linking shared-object coverage.bundle
installing default coverage libraries
compiling curses.c
linking shared-object curses.bundle
installing default curses libraries
linking shared-object date_core.bundle
installing default date_core libraries
compiling dbm.c
dbm.c:818:16: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
        if (val.dsize == (int)RSTRING_LEN(valstr) &&
            ~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~
1 warning generated.
linking shared-object dbm.bundle
installing default dbm libraries
compiling digest.c
linking shared-object digest.bundle
installing digest libraries
installing default digest libraries
compiling bubblebabble.c
linking shared-object digest/bubblebabble.bundle
installing default bubblebabble libraries
compiling md5init.c
linking shared-object digest/md5.bundle
ld: warning: ignoring file /usr/local/lib/libz.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64)
ld: in /usr/local/lib/libz.1.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64) for architecture 
x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../../../.ext/x86_64-darwin10.8.0/digest/md5.bundle] Error 1
make[1]: *** [ext/digest/md5/all] Error 2
make: *** [build-ext] Error 2

RVM からインストールしようとしていますが、Ruby をソースからインストールするだけでは役に立ちません。何が起こっているのか理解できないようです。追加--with-gcc=clangしてみましたenv ARCHFLAGS="-arch x86_64"

どんなアドバイスでも大歓迎です!ありがとう。

4

1 に答える 1

2

おそらく Homebrew から、互換性のないビルド バージョンの がlibzインストールされて/usr/local/libいます。おそらく 32 ビットのみのバージョンで、現在は 64 ビットまたはユニバーサル バージョンが必要です。インストールした他のものを壊すリスクを冒して削除するか、更新することができます。より安全なオプション: ruby​​ をインストールする前に、一時的に別の場所に mv してから、mv に戻します。OS X は のバージョンを提供するため、必要ありませんlibz

于 2012-10-27T00:08:46.577 に答える