rbenv install 3.3.1 - BUILD FAILED macOS 14.4.1 on arm64 (M1) using ruby-build 20240517 #2387
-
Hi everybody! Unfortunately no 3.3.x version compiles for me successfully so far on my M1 from 2020. What I already tried
Terminal output(base) ➜ ~ rbenv install 3.3.1
ruby-build: using openssl@3 from homebrew
==> Downloading ruby-3.3.1.tar.gz...
-> curl -q -fL -o ruby-3.3.1.tar.gz https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.1.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 27 21.0M 27 5867k 0 0 5175k 0 0:00:04 0:00:01 0:00:03 51 58 21.0M 58 12.3M 0 0 5932k 0 0:00:03 0:00:02 0:00:01 59 90 21.0M 90 19.0M 0 0 6231k 0 0:00:03 0:00:03 --:--:-- 62100 21.0M 100 21.0M 0 0 6301k 0 0:00:03 0:00:03 --:--:-- 6301k
==> Installing ruby-3.3.1...
ruby-build: using libyaml from homebrew
ruby-build: using gmp from homebrew
-> ./configure "--prefix=$HOME/.rbenv/versions/3.3.1" --with-openssl-dir=/opt/homebrew/opt/openssl@3 --enable-shared --with-libyaml-dir=/opt/homebrew/opt/libyaml --with-gmp-dir=/opt/homebrew/opt/gmp --with-ext=openssl,psych,+
-> make -j 8
BUILD FAILED (macOS 14.4.1 on arm64 using ruby-build 20240517)
You can inspect the build directory at /var/folders/8b/k47_f0k91gqfjx39_87mh_xw0000gp/T/ruby-build.20240521214821.32555.1jrgrW
See the full build log at /var/folders/8b/k47_f0k91gqfjx39_87mh_xw0000gp/T/ruby-build.20240521214821.32555.log
(base) ➜ ~
BUILD FAILED (macOS 14.4.1 on arm64 using ruby-build 20240517)
Build log detailstouch yjit/target/release/libyjit.a
error: /Users/robinstammer/.pyenv/versions/miniconda3-latest/bin/arm64-apple-darwin20.0.0-nm: invalid argument --
Usage: /Users/robinstammer/.pyenv/versions/miniconda3-latest/bin/arm64-apple-darwin20.0.0-nm [-agnopruUmxjlfAPL[s segname sectname] [-] [-t format] [[-arch <arch_flag>] ...] [file ...]
partial linking yjit/target/release/libyjit.a into yjit/target/release/libyjit.o
linking miniruby
Undefined symbols for architecture arm64:
"_rb_yjit_before_ractor_spawn", referenced from:
_ractor_create in ractor.o
"_rb_yjit_bop_redefined", referenced from:
_rb_vm_check_redefinition_opt_method in vm.o
"_rb_yjit_call_threshold", referenced from:
_rb_vm_exec in vm.o
_vm_exec_core in vm.o
"_rb_yjit_cme_invalidate", referenced from:
_clear_method_cache_by_id_in_class in vm.o
_invalidate_negative_cache in vm.o
_vm_cme_invalidate in vm.o
"_rb_yjit_code_gc", referenced from:
_Init_builtin_yjit.yjit_table in yjit.o
"_rb_yjit_cold_threshold", referenced from:
_rb_vm_exec in vm.o
_vm_exec_core in vm.o
"_rb_yjit_constant_ic_update", referenced from:
_rb_vm_opt_getconstant_path in vm.o
"_rb_yjit_constant_state_changed", referenced from:
_rb_clear_constant_cache_for_id in vm.o
"_rb_yjit_disasm_iseq", referenced from:
_Init_builtin_yjit.yjit_table in yjit.o
"_rb_yjit_enable", referenced from:
_Init_builtin_yjit.yjit_table in yjit.o
"_rb_yjit_enabled_p", referenced from:
_rb_vm_exec in vm.o
_vm_exec_core in vm.o
_clear_method_cache_by_id_in_class in vm.o
_builtin_inline_class_13 in yjit.o
"_rb_yjit_get_exit_locations", referenced from:
_Init_builtin_yjit.yjit_table in yjit.o
"_rb_yjit_get_stats", referenced from:
_Init_builtin_yjit.yjit_table in yjit.o
"_rb_yjit_incr_counter", referenced from:
_rb_vm_exec in vm.o
_vm_exec_core in vm.o
"_rb_yjit_init", referenced from:
_ruby_opt_init in ruby.o
(maybe you meant: _rb_yjit_init_gc_hooks)
"_rb_yjit_insns_compiled", referenced from:
_Init_builtin_yjit.yjit_table in yjit.o
"_rb_yjit_iseq_free", referenced from:
_rb_iseq_free in iseq.o
"_rb_yjit_iseq_gen_entry_point", referenced from:
_rb_yjit_compile_iseq in yjit.o
"_rb_yjit_iseq_mark", referenced from:
_rb_iseq_mark_and_move in iseq.o
"_rb_yjit_iseq_update_references", referenced from:
_rb_iseq_mark_and_move in iseq.o
"_rb_yjit_live_iseq_count", referenced from:
_iseq_setup in compile.o
_rb_ibf_load_iseq_complete in compile.o
_rb_iseq_free in iseq.o
"_rb_yjit_parse_option", referenced from:
_setup_yjit_options in ruby.o
"_rb_yjit_print_stats_p", referenced from:
_Init_builtin_yjit.yjit_table in yjit.o
"_rb_yjit_reset_stats_bang", referenced from:
_Init_builtin_yjit.yjit_table in yjit.o
"_rb_yjit_root_mark", referenced from:
_yjit_root_type in yjit.o
"_rb_yjit_show_usage", referenced from:
_ruby_process_options in ruby.o
"_rb_yjit_simulate_oom_bang", referenced from:
_Init_builtin_yjit.yjit_table in yjit.o
"_rb_yjit_stats_enabled_p", referenced from:
_Init_builtin_yjit.yjit_table in yjit.o
"_rb_yjit_trace_exit_locations_enabled_p", referenced from:
_Init_builtin_yjit.yjit_table in yjit.o
"_rb_yjit_tracing_invalidate_all", referenced from:
_tracepoint_enable_m in vm_trace.o
_update_global_event_hook in vm_trace.o
ld: symbol(s) not found for architecture arm64
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [miniruby] Error 1
e full log file - ruby-build.20240521214821.32555.log Thanks for your help 👋 |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 4 replies
-
I am also experiencing the same problem 😭😭 Did you find a solution? |
Beta Was this translation helpful? Give feedback.
-
Can you disable |
Beta Was this translation helpful? Give feedback.
-
For the record, I had the same issue about # >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/xxxxxxx/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/xxxxxxx/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/xxxxxxx/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/Users/xxxxxxx/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<< |
Beta Was this translation helpful? Give feedback.
-
I also got the same issue when install ruby 3.3.3. |
Beta Was this translation helpful? Give feedback.
-
I am facing issue
|
Beta Was this translation helpful? Give feedback.
-
This is just for other people hitting this issue and getting to this discussion: You dont need to uninstall Anaconda, just disable the default env for a bit: Then do your ruby installation and reenable conda: Make sure, to open a new shell/terminal after you put the config to False. |
Beta Was this translation helpful? Give feedback.
Can you disable
nm
command provided by pyenv temporally? Ruby only support the official toolchains byXcode
in macOS platform.