ruby-debug / debase

BSD 2-Clause "Simplified" License
209 stars 32 forks source link

ERROR: Failed to build gem native extension - Mac(Catalina)+RVM(ruby 2.5.8) #90

Closed karuppasamy closed 3 years ago

karuppasamy commented 4 years ago

Additional Information

gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.32.2)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Error:

mice@LB % rvm use 2.5.8 --default
Using /Users/mice/.rvm/gems/ruby-2.5.8

mice@LB % gem install ruby-debug-ide
Building native extensions. This could take a while...
ERROR:  Error installing ruby-debug-ide:
    ERROR: Failed to build gem native extension.

    current directory: /Users/mice/.rvm/gems/ruby-2.5.8/gems/ruby-debug-ide-0.7.2/ext
/Users/mice/.rvm/rubies/ruby-2.5.8/bin/ruby 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: /Users/mice/.rvm/gems/ruby-2.5.8/gems/debase-0.2.5.beta1/ext
/Users/mice/.rvm/rubies/ruby-2.5.8/bin/ruby -I /Users/mice/.rvm/rubies/ruby-2.5.8/lib/ruby/site_ruby/2.5.0 -r ./siteconf20201019-36014-qo4gxz.rb extconf.rb
checking for vm_core.h... yes
checking for iseq.h... yes
checking for version.h... yes
creating Makefile

current directory: /Users/mice/.rvm/gems/ruby-2.5.8/gems/debase-0.2.5.beta1/ext
make "DESTDIR=" clean

