I've googled this issue for hours now and give up. I've tried all the solutions I could find online yet I am unable to use frum to install any Ruby versions. A log is below.
My setup:
Macbook Air M2
frum v0.1.2
> arch -arm64 frum install 2.7.5
==> Downloading https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.5.tar.xz
==> Extracting ruby-2.7.5.tar.xz
==> Building Ruby 2.7.5
error: Can't build Ruby: make failed: . ./vm_opts.h
In file included from cont.c:16:
./mjit.h:131:17: warning: cast to smaller integer type 'enum rb_mjit_iseq_func' from 'mjit_func_t' (aka 'unsigned long (*)(struct rb_execution_context_struct *, struct rb_control_frame_struct *)') [-Wpointer-to-enum-cast]
switch ((enum rb_mjit_iseq_func)func) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
In file included from eval.c:20:
./mjit.h:131:17: warning: cast to smaller integer type 'enum rb_mjit_iseq_func' from 'mjit_func_t' (aka 'unsigned long (*)(struct rb_execution_context_struct *, struct rb_control_frame_struct *)') [-Wpointer-to-enum-cast]
switch ((enum rb_mjit_iseq_func)func) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from gc.c:41:
./mjit.h:131:17: warning: cast to smaller integer type 'enum rb_mjit_iseq_func' from 'mjit_func_t' (aka 'unsigned long (*)(struct rb_execution_context_struct *, struct rb_control_frame_struct *)') [-Wpointer-to-enum-cast]
switch ((enum rb_mjit_iseq_func)func) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
In file included from iseq.c:30:
./mjit.h:131:17: warning: cast to smaller integer type 'enum rb_mjit_iseq_func' from 'mjit_func_t' (aka 'unsigned long (*)(struct rb_execution_context_struct *, struct rb_control_frame_struct *)') [-Wpointer-to-enum-cast]
switch ((enum rb_mjit_iseq_func)func) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from mjit_compile.c:19:
./mjit.h:131:17: warning: cast to smaller integer type 'enum rb_mjit_iseq_func' from 'mjit_func_t' (aka 'unsigned long (*)(struct rb_execution_context_struct *, struct rb_control_frame_struct *)') [-Wpointer-to-enum-cast]
switch ((enum rb_mjit_iseq_func)func) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
1 warning generated.
1 warning generated.
In file included from ruby.c:55:
./mjit.h:131:17: warning: cast to smaller integer type 'enum rb_mjit_iseq_func' from 'mjit_func_t' (aka 'unsigned long (*)(struct rb_execution_context_struct *, struct rb_control_frame_struct *)') [-Wpointer-to-enum-cast]
switch ((enum rb_mjit_iseq_func)func) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
In file included from thread.c:77:
./mjit.h:131:17: warning: cast to smaller integer type 'enum rb_mjit_iseq_func' from 'mjit_func_t' (aka 'unsigned long (*)(struct rb_execution_context_struct *, struct rb_control_frame_struct *)') [-Wpointer-to-enum-cast]
switch ((enum rb_mjit_iseq_func)func) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from vm.c:341:
./mjit.h:131:17: warning: cast to smaller integer type 'enum rb_mjit_iseq_func' from 'mjit_func_t' (aka 'unsigned long (*)(struct rb_execution_context_struct *, struct rb_control_frame_struct *)') [-Wpointer-to-enum-cast]
switch ((enum rb_mjit_iseq_func)func) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from vm.c:350:
./vm_method.c:291:32: warning: cast to smaller integer type 'enum method_optimized_type' from 'void *' [-Wvoid-pointer-to-enum-cast]
def->body.optimize_type = (enum method_optimized_type)opts;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from vm_trace.c:28:
./mjit.h:131:17: warning: cast to smaller integer type 'enum rb_mjit_iseq_func' from 'mjit_func_t' (aka 'unsigned long (*)(struct rb_execution_context_struct *, struct rb_control_frame_struct *)') [-Wpointer-to-enum-cast]
switch ((enum rb_mjit_iseq_func)func) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
1 warning generated.
array.c:290:17: warning: expression result unused [-Wunused-value]
RB_OBJ_WRITE(buff_owner_ary, &ptr[i+beg], argv[i]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./internal.h:2711:34: note: expanded from macro 'RB_OBJ_WRITE'
#define RB_OBJ_WRITE(a, slot, b) UNALIGNED_MEMBER_ACCESS(rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./internal.h:2703:5: note: expanded from macro 'UNALIGNED_MEMBER_ACCESS'
unaligned_member_access_result; \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/ruby/ruby.h:1087:5: note: expanded from macro 'RARRAY_PTR_USE_TRANSIENT'
expr; \
^~~~
In file included from mjit.c:18:
In file included from ./mjit_worker.c:76:
./mjit.h:131:17: warning: cast to smaller integer type 'enum rb_mjit_iseq_func' from 'mjit_func_t' (aka 'unsigned long (*)(struct rb_execution_context_struct *, struct rb_control_frame_struct *)') [-Wpointer-to-enum-cast]
switch ((enum rb_mjit_iseq_func)func) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
array.c:1200:2: warning: expression result unused [-Wunused-value]
RB_OBJ_WRITE(target_ary, &ptr[idx], item);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./internal.h:2711:34: note: expanded from macro 'RB_OBJ_WRITE'
#define RB_OBJ_WRITE(a, slot, b) UNALIGNED_MEMBER_ACCESS(rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./internal.h:2703:5: note: expanded from macro 'UNALIGNED_MEMBER_ACCESS'
unaligned_member_access_result; \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/ruby/ruby.h:1087:5: note: expanded from macro 'RARRAY_PTR_USE_TRANSIENT'
expr; \
^~~~
1 warning generated.
In file included from version.c:15:
./mjit.h:131:17: warning: cast to smaller integer type 'enum rb_mjit_iseq_func' from 'mjit_func_t' (aka 'unsigned long (*)(struct rb_execution_context_struct *, struct rb_control_frame_struct *)') [-Wpointer-to-enum-cast]
switch ((enum rb_mjit_iseq_func)func) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
2 warnings generated.
2 warnings generated.
ln -sf ../../../.ext/include/arm64-darwin21/rb_mjit_min_header-2.7.5.h include/ruby-2.7.0/arm64-darwin21/rb_mjit_min_header-2.7.5.h
Undefined symbols for architecture arm64:
"_rb_enc_set_base", referenced from:
_Init_encdb in encdb.o
"_rb_enc_set_dummy", referenced from:
_Init_encdb in encdb.o
"_rb_encdb_alias", referenced from:
_Init_encdb in encdb.o
"_rb_encdb_declare", referenced from:
_Init_encdb in encdb.o
"_rb_encdb_dummy", referenced from:
_Init_encdb in encdb.o
"_rb_encdb_replicate", referenced from:
_Init_encdb in encdb.o
"_rb_encdb_set_unicode", referenced from:
_Init_encdb in encdb.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [.ext/arm64-darwin21/enc/encdb.bundle] Error 1
make: *** [enc] Error 2
make: *** Waiting for unfinished jobs....
Undefined symbols for architecture arm64:
"_rb_declare_transcoder", referenced from:
_Init_transdb in transdb.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [.ext/arm64-darwin21/enc/trans/transdb.bundle] Error 1
make[1]: *** Waiting for unfinished jobs....
Undefined symbols for architecture arm64:
"_rb_register_transcoder", referenced from:
_Init_big5 in big5.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [.ext/arm64-darwin21/enc/trans/big5.bundle] Error 1
Undefined symbols for architecture arm64:
"_rb_register_transcoder", referenced from:
_Init_cesu_8 in cesu_8.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [.ext/arm64-darwin21/enc/trans/cesu_8.bundle] Error 1
make: *** [trans] Error 2
libffi_version: 3.4.0