ruby-debug / debase

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Debase gem not installing on MacOS Ventura and M1

samer-hamood-sb opened this issue · comments

Hi,

When running the gem install command, gem install debase, I get the following:

Building native extensions. This could take a while...
ERROR:  Error installing debase:
        ERROR: Failed to build gem native extension.

    current directory: /Users/samer.hamood/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/debase-0.2.4.1/ext
/Users/samer.hamood/.rbenv/versions/3.1.2/bin/ruby -I /Users/samer.hamood/.rbenv/versions/3.1.2/lib/ruby/site_ruby/3.1.0 extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
**************************************************************************
No source for ruby-3.1.2-p20 (revision 4491bb740a9506d76391ac44bb2fe6e483fec952) provided with
debase-ruby_core_source gem. Falling back to ruby-3.1.0-p0.
**************************************************************************
checking for vm_core.h... yes
checking for iseq.h... no
Makefile creation failed
*************************************************************

  NOTE: If your headers were not found, try passing
        --with-ruby-include=PATH_TO_HEADERS      

*************************************************************

*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/Users/samer.hamood/.rbenv/versions/3.1.2/bin/$(RUBY_BASE_NAME)
        --with-ruby-dir
        --without-ruby-dir
        --with-ruby-include=${ruby-dir}/include
        --with-ruby-lib
        --without-ruby-lib=${ruby-dir}/lib
        --with-vm_core-dir
        --without-vm_core-dir
        --with-vm_core-include
        --without-vm_core-include=${vm_core-dir}/include
        --with-vm_core-lib
        --without-vm_core-lib=${vm_core-dir}/lib
        --with-iseq-dir
        --without-iseq-dir
        --with-iseq-include
        --without-iseq-include=${iseq-dir}/include
        --with-iseq-lib
        --without-iseq-lib=${iseq-dir}/lib

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Users/samer.hamood/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/extensions/arm64-darwin-21/3.1.0/debase-0.2.4.1/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/samer.hamood/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/debase-0.2.4.1 for inspection.
Results logged to /Users/samer.hamood/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/extensions/arm64-darwin-21/3.1.0/debase-0.2.4.1/gem_make.out

How can I resolve this?

My goal is to get the RubyMine debugger working again, which stopped after I updated this morning to Ventura (wish I hadn't):

/Users/samer.hamood/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/debase-3.0.0.beta.6/lib/debase.rb:4:in `require': cannot load such file -- debase_internals (LoadError)
	from /Users/samer.hamood/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/debase-3.0.0.beta.6/lib/debase.rb:4:in `<top (required)>'
	from /Users/samer.hamood/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/ruby-debug-ide-3.0.0.beta.5/lib/ruby-debug-ide.rb:5:in `require'
	from /Users/samer.hamood/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/ruby-debug-ide-3.0.0.beta.5/lib/ruby-debug-ide.rb:5:in `<top (required)>'
	from /Users/samer.hamood/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/ruby-debug-ide-3.0.0.beta.5/bin/rdebug-ide:26:in `require'
	from /Users/samer.hamood/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/ruby-debug-ide-3.0.0.beta.5/bin/rdebug-ide:26:in `<main>'

Thanks for your help.

Got the same error on WSL and found below one and worked. Add it to the Gemfile and run 'bundle install'

gem 'debase', '~> 0.2.5.beta2', require: false

I'm importing like suggested above, but It still happing to me too (I'm use docker):

