Project

General

Profile

Actions

Bug #18745

closed

build ruby3.0.4 fail on macOS 12.3.1 monterey fail (Apple silicon arm64)

Added by lihansey (lihansey163@163.com li) about 3 years ago. Updated about 3 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:108312]

Description

Use ruby-build to build ruby 3.0.4 on macOS12.3.1 monterey still fail.

Does miss sth to configure? Thanks.

- Log

ruby-build.20220420134132.55060.log

.....

Configuration summary for ruby version 3.0.4

   * Installation prefix: /Users/lihanguang/.asdf/installs/ruby/3.0.4
   * exec prefix:         ${prefix}
   * arch:                arm64-darwin21
   * site arch:           ${arch}
   * RUBY_BASE_NAME:      ruby
   * enable shared:       yes
   * ruby lib prefix:     ${libdir}/${RUBY_BASE_NAME}
   * site libraries path: ${rubylibprefix}/${sitearch}
   * vendor path:         ${rubylibprefix}/vendor_ruby
   * target OS:           darwin21
   * compiler:            clang -fdeclspec
   * with pthread:        yes
   * with coroutine:      arm64
   * enable shared libs:  yes
   * dynamic library ext: bundle
   * CFLAGS:              ${optflags} ${debugflags} ${warnflags}
   * LDFLAGS:             -L. \
                          -L/Users/lihanguang/.asdf/installs/ruby/3.0.4/lib \
                           -fstack-protector-strong
   * DLDFLAGS:            -L/Users/lihanguang/.asdf/installs/ruby/3.0.4/lib \
                           -Wl,-undefined,dynamic_lookup \
                          -Wl,-multiply_defined,suppress
   * optflags:            -O3
   * debugflags:          -ggdb3
   * warnflags:           -Wall -Wextra -Wdeprecated-declarations \
                          -Wdivision-by-zero \
                          -Wimplicit-function-declaration -Wimplicit-int \
                          -Wmisleading-indentation -Wpointer-arith \
                          -Wshorten-64-to-32 -Wwrite-strings \
                          -Wmissing-noreturn -Wno-cast-function-type \
                          -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
   * strip command:       strip -A -n
   * install doc:         rdoc
   * JIT support:         yes
   * man page type:       doc
   * BASERUBY -v:         ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a) \
                          [arm64-darwin21]

---
	BASERUBY = /Users/lihanguang/.asdf/shims/ruby --disable=gems
	CC = clang -fdeclspec
	LD = clang
	LDSHARED = clang -fdeclspec -dynamiclib
	CFLAGS = -O3 -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-cast-function-type -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 -std=gnu99 -fno-common -pipe -m64
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -I. -I.ext/include/arm64-darwin21 -I./include -I. -I./enc/unicode/12.1.0
	CPPFLAGS = -I/Users/lihanguang/.asdf/installs/ruby/3.0.4/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   
	DLDFLAGS = -L/Users/lihanguang/.asdf/installs/ruby/3.0.4/lib  -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -install_name /Users/lihanguang/.asdf/installs/ruby/3.0.4/lib/libruby.3.0.dylib -compatibility_version 3.0 -current_version 3.0.4  -fstack-protector-strong -framework Security -framework Foundation  -fstack-protector-strong -framework Security -framework Foundation  -m64
	SOLIBS = -lpthread -ldl -lobjc
	LANG = en_US.UTF-8
	LC_ALL = en_US.UTF-8
	LC_CTYPE = 
	MFLAGS = - --jobserver-fds=6,7 -j
Apple clang version 13.1.6 (clang-1316.0.21.2.3)
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
compiling ./main.c
compiling dmydln.c
compiling miniinit.c
compiling dmyext.c
translating probes probes.d
compiling ast.c
compiling bignum.c
compiling class.c
. ./vm_opts.h
compiling compar.c
compiling compile.c
compiling complex.c
compiling cont.c
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
compiling file.c
compiling gc.c
compiling hash.c
compiling inits.c
compiling io.c
compiling iseq.c
compiling load.c
compiling marshal.c
compiling math.c
compiling memory_view.c
making mjit_config.h
compiling mjit_compile.c
compiling node.c
compiling numeric.c
compiling object.c
compiling pack.c
compiling parse.c
compiling proc.c
compiling process.c
compiling ractor.c
compiling random.c
parse.y:10722:1: warning: unused function 'parser_token_value_print' [-Wunused-function]
parser_token_value_print(struct parser_params *p, enum yytokentype type, const YYSTYPE *valp)
^
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 scheduler.c
compiling signal.c
compiling sprintf.c
ruby.c:904:18: warning: variable 'set' set but not used [-Wunused-but-set-variable]
    unsigned int set = 0U;
                 ^