current directory: /Users/mice/.rvm/gems/ruby-2.5.8/gems/debase-0.2.5.beta1/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:697:24: warning: initializing 'rb_iseq_t *' (aka 'struct rb_iseq_struct *') with an expression of type 'const rb_iseq_t *' (aka 'const struct rb_iseq_struct *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
            rb_iseq_t *iseq = my_iseqw_check(rb_iseq);
                       ^      ~~~~~~~~~~~~~~~~~~~~~~~
debase_internals.c:700:17: error: implicit declaration of function 'rb_iseq_trace_set' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                rb_iseq_trace_set(iseq, RUBY_EVENT_TRACEPOINT_ALL);
                ^
debase_internals.c:708:24: warning: initializing 'rb_iseq_t *' (aka 'struct rb_iseq_struct *') with an expression of type 'const rb_iseq_t *' (aka 'const struct rb_iseq_struct *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
            rb_iseq_t *iseq = my_iseqw_check(rb_iseq);
                       ^      ~~~~~~~~~~~~~~~~~~~~~~~
debase_internals.c:711:17: error: implicit declaration of function 'rb_iseq_trace_set' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                rb_iseq_trace_set(iseq, RUBY_EVENT_NONE);
                ^
debase_internals.c:768:64: warning: incompatible pointer types passing 'void (VALUE, VALUE)' (aka 'void (unsigned long, unsigned long)') to parameter of type 'VALUE (*)()' (aka 'unsigned long (*)()') [-Wincompatible-pointer-types]
  rb_define_module_function(mDebase, "set_trace_flag_to_iseq", Debase_set_trace_flag_to_iseq, 1);
                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/mice/.rvm/rubies/ruby-2.5.8/include/ruby-2.5.0/ruby/ruby.h:1716:57: note: passing argument to parameter here
void rb_define_module_function(VALUE,const char*,VALUE(*)(ANYARGS),int);
                                                        ^
debase_internals.c:771:58: warning: incompatible pointer types passing 'void (VALUE, VALUE)' (aka 'void (unsigned long, unsigned long)') to parameter of type 'VALUE (*)()' (aka 'unsigned long (*)()') [-Wincompatible-pointer-types]
  rb_define_module_function(mDebase, "unset_iseq_flags", Debase_unset_trace_flags, 1);
                                                         ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/mice/.rvm/rubies/ruby-2.5.8/include/ruby-2.5.0/ruby/ruby.h:1716:57: note: passing argument to parameter here
void rb_define_module_function(VALUE,const char*,VALUE(*)(ANYARGS),int);
                                                        ^
5 warnings and 2 errors generated.
make: *** [debase_internals.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/mice/.rvm/gems/ruby-2.5.8/gems/debase-0.2.5.beta1 for inspection.
Results logged to /Users/mice/.rvm/gems/ruby-2.5.8/extensions/x86_64-darwin-19/2.5.0/debase-0.2.5.beta1/gem_make.out
/Users/mice/.rvm/rubies/ruby-2.5.8/lib/ruby/site_ruby/2.5.0/rubygems/ext/builder.rb:99:in `run'
  /Users/mice/.rvm/rubies/ruby-2.5.8/lib/ruby/site_ruby/2.5.0/rubygems/ext/builder.rb:51:in `block in make'
  /Users/mice/.rvm/rubies/ruby-2.5.8/lib/ruby/site_ruby/2.5.0/rubygems/ext/builder.rb:43:in `each'
  /Users/mice/.rvm/rubies/ruby-2.5.8/lib/ruby/site_ruby/2.5.0/rubygems/ext/builder.rb:43:in `make'
  /Users/mice/.rvm/rubies/ruby-2.5.8/lib/ruby/site_ruby/2.5.0/rubygems/ext/ext_conf_builder.rb:62:in `block in build'
  /Users/mice/.rvm/rubies/ruby-2.5.8/lib/ruby/2.5.0/tempfile.rb:295:in `open'
  /Users/mice/.rvm/rubies/ruby-2.5.8/lib/ruby/site_ruby/2.5.0/rubygems/ext/ext_conf_builder.rb:29:in `build'
  /Users/mice/.rvm/rubies/ruby-2.5.8/lib/ruby/site_ruby/2.5.0/rubygems/ext/builder.rb:185:in `block in build_extension'
  /Users/mice/.rvm/rubies/ruby-2.5.8/lib/ruby/site_ruby/2.5.0/rubygems/ext/builder.rb:181:in `synchronize'
  /Users/mice/.rvm/rubies/ruby-2.5.8/lib/ruby/site_ruby/2.5.0/rubygems/ext/builder.rb:181:in `build_extension'
  /Users/mice/.rvm/rubies/ruby-2.5.8/lib/ruby/site_ruby/2.5.0/rubygems/ext/builder.rb:229:in `block in build_extensions'
  /Users/mice/.rvm/rubies/ruby-2.5.8/lib/ruby/site_ruby/2.5.0/rubygems/ext/builder.rb:226:in `each'
  /Users/mice/.rvm/rubies/ruby-2.5.8/lib/ruby/site_ruby/2.5.0/rubygems/ext/builder.rb:226:in `build_extensions'
  /Users/mice/.rvm/rubies/ruby-2.5.8/lib/ruby/site_ruby/2.5.0/rubygems/installer.rb:833:in `build_extensions'
  /Users/mice/.rvm/rubies/ruby-2.5.8/lib/ruby/site_ruby/2.5.0/rubygems/installer.rb:320:in `install'
  /Users/mice/.rvm/rubies/ruby-2.5.8/lib/ruby/site_ruby/2.5.0/rubygems/resolver/specification.rb:93:in `install'
  /Users/mice/.rvm/rubies/ruby-2.5.8/lib/ruby/site_ruby/2.5.0/rubygems/request_set.rb:291:in `block in install_into'
  /Users/mice/.rvm/rubies/ruby-2.5.8/lib/ruby/site_ruby/2.5.0/rubygems/request_set.rb:283:in `each'
  /Users/mice/.rvm/rubies/ruby-2.5.8/lib/ruby/site_ruby/2.5.0/rubygems/request_set.rb:283:in `install_into'
  /Users/mice/.rvm/rubies/ruby-2.5.8/lib/ruby/site_ruby/2.5.0/rubygems/request_set.rb:148:in `install'
  /Users/mice/.rvm/rubies/ruby-2.5.8/lib/ruby/site_ruby/2.5.0/rubygems/dependency_installer.rb:408: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 /Users/mice/.rvm/gems/ruby-2.5.8/gems/ruby-debug-ide-0.7.2 for inspection.
Results logged to /Users/mice/.rvm/gems/ruby-2.5.8/extensions/x86_64-darwin-19/2.5.0/ruby-debug-ide-0.7.2/gem_make.out
francoisjacques commented 4 years ago

Reproed.

hurricup commented 4 years ago

there is a workaround for now https://github.com/ruby-debug/debase/issues/89#issuecomment-686827382

francoisjacques commented 4 years ago

Good to know! Thank you @hurricup !

karuppasamy commented 4 years ago

Thank you @hurricup.

hurricup commented 3 years ago

https://github.com/ruby-debug/debase/releases/tag/v0.2.5.beta2 should work fine