rvm 安装 2.6.6在 mac os 11.1 上运行 '__rvm_make -j4'

问题描述

我正在尝试安装 ruby​​ 2.6.6 版,以便我可以将我的 rails 项目放在 Heroku 上,该项目是用 2.6.5 构建的,所以我认为它应该没有太大区别。当我运行 rvm install 2.6.6 时,我得到 Error running '__rvm_make -j4',please read /.rvm/log/1611416655_ruby-2.6.6/make.log There has been an error while running make. Halting the installation.升级到 Mac OS 11 之前一切正常,我能够使用 rvm 安装几个不同版本的 Ruby。

这是日志文件内容

+__rvm_make:0> make -j4
    BASERUBY = /Users/joshuastocco/.rvm/rubies/ruby-2.6.5/bin/ruby --disable=gems
    CC = gcc
    LD = ld
    LDSHARED = gcc -dynamiclib
    CFLAGS = -O3 -ggdb3 -Wall -Wextra -Wdeclaration-after-statement -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens   -fno-common -pipe 
    XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -DCANONICALIZATION_FOR_MATHN
    CPPFLAGS = -I/usr/local/opt/libyaml/include -I/usr/local/opt/libksba/include -I/usr/local/opt/readline/include -I/usr/local/opt/zlib/include -I/usr/local/opt/openssl@1.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -I. -I.ext/include/x86_64-darwin20 -I./include -I. -I./enc/unicode/12.1.0 
    DLDFLAGS = -L/usr/local/opt/libyaml/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/openssl@1.1/lib -install_name /Users/joshuastocco/.rvm/rubies/ruby-2.6.6/lib/libruby.2.6.dylib -compatibility_version 2.6 -current_version 2.6.6  -fstack-protector-strong -framework Security -framework Foundation  -fstack-protector-strong -framework Security -framework Foundation  
    SOLIBS = -lpthread -lgmp -ldl -lobjc
    LANG = 
    LC_ALL = 
    LC_CTYPE = UTF-8
Configured with: --prefix=/Library/Developer/CommandLinetools/usr --with-gxx-include-dir=/Library/Developer/CommandLinetools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.32.2)
Target: x86_64-apple-darwin20.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLinetools/usr/bin
compiling ./main.c
compiling dmydln.c
compiling miniinit.c
compiling dmyext.c
compiling miniprelude.c
translating probes probes.d
dmydln.c:9:5: warning: function 'dln_load' declared 'noreturn' should not return [-Winvalid-noreturn]
    UNREACHABLE_RETURN(NULL);
    ^
./include/ruby/ruby.h:58:35: note: expanded from macro 'UNREACHABLE_RETURN'
#  define UNREACHABLE_RETURN(val) return (val)
                                  ^
1 warning generated.
compiling ast.c
compiling bignum.c
compiling class.c
. ./vm_opts.h
compiling compar.c
compiling compile.c
compiling complex.c
compiling cont.c
cont.c:1599:1: warning: function declared 'noreturn' should not return [-Winvalid-noreturn]
}
^
1 warning generated.
compiling debug.c
compiling debug_counter.c
compiling dir.c
compiling dln_find.c
compiling encoding.c
compiling enum.c
compiling enumerator.c
compiling error.c
compiling eval.c
In file included from eval.c:38:
./eval_error.c:348:7: warning: variable 'mesg' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
      default: UNREACHABLE;
      ^~~~~~~
./eval_error.c:350:27: note: uninitialized use occurs here
    rb_name_err_raise_str(mesg,klass,ID2SYM(id));
                          ^~~~
./internal.h:1453:34: note: expanded from macro 'rb_name_err_raise_str'
    rb_exc_raise(rb_name_err_new(mesg,recv,name))
                                 ^~~~
./eval_error.c:342:15: note: initialize the variable 'mesg' to silence this warning
    VALUE mesg;
              ^
               = 0
./eval_error.c:376:7: warning: variable 'mesg' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
      default: UNREACHABLE;
      ^~~~~~~
./eval_error.c:378:27: note: uninitialized use occurs here
    rb_name_err_raise_str(mesg,name))
                                 ^~~~
./eval_error.c:370:15: note: initialize the variable 'mesg' to silence this warning
    VALUE mesg;
              ^
               = 0
2 warnings generated.
compiling file.c
compiling gc.c
compiling hash.c
compiling inits.c
compiling io.c
compiling iseq.c
io.c:10789:7: warning: variable 'ret' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
      default:
      ^~~~~~~
io.c:10794:12: note: uninitialized use occurs here
    return ret;
           ^~~
io.c:10777:12: note: initialize the variable 'ret' to silence this warning
    int ret;
           ^
            = 0