compiling st.c
compiling strftime.c
1 warning generated.
compiling string.c
compiling struct.c
compiling symbol.c
compiling thread.c
compiling time.c
compiling transcode.c
compiling transient_heap.c
compiling util.c
compiling variable.c
compiling vm.c
compiling vm_backtrace.c
compiling vm_dump.c
compiling vm_sync.c
1 warning generated.
compiling vm_trace.c
compiling ./missing/explicit_bzero.c
compiling ./missing/setproctitle.c
compiling ./missing/finite.c
compiling addr2line.c
compiling dmyenc.c
compiling dln.c
compiling localeinit.c
config.status: creating ruby-runner.h
compiling array.c
compiling mjit.c
assembling coroutine/arm64/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
./revision.h unchanged
compiling version.c
linking miniruby
Undefined symbols for architecture arm64:
  "_coroutine_transfer", referenced from:
      _fiber_setcontext in cont.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [miniruby] Error 1


Related issues 1 (0 open1 closed)

Related to Ruby - Bug #18019: 3.0.X fails to link on Mac OS X 10.15.7 due to linker error related to _coroutine_transferClosedActions

Updated by lihansey (lihansey163@163.com li) about 3 years ago

Use ruby-build to build ruby 3.0.4 on macOS12.3.1 monterey still fail.

Does miss sth to configure? Thanks.

  • Log

# ..... ohter log 

Configuration summary for ruby version 3.0.4

   * Installation prefix: /Users/lihanguang/.asdf/installs/ruby/3.0.4
   * exec prefix:         ${prefix}
   * arch:                arm64-darwin21
   * site arch:           ${arch}
   * RUBY_BASE_NAME:      ruby
   * enable shared:       yes
   * ruby lib prefix:     ${libdir}/${RUBY_BASE_NAME}
   * site libraries path: ${rubylibprefix}/${sitearch}
   * vendor path:         ${rubylibprefix}/vendor_ruby
   * target OS:           darwin21
   * compiler:            clang -fdeclspec
   * with pthread:        yes
   * with coroutine:      arm64
   * enable shared libs:  yes
   * dynamic library ext: bundle
   * CFLAGS:              ${optflags} ${debugflags} ${warnflags}
   * LDFLAGS:             -L. \
                          -L/Users/lihanguang/.asdf/installs/ruby/3.0.4/lib \
                           -fstack-protector-strong
   * DLDFLAGS:            -L/Users/lihanguang/.asdf/installs/ruby/3.0.4/lib \
                           -Wl,-undefined,dynamic_lookup \
                          -Wl,-multiply_defined,suppress
   * optflags:            -O3
   * debugflags:          -ggdb3
   * warnflags:           -Wall -Wextra -Wdeprecated-declarations \
                          -Wdivision-by-zero \
                          -Wimplicit-function-declaration -Wimplicit-int \
                          -Wmisleading-indentation -Wpointer-arith \
                          -Wshorten-64-to-32 -Wwrite-strings \
                          -Wmissing-noreturn -Wno-cast-function-type \
                          -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
   * strip command:       strip -A -n
   * install doc:         rdoc
   * JIT support:         yes
   * man page type:       doc
   * BASERUBY -v:         ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a) \
                          [arm64-darwin21]

---
	BASERUBY = /Users/lihanguang/.asdf/shims/ruby --disable=gems
	CC = clang -fdeclspec
	LD = clang
	LDSHARED = clang -fdeclspec -dynamiclib
	CFLAGS = -O3 -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-cast-function-type -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 -std=gnu99 -fno-common -pipe -m64
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -I. -I.ext/include/arm64-darwin21 -I./include -I. -I./enc/unicode/12.1.0
	CPPFLAGS = -I/Users/lihanguang/.asdf/installs/ruby/3.0.4/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   
	DLDFLAGS = -L/Users/lihanguang/.asdf/installs/ruby/3.0.4/lib  -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -install_name /Users/lihanguang/.asdf/installs/ruby/3.0.4/lib/libruby.3.0.dylib -compatibility_version 3.0 -current_version 3.0.4  -fstack-protector-strong -framework Security -framework Foundation  -fstack-protector-strong -framework Security -framework Foundation  -m64
	SOLIBS = -lpthread -ldl -lobjc
	LANG = en_US.UTF-8
	LC_ALL = en_US.UTF-8
	LC_CTYPE = 
	MFLAGS = - --jobserver-fds=6,7 -j
