Ruby 3.0.0 compatibilty
Govinda-Fichtner opened this issue · comments
I am currently getting the following error when I try to install debase:
# gem install debase
Building native extensions. This could take a while...
ERROR: Error installing debase:
ERROR: Failed to build gem native extension.
current directory: /usr/local/bundle/gems/debase-0.2.4.1/ext
/root/.rbenv/versions/3.0.0/bin/ruby -I /root/.rbenv/versions/3.0.0/lib/ruby/3.0.0 -r ./siteconf20201226-13989-9lckur.rb extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
**************************************************************************
No source for ruby-3.0.0-p0 (revision 95aff214687a5e12c3eb57d056665741e734c188) provided with
debase-ruby_core_source gem. Falling back to ruby-3.0.0-preview1.
**************************************************************************
checking for vm_core.h... yes
checking for iseq.h... yes
checking for version.h... yes
checking for vm_core.h... yes
checking for vm_insnhelper.h... yes
checking for vm_core.h... yes
checking for method.h... yes
creating Makefile
current directory: /usr/local/bundle/gems/debase-0.2.4.1/ext
make "DESTDIR=" clean
current directory: /usr/local/bundle/gems/debase-0.2.4.1/ext
make "DESTDIR="
compiling breakpoint.c
compiling context.c
compiling debase_internals.c
In file included from ./hacks.h:1,
from debase_internals.c:2:
/usr/local/bundle/gems/debase-ruby_core_source-0.10.11/lib/debase/ruby_core_source/ruby-3.0.0-preview1/vm_core.h:1617:21: error: expected declaration specifiers or '...' before '*' token
1617 | typedef RETSIGTYPE (*ruby_sighandler_t)(int);
| ^
In file included from /root/.rbenv/versions/3.0.0/include/ruby-3.0.0/ruby/defines.h:73,
from /root/.rbenv/versions/3.0.0/include/ruby-3.0.0/ruby/ruby.h:23,
from /root/.rbenv/versions/3.0.0/include/ruby-3.0.0/ruby.h:38,
from ./debase_internals.h:4,
from debase_internals.c:1:
/usr/local/bundle/gems/debase-ruby_core_source-0.10.11/lib/debase/ruby_core_source/ruby-3.0.0-preview1/vm_core.h:1618:39: error: unknown type name 'ruby_sighandler_t'; did you mean 'sighandler_t'?
1618 | NORETURN(void rb_bug_for_fatal_signal(ruby_sighandler_t default_sighandler, int sig, const void *, const char *fmt, ...));
| ^~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.0.0/include/ruby-3.0.0/ruby/backward/2/attributes.h:152:44: note: in definition of macro 'NORETURN'
152 | #define NORETURN(x) RBIMPL_ATTR_NORETURN() x
| ^
debase_internals.c: In function 'print_debug':
debase_internals.c:36:3: warning: function 'print_debug' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
36 | vfprintf(stderr, message, ap);
| ^~~~~~~~
debase_internals.c: In function 'try_disable_trace_points':
debase_internals.c:111:8: warning: implicit declaration of function 'RHASH_EMPTY_P' [-Wimplicit-function-declaration]
111 | if (!RHASH_EMPTY_P(catchpoints)) return;
| ^~~~~~~~~~~~~
debase_internals.c: In function 'count_stack_size':
debase_internals.c:319:37: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
319 | rb_control_frame_t *start_cfp = RUBY_VM_END_CONTROL_FRAME(TH_INFO(thread));
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/.rbenv/versions/3.0.0/include/ruby-3.0.0/ruby/ruby.h:24,
from /root/.rbenv/versions/3.0.0/include/ruby-3.0.0/ruby.h:38,
from ./debase_internals.h:4,
from debase_internals.c:1:
debase_internals.c: In function 'Init_debase_internals':
/root/.rbenv/versions/3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:337:142: warning: passing argument 3 of 'rb_define_module_function_01' from incompatible pointer type [-Wincompatible-pointer-types]
337 | #define rb_define_module_function(mod, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_module_function((arity), (func))((mod), (mid), (func), (arity))
| ^~~~~~
| |
| void (*)(VALUE, VALUE) {aka void (*)(long unsigned int, long unsigned int)}
debase_internals.c:768:3: note: in expansion of macro 'rb_define_module_function'
768 | rb_define_module_function(mDebase, "set_trace_flag_to_iseq", Debase_set_trace_flag_to_iseq, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:273:21: note: expected 'VALUE (*)(VALUE, VALUE)' {aka 'long unsigned int (*)(long unsigned int, long unsigned int)'} but argument is of type 'void (*)(VALUE, VALUE)' {aka 'void (*)(long unsigned int, long unsigned int)'}
273 | RBIMPL_ANYARGS_DECL(rb_define_module_function, VALUE, const char *)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:255:41: note: in definition of macro 'RBIMPL_ANYARGS_DECL'
255 | RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _01(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); \
| ^~~
/root/.rbenv/versions/3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:337:142: warning: passing argument 3 of 'rb_define_module_function_01' from incompatible pointer type [-Wincompatible-pointer-types]
337 | #define rb_define_module_function(mod, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_module_function((arity), (func))((mod), (mid), (func), (arity))
| ^~~~~~
| |
| void (*)(VALUE, VALUE) {aka void (*)(long unsigned int, long unsigned int)}
debase_internals.c:771:3: note: in expansion of macro 'rb_define_module_function'
771 | rb_define_module_function(mDebase, "unset_iseq_flags", Debase_unset_trace_flags, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:273:21: note: expected 'VALUE (*)(VALUE, VALUE)' {aka 'long unsigned int (*)(long unsigned int, long unsigned int)'} but argument is of type 'void (*)(VALUE, VALUE)' {aka 'void (*)(long unsigned int, long unsigned int)'}
273 | RBIMPL_ANYARGS_DECL(rb_define_module_function, VALUE, const char *)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/root/.rbenv/versions/3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:255:41: note: in definition of macro 'RBIMPL_ANYARGS_DECL'
255 | RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _01(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); \
| ^~~
debase_internals.c: At top level:
cc1: warning: unrecognized command line option '-Wno-self-assign'
cc1: warning: unrecognized command line option '-Wno-parentheses-equality'
cc1: warning: unrecognized command line option '-Wno-constant-logical-operand'
make: *** [Makefile:245: debase_internals.o] Error 1
make failed, exit code 2
Gem files will remain installed in /usr/local/bundle/gems/debase-0.2.4.1 for inspection.
Results logged to /usr/local/bundle/extensions/x86_64-linux-musl/3.0.0/debase-0.2.4.1/gem_make.out
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?
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 :/