Closed Govinda-Fichtner closed 3 years ago
ruby3-compatible gem wasn't released yet.
@hurricup Is there already a beta version that one can test drive? Any expectations for when a ruby3 compatible gem could arrive?
Not yet
@hurricup no huge deal, but could we have a non-beta release?
Is there anything on the roadmap for the 0.2.5 (non-beta) release?
@EverardB for now main goal is to migrate from debase to the new debugging gem bundled with new ruby versions.
@EverardB for now main goal is to migrate from debase to the new debugging gem bundled with new ruby versions.
@hurricup Are you referring to the gem named debugging
? This one, right? https://rubygems.org/gems/debugging
Update: After looking at that gem more, I'm less confident that's the correct one :/
@BenSandeen no, https://github.com/ruby/debug
I am having a similar issue on my M2 Chip Mac ARM64 (Sonoma 14.4 & ruby 3.0.6p216 & xcode-select version 2406):
% gem install debase -v0.2.5.beta2
Fetching debase-ruby_core_source-3.3.1.gem
Fetching debase-0.2.5.beta2.gem
Successfully installed debase-ruby_core_source-3.3.1
Building native extensions. This could take a while...
ERROR: Error installing debase:
ERROR: Failed to build gem native extension.
current directory: ~/.rvm/gems/ruby-3.0.6@debase-temp/gems/debase-0.2.5.beta2/ext
~/.rvm/rubies/ruby-3.0.6/bin/ruby -I ~/.rvm/rubies/ruby-3.0.6/lib/ruby/3.0.0 -r ./siteconf20240321-87109-znf1i2.rb extconf.rb
checking for vm_core.h... yes
checking for iseq.h... yes
checking for version.h... yes
creating Makefile
current directory: ~/.rvm/gems/ruby-3.0.6@debase-temp/gems/debase-0.2.5.beta2/ext
make DESTDIR\= clean
current directory: ~/.rvm/gems/ruby-3.0.6@debase-temp/gems/debase-0.2.5.beta2/ext
make DESTDIR\=
compiling breakpoint.c
compiling context.c
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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~/.rvm/rubies/ruby-3.0.6/include/ruby-3.0.0/ruby/internal/anyargs.h:337: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))
^~~~~~
~/.rvm/rubies/ruby-3.0.6/include/ruby-3.0.0/ruby/internal/anyargs.h:273:1: note: passing argument to parameter here
RBIMPL_ANYARGS_DECL(rb_define_module_function, VALUE, const char *)
^
~/.rvm/rubies/ruby-3.0.6/include/ruby-3.0.0/ruby/internal/anyargs.h:255: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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~/.rvm/rubies/ruby-3.0.6/include/ruby-3.0.0/ruby/internal/anyargs.h:337: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))
^~~~~~
~/.rvm/rubies/ruby-3.0.6/include/ruby-3.0.0/ruby/internal/anyargs.h:273:1: note: passing argument to parameter here
RBIMPL_ANYARGS_DECL(rb_define_module_function, VALUE, const char *)
^
~/.rvm/rubies/ruby-3.0.6/include/ruby-3.0.0/ruby/internal/anyargs.h:255: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
Gem files will remain installed in ~/.rvm/gems/ruby-3.0.6@debase-temp/gems/debase-0.2.5.beta2 for inspection.
Results logged to ~/.rvm/gems/ruby-3.0.6@debase-temp/extensions/arm64-darwin-23/3.0.0/debase-0.2.5.beta2/gem_make.out
I was able to resolve the issue by installing the gem with cflags:
gem install debase -v0.2.5.beta2 -- --with-cflags="-Wno-incompatible-function-pointer-types"
Still, it would be better in the future if I didn't have to set those cflags and could install the gem normally instead.
By the way, one weird thing I discovered from a coworker who uses RubyMine (I don't, but share the same project that has the debase and ruby-debug-ide gems in the development gem group) is he has version 3.0.0.beta10 & 3.0.0.beta15 of debase and ruby-debug-ide respectively, which are NOT on rubygems.org as of today (2024-03-21).
I am currently getting the following error when I try to install debase:
I am getting this error with a standard alpine ruby image (ruby:3.0-rc-alpine) or by using a rbenv installed ruby version.
Any ideas how to fix it?