Apple clang version 13.1.6 (clang-1316.0.21.2.3)
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
compiling ./main.c
compiling dmydln.c
compiling miniinit.c
compiling dmyext.c
translating probes probes.d
compiling ast.c
compiling bignum.c
compiling class.c
. ./vm_opts.h
compiling compar.c
compiling compile.c
compiling complex.c
compiling cont.c
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
compiling file.c
compiling gc.c
compiling hash.c
compiling inits.c
compiling io.c
compiling iseq.c
compiling load.c
compiling marshal.c
compiling math.c
compiling memory_view.c
making mjit_config.h
compiling mjit_compile.c
compiling node.c
compiling numeric.c
compiling object.c
compiling pack.c
compiling parse.c
compiling proc.c
compiling process.c
compiling ractor.c
compiling random.c
parse.y:10722:1: warning: unused function 'parser_token_value_print' [-Wunused-function]
parser_token_value_print(struct parser_params *p, enum yytokentype type, const YYSTYPE *valp)
^
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 scheduler.c
compiling signal.c
compiling sprintf.c
ruby.c:904:18: warning: variable 'set' set but not used [-Wunused-but-set-variable]
    unsigned int set = 0U;
                 ^
compiling st.c
compiling strftime.c
1 warning generated.
compiling string.c
compiling struct.c
compiling symbol.c
compiling thread.c
compiling time.c
compiling transcode.c
compiling transient_heap.c
compiling util.c
compiling variable.c
compiling vm.c
compiling vm_backtrace.c
compiling vm_dump.c
compiling vm_sync.c
1 warning generated.
compiling vm_trace.c
compiling ./missing/explicit_bzero.c
compiling ./missing/setproctitle.c
compiling ./missing/finite.c
compiling addr2line.c
compiling dmyenc.c
compiling dln.c
compiling localeinit.c
config.status: creating ruby-runner.h
compiling array.c
compiling mjit.c
assembling coroutine/arm64/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
./revision.h unchanged
compiling version.c
linking miniruby
Undefined symbols for architecture arm64:
  "_coroutine_transfer", referenced from:
      _fiber_setcontext in cont.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [miniruby] Error 1

Updated by lihansey (lihansey163@163.com li) about 3 years ago

Also try

RUBYOPT="-rrubygems $RUBYOPT" ./configure rb_cv_symbol_prefix=_ --with-coroutine=ucontext --prefix="$PREFIX_PATH" "${configure_opts[@]}" 

and

RUBYOPT="-rrubygems $RUBYOPT" ./configure rb_cv_symbol_prefix=_ --prefix="$PREFIX_PATH" "${configure_opts[@]}" 

but not working. Does miss sth configuration? Thanks.

Actions #3

Updated by mame (Yusuke Endoh) about 3 years ago

  • Related to Bug #18019: 3.0.X fails to link on Mac OS X 10.15.7 due to linker error related to _coroutine_transfer added

Updated by mame (Yusuke Endoh) about 3 years ago

  • Status changed from Open to Feedback

Perhaps this is the same issue as #18019. Please upgrade binutils and give it a retry.

Updated by lihansey (lihansey163@163.com li) about 3 years ago

mame (Yusuke Endoh) wrote in #note-4:

Perhaps this is the same issue as #18019. Please upgrade binutils and give it a retry.

after brew install binutils && brew update binutils everything is ok for ruby 3.0.4.

But ruby 3.1.2 still compiled fail on apple mini m1 (arm64 apple silicon), here is the log (ruby-build.20220422083034.6251.log).

Updated by lihansey (lihansey163@163.com li) about 3 years ago

  • ruby 3.1.2 still compiled fail on apple mini m1 (arm64 apple silicon)
