Can't install on mac os arm Mac OS Sonoma 14.4
douglasom opened this issue · comments
gem install debase -v 0.2.5.beta2
- Macbook Pro M1 Pro
- Mac OS 14.4
- Ruby 3.3.0 (same error happens on Ruby 2.7.8)
compiling debase_internals.c
debase_internals.c:319:25: warning: initializing 'rb_control_frame_t *' (aka 'struct rb_control_frame_struct *') with an expression of type 'const rb_control_frame_t *' (aka 'const struct rb_control_frame_struct
*') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
rb_control_frame_t *start_cfp = RUBY_VM_END_CONTROL_FRAME(TH_INFO(thread));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
debase_internals.c:770:3: error: incompatible function pointer types passing 'void (VALUE, VALUE)' (aka 'void (unsigned long, unsigned long)') to parameter of type 'VALUE (*)(VALUE, VALUE)' (aka 'unsigned long
(*)(unsigned long, unsigned long)') [-Wincompatible-function-pointer-types]
rb_define_module_function(mDebase, "set_trace_flag_to_iseq", Debase_set_trace_flag_to_iseq, 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/douglas/.asdf/installs/ruby/3.3.0/include/ruby-3.3.0/ruby/internal/anyargs.h:338:142: note: expanded from macro 'rb_define_module_function'
#define rb_define_module_function(mod, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_module_function((arity), (func))((mod), (mid), (func), (arity))
^~~~~~
/Users/douglas/.asdf/installs/ruby/3.3.0/include/ruby-3.3.0/ruby/internal/anyargs.h:274:1: note: passing argument to parameter here
RBIMPL_ANYARGS_DECL(rb_define_module_function, VALUE, const char *)
^
/Users/douglas/.asdf/installs/ruby/3.3.0/include/ruby-3.3.0/ruby/internal/anyargs.h:256:72: note: expanded from macro 'RBIMPL_ANYARGS_DECL'
RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _01(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); \
^
debase_internals.c:773:3: error: incompatible function pointer types passing 'void (VALUE, VALUE)' (aka 'void (unsigned long, unsigned long)') to parameter of type 'VALUE (*)(VALUE, VALUE)' (aka 'unsigned long
(*)(unsigned long, unsigned long)') [-Wincompatible-function-pointer-types]
rb_define_module_function(mDebase, "unset_iseq_flags", Debase_unset_trace_flags, 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/douglas/.asdf/installs/ruby/3.3.0/include/ruby-3.3.0/ruby/internal/anyargs.h:338:142: note: expanded from macro 'rb_define_module_function'
#define rb_define_module_function(mod, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_module_function((arity), (func))((mod), (mid), (func), (arity))
^~~~~~
/Users/douglas/.asdf/installs/ruby/3.3.0/include/ruby-3.3.0/ruby/internal/anyargs.h:274:1: note: passing argument to parameter here
RBIMPL_ANYARGS_DECL(rb_define_module_function, VALUE, const char *)
^
/Users/douglas/.asdf/installs/ruby/3.3.0/include/ruby-3.3.0/ruby/internal/anyargs.h:256:72: note: expanded from macro 'RBIMPL_ANYARGS_DECL'
RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _01(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); \
^
1 warning and 2 errors generated.
make: *** [debase_internals.o] Error 1
make failed, exit code 2
I had some success by reducing that error to a warning with:
bundle config build.debase --global "--with-cflags=-Wno-error=incompatible-function-pointer-types"
May have needed a gem pristine debase --version 0.2.5.beta2
afterwards, hard to tell.
Try this
gem install debase -v 0.2.5.beta2 -- --with-cflags=-Wno-incompatible-function-pointer-types
I had some success by reducing that error to a warning with:
bundle config build.debase --global "--with-cflags=-Wno-error=incompatible-function-pointer-types"
May have needed a
gem pristine debase --version 0.2.5.beta2
afterwards, hard to tell.
Yes this helped me too
I had some luck using Xcode command line tools version 15.1 rather than version 15.3
My issue on bundle install
was bundler version 2.5.7
. Rolling back to 2.5.6
and using 0.2.5.beta2
worked for me.
My issue on
bundle install
was bundler version2.5.7
. Rolling back to2.5.6
and using0.2.5.beta2
worked for me.
macOS: Sonoma 14.4.1
Ruby: 3.3.0
This workaround don't worked for me, I got the same errors again. I tried all versions from 2.5.7 to 2.5.9, all the same result.