compiling load.c
compiling marshal.c
compiling math.c
making mjit_config.h
compiling mjit_compile.c
compiling node.c
compiling numeric.c
compiling object.c
1 warning generated.
compiling pack.c
compiling parse.c
compiling proc.c
compiling process.c
process.c:2968:5: warning: function 'rb_f_exec' declared 'noreturn' should not return [-Winvalid-noreturn]
    UNREACHABLE_RETURN(Qnil);
    ^
./include/ruby/ruby.h:58:35: note: expanded from macro 'UNREACHABLE_RETURN'
#  define UNREACHABLE_RETURN(val) return (val)
                                  ^
process.c:4246:5: warning: function 'rb_f_exit' declared 'noreturn' should not return [-Winvalid-noreturn]
    UNREACHABLE_RETURN(Qnil);
    ^
./include/ruby/ruby.h:58:35: note: expanded from macro 'UNREACHABLE_RETURN'
#  define UNREACHABLE_RETURN(val) return (val)
                                  ^
process.c:4283:5: warning: function 'rb_f_abort' declared 'noreturn' should not return [-Winvalid-noreturn]
    UNREACHABLE_RETURN(Qnil);
    ^
./include/ruby/ruby.h:58:35: note: expanded from macro 'UNREACHABLE_RETURN'
#  define UNREACHABLE_RETURN(val) return (val)
                                  ^