arm64-darwin21-fake.rb updated
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems -r./arm64-darwin21-fake ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --ext-build-dir="./ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc"  --gnumake --install=all --rdoc-output=".ext/rdoc" --html-output=".ext/html"
installing binary commands:         /Users/lihanguang/.asdf/installs/ruby/3.1.2/bin
installing base libraries:          /Users/lihanguang/.asdf/installs/ruby/3.1.2/lib
installing arch files:              /Users/lihanguang/.asdf/installs/ruby/3.1.2/lib/ruby/3.1.0/arm64-darwin21
installing pkgconfig data:          /Users/lihanguang/.asdf/installs/ruby/3.1.2/lib/pkgconfig
installing extension objects:       /Users/lihanguang/.asdf/installs/ruby/3.1.2/lib/ruby/3.1.0/arm64-darwin21
installing extension objects:       /Users/lihanguang/.asdf/installs/ruby/3.1.2/lib/ruby/site_ruby/3.1.0/arm64-darwin21
installing extension objects:       /Users/lihanguang/.asdf/installs/ruby/3.1.2/lib/ruby/vendor_ruby/3.1.0/arm64-darwin21
installing extension headers:       /Users/lihanguang/.asdf/installs/ruby/3.1.2/include/ruby-3.1.0/arm64-darwin21
installing extension scripts:       /Users/lihanguang/.asdf/installs/ruby/3.1.2/lib/ruby/3.1.0
installing extension scripts:       /Users/lihanguang/.asdf/installs/ruby/3.1.2/lib/ruby/site_ruby/3.1.0
installing extension scripts:       /Users/lihanguang/.asdf/installs/ruby/3.1.2/lib/ruby/vendor_ruby/3.1.0
installing extension headers:       /Users/lihanguang/.asdf/installs/ruby/3.1.2/include/ruby-3.1.0/ruby
installing rdoc:                    /Users/lihanguang/.asdf/installs/ruby/3.1.2/share/ri/3.1.0/system
installing html-docs:               /Users/lihanguang/.asdf/installs/ruby/3.1.2/share/doc/ruby
installing capi-docs:               /Users/lihanguang/.asdf/installs/ruby/3.1.2/share/doc/ruby
installing command scripts:         /Users/lihanguang/.asdf/installs/ruby/3.1.2/bin
installing library scripts:         /Users/lihanguang/.asdf/installs/ruby/3.1.2/lib/ruby/3.1.0
installing common headers:          /Users/lihanguang/.asdf/installs/ruby/3.1.2/include/ruby-3.1.0
installing manpages:                /Users/lihanguang/.asdf/installs/ruby/3.1.2/share/man/man1
installing default gems from lib:   /Users/lihanguang/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0
                                    abbrev 0.1.0
                                    base64 0.1.1
                                    benchmark 0.2.0
                                    bundler 2.3.7
                                    cgi 0.3.1
                                    csv 3.2.2
                                    delegate 0.2.0
                                    did_you_mean 1.6.1
                                    drb 2.1.0
                                    english 0.7.1
                                    erb 2.2.3
                                    error_highlight 0.3.0
                                    fileutils 1.6.0
                                    find 0.1.1
                                    forwardable 1.3.2
                                    getoptlong 0.1.1
                                    ipaddr 1.2.4
                                    irb 1.4.1
                                    logger 1.5.0
                                    mutex_m 0.1.1
                                    net-http 0.2.0
                                    net-protocol 0.1.2
                                    observer 0.1.1
                                    open-uri 0.2.0
                                    open3 0.1.1
                                    optparse 0.2.0
                                    ostruct 0.5.2
                                    pp 0.3.0
                                    prettyprint 0.1.1
                                    pstore 0.1.1
                                    racc 1.6.0
                                    rdoc 6.4.0
                                    readline 0.0.3
                                    reline 0.3.0
                                    resolv 0.2.1
                                    resolv-replace 0.1.0
                                    rinda 0.1.1
                                    ruby2_keywords 0.0.5
                                    securerandom 0.1.1
                                    set 1.0.2
                                    shellwords 0.1.0
                                    singleton 0.1.1
                                    tempfile 0.1.2
                                    time 0.2.0
                                    timeout 0.2.0
                                    tmpdir 0.1.2
                                    tsort 0.1.0
                                    un 0.2.0
                                    uri 0.11.0
                                    weakref 0.1.1
                                    yaml 0.2.0
installing default gems from ext:   /Users/lihanguang/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0
                                    bigdecimal 3.1.1
                                    date 3.2.2
                                    digest 3.1.0
                                    etc 1.3.0
                                    fcntl 1.0.1
                                    fiddle 1.1.0
                                    io-console 0.5.11
                                    io-nonblock 0.1.0
                                    io-wait 0.2.1
                                    json 2.6.1
                                    nkf 0.1.1
                                    openssl 3.0.0
                                    pathname 0.2.0
                                    psych 4.0.3
                                    readline-ext 0.1.4
                                    stringio 3.0.1
                                    strscan 3.0.1
                                    syslog 0.1.0
                                    zlib 2.1.1
installing bundled gems:            /Users/lihanguang/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0
                                    minitest 5.15.0
                                    power_assert 2.0.1
                                    rake 13.0.6
                                    test-unit 3.5.3
                                    rexml 3.2.5
                                    rss 0.2.9
                                    net-ftp 0.1.3
                                    net-imap 0.2.3
                                    net-pop 0.1.1
                                    net-smtp 0.3.1
                                    matrix 0.4.2
                                    prime 0.1.2
                                    rbs 2.1.0
