ruby-debug / ruby-debug-ide

An interface which glues ruby-debug to IDEs like Eclipse (RDT), NetBeans and RubyMine.
https://www.jetbrains.com/ruby/features/ruby_debugger.html
Other
373 stars 83 forks source link

ruby-debug-ide 0.7.2 not installing on Ruby 3.0.0 (Windows 10) #210

Open marcoXbresciani opened 3 years ago

marcoXbresciani commented 3 years ago

Hello, not sure why (I'm still a Ruby newbie), but running gem install ruby-debug-ide on Windows 10, with Ruby 3.0 does not work. It worked fine with Ruby 2.7.x.

F:\Programmi\wwwjdic>gem install ruby-debug-ide
Fetching ruby-debug-ide-0.7.2.gem
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR:  Error installing ruby-debug-ide:
        ERROR: Failed to build gem native extension.

    current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ruby-debug-ide-0.7.2/ext
C:/Ruby30-x64/bin/ruby.exe mkrf_conf.rb
Installing base gem
Building native extensions. This could take a while...
Building native extensions. This could take a while...
ERROR: Failed to build gem native extension.

    current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/debase-0.2.5.beta1/ext
C:/Ruby30-x64/bin/ruby.exe -I C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0 -r ./siteconf20210108-7656-ha4pio.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
creating Makefile

current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/debase-0.2.5.beta1/ext
make DESTDIR\= clean

current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/debase-0.2.5.beta1/ext
make DESTDIR\=
generating debase_internals-x64-mingw32.def
compiling breakpoint.c
compiling context.c
compiling debase_internals.c
In file included from ./hacks.h:1,
                 from debase_internals.c:2:
C:/Ruby30-x64/lib/ruby/gems/3.0.0/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 C:/Ruby30-x64/include/ruby-3.0.0/ruby/defines.h:73,
                 from C:/Ruby30-x64/include/ruby-3.0.0/ruby/ruby.h:23,
                 from C:/Ruby30-x64/include/ruby-3.0.0/ruby.h:38,
                 from ./debase_internals.h:4,
                 from debase_internals.c:1:
C:/Ruby30-x64/lib/ruby/gems/3.0.0/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'
 1618 | NORETURN(void rb_bug_for_fatal_signal(ruby_sighandler_t default_sighandler, int sig, const void *, const char *fmt, ...));
      |                                       ^~~~~~~~~~~~~~~~~
C:/Ruby30-x64/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 '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));
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~
debase_internals.c: In function 'Init_debase_internals':
debase_internals.c:768:64: warning: passing argument 3 of 'rb_define_module_function' from incompatible pointer type [-Wincompatible-pointer-types]
  768 |   rb_define_module_function(mDebase, "set_trace_flag_to_iseq", Debase_set_trace_flag_to_iseq, 1);
      |                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                |
      |                                                                void (*)(VALUE,  VALUE) {aka void (*)(long long unsigned int,  long long unsigned int)}
In file included from C:/Ruby30-x64/include/ruby-3.0.0/ruby/internal/anyargs.h:78,
                 from C:/Ruby30-x64/include/ruby-3.0.0/ruby/ruby.h:24,
                 from C:/Ruby30-x64/include/ruby-3.0.0/ruby.h:38,
                 from ./debase_internals.h:4,
                 from debase_internals.c:1:
C:/Ruby30-x64/include/ruby-3.0.0/ruby/internal/method.h:30:50: note: expected 'VALUE (*)()' {aka 'long long unsigned int (*)()'} but argument is of type 'void (*)(VALUE,  VALUE)' {aka 'void (*)(long long unsigned int,  long long unsigned int)'}
   30 | void rb_define_module_function(VALUE,const char*,VALUE(*)(ANYARGS),int);
      |                                                  ^~~~~~~~~~~~~~~~~
debase_internals.c:771:58: warning: passing argument 3 of 'rb_define_module_function' from incompatible pointer type [-Wincompatible-pointer-types]
  771 |   rb_define_module_function(mDebase, "unset_iseq_flags", Debase_unset_trace_flags, 1);
      |                                                          ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                                          |
      |                                                          void (*)(VALUE,  VALUE) {aka void (*)(long long unsigned int,  long long unsigned int)}
In file included from C:/Ruby30-x64/include/ruby-3.0.0/ruby/internal/anyargs.h:78,
                 from C:/Ruby30-x64/include/ruby-3.0.0/ruby/ruby.h:24,
                 from C:/Ruby30-x64/include/ruby-3.0.0/ruby.h:38,
                 from ./debase_internals.h:4,
                 from debase_internals.c:1:
C:/Ruby30-x64/include/ruby-3.0.0/ruby/internal/method.h:30:50: note: expected 'VALUE (*)()' {aka 'long long unsigned int (*)()'} but argument is of type 'void (*)(VALUE,  VALUE)' {aka 'void (*)(long long unsigned int,  long long unsigned int)'}
   30 | void rb_define_module_function(VALUE,const char*,VALUE(*)(ANYARGS),int);
      |                                                  ^~~~~~~~~~~~~~~~~
make: *** [Makefile:244: debase_internals.o] Errore 1

make failed, exit code 2

Gem files will remain installed in C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/debase-0.2.5.beta1 for inspection.
Results logged to C:/Ruby30-x64/lib/ruby/gems/3.0.0/extensions/x64-mingw32/3.0.0/debase-0.2.5.beta1/gem_make.out
C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/rubygems/ext/builder.rb:90:in `run'
  C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/rubygems/ext/builder.rb:42:in `block in make'
  C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/rubygems/ext/builder.rb:34:in `each'
  C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/rubygems/ext/builder.rb:34:in `make'
  C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:64:in `block in build'
  C:/Ruby30-x64/lib/ruby/3.0.0/tempfile.rb:317:in `open'
  C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:28:in `build'
  C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/rubygems/ext/builder.rb:156:in `build_extension'
  C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/rubygems/ext/builder.rb:190:in `block in build_extensions'
  C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/rubygems/ext/builder.rb:187:in `each'
  C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/rubygems/ext/builder.rb:187:in `build_extensions'
  C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/rubygems/installer.rb:821:in `build_extensions'
  C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/rubygems/installer.rb:312:in `install'
  C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/rubygems/resolver/specification.rb:104:in `install'
  C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/rubygems/request_set.rb:279:in `block in install_into'
  C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/rubygems/request_set.rb:271:in `each'
  C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/rubygems/request_set.rb:271:in `install_into'
  C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/rubygems/request_set.rb:147:in `install'
  C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/rubygems/dependency_installer.rb:252:in `install'
  mkrf_conf.rb:31:in `rescue in <main>'
  mkrf_conf.rb:24:in `<main>'

rake failed, exit code 1

Gem files will remain installed in C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ruby-debug-ide-0.7.2 for inspection.
Results logged to C:/Ruby30-x64/lib/ruby/gems/3.0.0/extensions/x64-mingw32/3.0.0/ruby-debug-ide-0.7.2/gem_make.out
phyzical commented 2 years ago

thought i would add i get similar issues for mac too

stellarpower commented 1 year ago

https://github.com/ruby-debug/debase/issues/92 Solution for me on linux is to update debase: gem install debase --version '0.2.5.beta2'