compiling random.c
compiling range.c
compiling rational.c
compiling re.c
3 warnings generated.
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
In file included from sprintf.c:1255:
./vsnprintf.c:832:8: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
                            IS_PRI_EXTRA_MARK(fmt)) {
                            ^~~~~~~~~~~~~~~~~~~~~~
./vsnprintf.c:825:34: note: expanded from macro 'IS_PRI_EXTRA_MARK'
           strncmp((s)+1,PRI_EXTRA_MARK+1,\
                          ~~~~~~~~~~~~~~^~
./vsnprintf.c:832:8: note: use array indexing to silence this warning
./vsnprintf.c:825:34: note: expanded from macro 'IS_PRI_EXTRA_MARK'
           strncmp((s)+1,\
                                        ^
compiling strftime.c
compiling string.c
string.c:6222:1: warning: non-void function does not return a value in all control paths [-Wreturn-type]
}
^
compiling struct.c
compiling symbol.c
1 warning generated.
compiling thread.c
compiling time.c
compiling transcode.c
compiling transient_heap.c
compiling util.c
compiling variable.c
variable.c:1937:5: warning: function 'rb_mod_const_missing' declared 'noreturn' should not return [-Winvalid-noreturn]
    UNREACHABLE_RETURN(Qnil);
    ^
./include/ruby/ruby.h:58:35: note: expanded from macro 'UNREACHABLE_RETURN'
#  define UNREACHABLE_RETURN(val) return (val)
                                  ^
./revision.h unchanged
compiling vm.c
In file included from vm.c:326:
./vm_method.c:121:5: warning: function 'rb_f_notimplement' declared 'noreturn' should not return [-Winvalid-noreturn]
    UNREACHABLE_RETURN(Qnil);
    ^
./include/ruby/ruby.h:58:35: note: expanded from macro 'UNREACHABLE_RETURN'
#  define UNREACHABLE_RETURN(val) return (val)
                                  ^
vm.c:2487:34: warning: expression does not compute the number of elements in this array; element type is 'const int',not 'VALUE' (aka 'unsigned long') [-Wsizeof-array-div]
                             sizeof(ec->machine.regs) / sizeof(VALUE));
                                    ~~~~~~~~~~~~~~~~  ^
vm.c:2487:34: note: place parentheses around the 'sizeof(VALUE)' expression to silence this warning
1 warning generated.
compiling vm_backtrace.c
compiling vm_dump.c
1 warning generated.
compiling vm_trace.c
compiling ./missing/explicit_bzero.c
compiling ./missing/setproctitle.c
compiling addr2line.c
compiling dmyenc.c
compiling dln.c
config.status: creating ruby-runner.h
compiling localeinit.c
compiling prelude.c
compiling array.c
compiling mjit.c
assembling coroutine/amd64/Context.S
compiling enc/ascii.c
compiling enc/us_ascii.c
compiling enc/unicode.c
compiling enc/utf_8.c
compiling enc/trans/newline.c
compiling version.c
2 warnings generated.
building rb_mjit_header.h
linking miniruby
ld: warning: dylib (/usr/local/lib/libgmp.dylib) was built for newer macOS version (11.0) than being linked (10.15.6)
rb_mjit_header.h updated
generating encdb.h
building .ext/include/x86_64-darwin20/rb_mjit_min_header-2.6.6.h
./miniruby -I./lib -I. -I.ext/common  ./tool/transform_mjit_header.rb "gcc " rb_mjit_header.h .ext/include/x86_64-darwin20/rb_mjit_min_header-2.6.6.h
encdb.h updated
./tool/ifchange "--timestamp=.rbconfig.time" rbconfig.rb rbconfig.tmp
rbconfig.rb updated
generating enc.mk
creating verconf.h
verconf.h updated
compiling loadpath.c
making srcs under enc
make[1]: nothing to be done for `srcs'.
generating transdb.h
linking static-library libruby.2.6-static.a
linking shared-library libruby.2.6.dylib
ld: warning: dylib (/usr/local/lib/libgmp.dylib) was built for newer macOS version (11.0) than being linked (10.15.6)
Undefined symbols for architecture x86_64:
  "__mh_execute_header",referenced from:
      _rb_dump_backtrace_with_lines in addr2line.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command Failed with exit code 1 (use -v to see invocation)
make: *** [libruby.2.6.dylib] Error 1
make: *** Waiting for unfinished jobs....
transdb.h updated

Transforming external functions to static:
transform_mjit_header: making external deFinition of 'Init_vm_stack_canary' static inline
transform_mjit_header: making external deFinition of 'rb_vm_opt_struct_aset' static inline
transform_mjit_header: making external deFinition of 'rb_vm_opt_struct_aref' static inline
transform_mjit_header: making external deFinition of 'rb_eql_opt' static inline
transform_mjit_header: changing deFinition of 'rb_equal_opt' to declaration
transform_mjit_header: changing deFinition of 'rb_vm_search_method_slowpath' to declaration
transform_mjit_header: making external deFinition of 'rb_vm_rewrite_cref' static inline
transform_mjit_header: making external deFinition of 'rb_vm_push_frame' static inline
transform_mjit_header: making external deFinition of 'rb_vm_block_ep_update' static inline
transform_mjit_header: making external deFinition of 'rb_vm_cref_new_toplevel' static inline
transform_mjit_header: making external deFinition of 'rb_vm_frame_block_handler' static inline
transform_mjit_header: making external deFinition of 'rb_vm_ep_local_ep' static inline
transform_mjit_header: making declaration of 'rb_vm_rewrite_cref' static inline
transform_mjit_header: making declaration of 'rb_vm_frame_block_handler' static inline
transform_mjit_header: making declaration of 'rb_vm_block_ep_update' static inline
transform_mjit_header: making declaration of 'rb_vm_ep_local_ep' static inline
transform_mjit_header: SKIPPED to transform __sigbits
transform_mjit_header: making declaration of 'Init_vm_stack_canary' static inline
transform_mjit_header: making declaration of 'rb_eql_opt' static inline
transform_mjit_header: SKIPPED to transform __sincospi
transform_mjit_header: SKIPPED to transform __sincospif
transform_mjit_header: SKIPPED to transform __sincos
transform_mjit_header: SKIPPED to transform __sincosf
transform_mjit_header: SKIPPED to transform __inline_isnormall
transform_mjit_header: SKIPPED to transform __inline_isnormald
transform_mjit_header: SKIPPED to transform __inline_isnormalf
transform_mjit_header: SKIPPED to transform __inline_signbitl
transform_mjit_header: SKIPPED to transform __inline_signbitd
transform_mjit_header: SKIPPED to transform __inline_signbitf
transform_mjit_header: SKIPPED to transform __inline_isnanl
transform_mjit_header: SKIPPED to transform __inline_isnand
transform_mjit_header: SKIPPED to transform __inline_isnanf
transform_mjit_header: SKIPPED to transform __inline_isinfl
transform_mjit_header: SKIPPED to transform __inline_isinfd
transform_mjit_header: SKIPPED to transform __inline_isinff
transform_mjit_header: SKIPPED to transform __inline_isfinitel
transform_mjit_header: SKIPPED to transform __inline_isfinited
transform_mjit_header: SKIPPED to transform __inline_isfinitef
transform_mjit_header: SKIPPED to transform __darwin_fd_clr
transform_mjit_header: SKIPPED to transform __darwin_fd_set
transform_mjit_header: SKIPPED to transform __darwin_fd_isset
transform_mjit_header: SKIPPED to transform __darwin_check_fd_set
transform_mjit_header: SKIPPED to transform __sputc
ln -sf ../../../.ext/include/x86_64-darwin20/rb_mjit_min_header-2.6.6.h include/ruby-2.6.0/x86_64-darwin20/rb_mjit_min_header-2.6.6.h
+__rvm_make:0> return 2

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)