Building native extensions. This could take a while...
/private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/ext/builder.rb:95:in `run': ERROR: Failed to build gem native extension. (Gem::Ext::BuildError)

    current directory: /Users/lihanguang/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rbs-2.1.0/ext/rbs_extension
/Users/lihanguang/.asdf/installs/ruby/3.1.2/bin/ruby --disable\\=gems -I/Users/lihanguang/.asdf/installs/ruby/3.1.2/lib/ruby/3.1.0/arm64-darwin21 -I /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib -r ./siteconf20220422-44408-v4z9s0.rb extconf.rb
creating Makefile

current directory: /Users/lihanguang/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rbs-2.1.0/ext/rbs_extension
make DESTDIR\\= clean
dyld[44413]: terminating because inserted dylib '/private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/libruby.3.1.dylib' could not be loaded: tried: '/private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/libruby.3.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e'))
dyld[44413]: tried: '/private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/libruby.3.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e'))

current directory: /Users/lihanguang/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rbs-2.1.0/ext/rbs_extension
make DESTDIR\\=
dyld[44414]: terminating because inserted dylib '/private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/libruby.3.1.dylib' could not be loaded: tried: '/private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/libruby.3.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e'))
dyld[44414]: tried: '/private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/libruby.3.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e'))

make failed, uncaught signal 6

Gem files will remain installed in /Users/lihanguang/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rbs-2.1.0 for inspection.
Results logged to /Users/lihanguang/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/extensions/arm64-darwin-21/3.1.0/rbs-2.1.0/gem_make.out
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/ext/builder.rb:44:in `block in make'
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/ext/builder.rb:36:in `each'
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/ext/builder.rb:36:in `make'
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/ext/ext_conf_builder.rb:63:in `block in build'
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/tempfile.rb:317:in `open'
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/ext/ext_conf_builder.rb:26:in `build'
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/ext/builder.rb:161:in `build_extension'
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/ext/builder.rb:195:in `block in build_extensions'
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/ext/builder.rb:192:in `each'
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/ext/builder.rb:192:in `build_extensions'
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/installer.rb:853:in `build_extensions'
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/installer.rb:328:in `install'
	from ./tool/rbinstall.rb:899:in `block in install'
	from ./tool/rbinstall.rb:713:in `no_write'
	from ./tool/rbinstall.rb:899:in `install'
	from ./tool/rbinstall.rb:1068:in `block (2 levels) in <main>'
	from ./tool/rbinstall.rb:1043:in `foreach'
	from ./tool/rbinstall.rb:1043:in `block in <main>'
	from ./tool/rbinstall.rb:1127:in `block in <main>'
	from ./tool/rbinstall.rb:1124:in `each'
	from ./tool/rbinstall.rb:1124:in `<main>'
/private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/ext/builder.rb:95:in `run': make failed, uncaught signal 6 (Gem::InstallError)
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/ext/builder.rb:44:in `block in make'
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/ext/builder.rb:36:in `each'
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/ext/builder.rb:36:in `make'
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/ext/ext_conf_builder.rb:63:in `block in build'
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/tempfile.rb:317:in `open'
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/ext/ext_conf_builder.rb:26:in `build'
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/ext/builder.rb:161:in `build_extension'
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/ext/builder.rb:195:in `block in build_extensions'
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/ext/builder.rb:192:in `each'
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/ext/builder.rb:192:in `build_extensions'
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/installer.rb:853:in `build_extensions'
	from /private/var/folders/kj/72rrmbhn7hg4g9z96x_y56r80000gn/T/ruby-build.20220422083034.6251.KlC0KZ/ruby-3.1.2/lib/rubygems/installer.rb:328:in `install'
	from ./tool/rbinstall.rb:899:in `block in install'
	from ./tool/rbinstall.rb:713:in `no_write'
	from ./tool/rbinstall.rb:899:in `install'
	from ./tool/rbinstall.rb:1068:in `block (2 levels) in <main>'
	from ./tool/rbinstall.rb:1043:in `foreach'
	from ./tool/rbinstall.rb:1043:in `block in <main>'
	from ./tool/rbinstall.rb:1127:in `block in <main>'
	from ./tool/rbinstall.rb:1124:in `each'
	from ./tool/rbinstall.rb:1124:in `<main>'
make: *** [do-install-all] Error 1

Updated by mame (Yusuke Endoh) about 3 years ago

  • Status changed from Feedback to Closed

Thank you for confirmation. Closing.

But ruby 3.1.2 still compiled fail on apple mini m1 (arm64 apple silicon),

It is a different problem from this ticket. It looks like that it happens only on ruby-build. See:

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0