35.78 
35.78     current directory: /usr/local/bundle/gems/ruby-debug-ide-0.7.3/ext
35.78 /usr/local/bin/ruby mkrf_conf.rb
35.78 Installing base gem
35.78 Building native extensions. This could take a while...
35.78 Building native extensions. This could take a while...
35.78 ERROR: Failed to build gem native extension.
35.78 
35.78     current directory: /usr/local/bundle/gems/debase-0.2.5.beta2/ext/attach
35.78 /usr/local/bin/ruby -I /usr/local/lib/ruby/3.2.0 extconf.rb
35.78 checking for vm_core.h... no
35.78 checking for vm_core.h... no
35.78 **************************************************************************
35.78 No source for ruby-3.2.1-p31 (revision 31819e82c88c6f8ecfaeb162519bfa26a14b21fd)
35.78 provided with
35.78 debase-ruby_core_source gem. Falling back to ruby-3.2.0-p0.
35.78 **************************************************************************
35.78 checking for vm_core.h... yes
35.78 checking for iseq.h... yes
35.78 checking for version.h... no
35.78 Makefile creation failed
35.78 *************************************************************
35.78 
35.78   NOTE: If your headers were not found, try passing
35.78         --with-ruby-include=PATH_TO_HEADERS      
35.78 
35.78 *************************************************************
35.78 
35.78 *** extconf.rb failed ***
35.78 Could not create Makefile due to some reason, probably lack of necessary
35.78 libraries and/or headers.  Check the mkmf.log file for more details.  You may
35.78 need configuration options.
35.78 
35.78 Provided configuration options:
35.78   --with-opt-dir
35.78   --without-opt-dir
35.78   --with-opt-include
35.78   --without-opt-include=${opt-dir}/include
35.78   --with-opt-lib
35.78   --without-opt-lib=${opt-dir}/lib
35.78   --with-make-prog
35.78   --without-make-prog
35.78   --srcdir=.
35.78   --curdir
35.78   --ruby=/usr/local/bin/$(RUBY_BASE_NAME)
35.78   --with-ruby-dir
35.78   --without-ruby-dir
35.78   --with-ruby-include
35.78   --without-ruby-include=${ruby-dir}/include
35.78   --with-ruby-lib
35.78   --without-ruby-lib=${ruby-dir}/lib
35.78   --with-vm_core-dir
35.78   --without-vm_core-dir
35.78   --with-vm_core-include
35.78   --without-vm_core-include=${vm_core-dir}/include
35.78   --with-vm_core-lib
35.78   --without-vm_core-lib=${vm_core-dir}/lib
35.78   --with-iseq-dir
35.78   --without-iseq-dir
35.78   --with-iseq-include
35.78   --without-iseq-include=${iseq-dir}/include
35.78   --with-iseq-lib
35.78   --without-iseq-lib=${iseq-dir}/lib
35.78   --with-version-dir
35.78   --without-version-dir
35.78   --with-version-include
35.78   --without-version-include=${version-dir}/include
35.78   --with-version-lib
35.78   --without-version-lib=${version-dir}/lib
35.78 
35.78 extconf failed, exit code 1
35.78 
35.78 Gem files will remain installed in /usr/local/bundle/gems/debase-0.2.5.beta2 for
35.78 inspection.
35.78 Results logged to
35.78 /usr/local/bundle/extensions/aarch64-linux/3.2.0/debase-0.2.5.beta2/gem_make.out
35.78 /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:102:in `run'
35.78   /usr/local/lib/ruby/3.2.0/rubygems/ext/ext_conf_builder.rb:28:in `build'
35.78   /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:170:in `build_extension'
35.78 /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:204:in `block in
35.78 build_extensions'
35.78   /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:201:in `each'
35.78   /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:201:in `build_extensions'
35.78   /usr/local/lib/ruby/3.2.0/rubygems/installer.rb:843:in `build_extensions'
35.78   /usr/local/lib/ruby/3.2.0/rubygems/installer.rb:326:in `install'
35.78   /usr/local/lib/ruby/3.2.0/rubygems/resolver/specification.rb:104:in `install'
35.78 /usr/local/lib/ruby/3.2.0/rubygems/request_set.rb:279:in `block in
35.78 install_into'
35.78   /usr/local/lib/ruby/3.2.0/rubygems/request_set.rb:271:in `each'
35.78   /usr/local/lib/ruby/3.2.0/rubygems/request_set.rb:271:in `install_into'
35.78   /usr/local/lib/ruby/3.2.0/rubygems/request_set.rb:147:in `install'
35.78   /usr/local/lib/ruby/3.2.0/rubygems/dependency_installer.rb:252:in `install'
35.78   mkrf_conf.rb:31:in `rescue in <main>'
35.78   mkrf_conf.rb:24:in `<main>'
35.78 
35.78 rake failed, exit code 1
35.78 
35.78 Gem files will remain installed in /usr/local/bundle/gems/ruby-debug-ide-0.7.3
35.78 for inspection.
35.78 Results logged to
35.78 /usr/local/bundle/extensions/aarch64-linux/3.2.0/ruby-debug-ide-0.7.3/gem_make.out
35.78 
35.78   /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:102:in `run'
35.78   /usr/local/lib/ruby/3.2.0/rubygems/ext/rake_builder.rb:11:in `build'
35.78   /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:170:in `build_extension'
35.78 /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:204:in `block in
35.78 build_extensions'
35.78   /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:201:in `each'
35.78   /usr/local/lib/ruby/3.2.0/rubygems/ext/builder.rb:201:in `build_extensions'
35.78   /usr/local/lib/ruby/3.2.0/rubygems/installer.rb:843:in `build_extensions'
35.78 /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/rubygems_gem_installer.rb:72:in
35.78 `build_extensions'
35.78 /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/rubygems_gem_installer.rb:28:in
35.78 `install'
35.78 /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/source/rubygems.rb:198:in
35.78 `install'
35.78 /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/installer/gem_installer.rb:54:in
35.78 `install'
35.78 /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/installer/gem_installer.rb:16:in
35.78 `install_from_spec'
35.78 /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/installer/parallel_installer.rb:156:in
35.78 `do_install'
35.78 /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/installer/parallel_installer.rb:147:in
35.78 `block in worker_pool'
35.78   /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/worker.rb:62:in `apply_func'
35.78 /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/worker.rb:57:in `block in
35.78 process_queue'
35.78   /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/worker.rb:54:in `loop'
35.78 /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/worker.rb:54:in
35.78 `process_queue'
35.78 /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/worker.rb:90:in `block (2
35.78 levels) in create_threads'
35.78 
35.78 An error occurred while installing ruby-debug-ide (0.7.3), and Bundler cannot
35.78 continue.
35.78 
35.78 In Gemfile:
35.78   ruby-debug-ide
------

To workarond that:

  • Comment debabe gem import
  • Build image (docker compose build web)
  • Remove comment
  • Run bundle (docker compose run web bundle install)