Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to install Debase #98

Closed
Horki opened this issue Apr 16, 2022 · 7 comments
Closed

Failed to install Debase #98

Horki opened this issue Apr 16, 2022 · 7 comments

Comments

@Horki
Copy link

Horki commented Apr 16, 2022

OS: Linux
Linux host 5.17.1-arch1-1 #1 SMP PREEMPT Mon, 28 Mar 2022 20:55:33 +0000 x86_64 GNU/Linux

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

current directory: ~/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/debase-0.2.4.1/ext

~/.rbenv/versions/2.6.7/bin/ruby -I ~/.rbenv/versions/2.6.7/lib/ruby/2.6.0 -r ./siteconf20220416-2577322-1xkmy2i.rb extconf.rb
*** 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=~/.rbenv/versions/2.6.7/bin/$(RUBY_BASE_NAME)
~/.rbenv/versions/2.6.7/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require': cannot load such file -- debase/ruby_core_source (LoadError) from ~/.rbenv/versions/2.6.7/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require'
from extconf.rb:28:in `

'

extconf failed, exit code 1

Gem files will remain installed in ~/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/debase-0.2.4.1 for inspection.
Results logged to ~/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/debase-0.2.4.1/gem_make.out`

@NeilR-Cambia
Copy link

I'm also seeing failures trying to install debase into a Ruby 3.1.1 gemset.

OS: macOS 11.6.5 on Apple M1
Darwin hostname 20.6.0 Darwin Kernel Version 20.6.0: Tue Feb 22 21:10:42 PST 2022; root:xnu-7195.141.26~1/RELEASE_ARM64_T8101 arm64

Install output:

➜  git:(master) ✗ gem install debase
Building native extensions. This could take a while...
ERROR:  Error installing debase:
	ERROR: Failed to build gem native extension.

    current directory: $HOME/.rvm/gems/ruby-3.1.1@cuke_base/gems/debase-0.2.4.1/ext
$HOME/.rvm/rubies/ruby-3.1.1/bin/ruby -I $HOME/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0 -r ./siteconf20220425-74376-23ny0c.rb extconf.rb
checking for vm_core.h... yes
checking for iseq.h... no
checking for vm_core.h... no
**************************************************************************
No source for ruby-3.1.1-p18 (revision 53f5fc4236a754ddf94b20dbb70ab63bd5109b18) 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=$HOME/.rvm/rubies/ruby-3.1.1/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:

  $HOME/.rvm/gems/ruby-3.1.1@cuke_base/extensions/arm64-darwin-20/3.1.0/debase-0.2.4.1/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in $HOME/.rvm/gems/ruby-3.1.1@cuke_base/gems/debase-0.2.4.1 for inspection.
Results logged to $HOME/.rvm/gems/ruby-3.1.1@cuke_base/extensions/arm64-darwin-20/3.1.0/debase-0.2.4.1/gem_make.out

mkmf.log errors:

have_header: checking for iseq.h... -------------------- no

DYLD_FALLBACK_LIBRARY_PATH=.:$HOME/.rvm/rubies/ruby-3.1.1/lib "gcc -I$HOME/.rvm/rubies/ruby-3.1.1/include/ruby-3.1.0/arm64-darwin20 -I$HOME/.rvm/rubies/ruby-3.1.1/include/ruby-3.1.0/ruby/backward -I$HOME/.rvm/rubies/ruby-3.1.1/include/ruby-3.1.0 -I. -I$HOME/.rvm/gems/ruby-3.1.1@cuke_base/gems/debase-ruby_core_source-0.10.15/lib/debase/ruby_core_source/ruby-3.1.0-p0 -O3 -I/opt/homebrew/opt/libyaml/include -I/opt/homebrew/opt/libksba/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/zlib/include -I/opt/homebrew/opt/openssl@1.1/include -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe   -c conftest.c"
In file included from conftest.c:3:
In file included from $HOME/.rvm/gems/ruby-3.1.1@cuke_base/gems/debase-ruby_core_source-0.10.15/lib/debase/ruby_core_source/ruby-3.1.0-p0/iseq.h:14:
In file included from $HOME/.rvm/gems/ruby-3.1.1@cuke_base/gems/debase-ruby_core_source-0.10.15/lib/debase/ruby_core_source/ruby-3.1.0-p0/vm_core.h:74:
In file included from $HOME/.rvm/gems/ruby-3.1.1@cuke_base/gems/debase-ruby_core_source-0.10.15/lib/debase/ruby_core_source/ruby-3.1.0-p0/method.h:15:
$HOME/.rvm/gems/ruby-3.1.1@cuke_base/gems/debase-ruby_core_source-0.10.15/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/imemo.h:234:5: error: implicit declaration of function 'RB_OBJ_WRITE' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    RB_OBJ_WRITE(m, &m->v1, v);
    ^
$HOME/.rvm/gems/ruby-3.1.1@cuke_base/gems/debase-ruby_core_source-0.10.15/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/imemo.h:240:5: error: implicit declaration of function 'RB_OBJ_WRITE' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    RB_OBJ_WRITE(m, &m->v2, v);
    ^
2 errors generated.
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <iseq.h>
/* end */

--------------------

And my .zshrc contains:
export optflags="-Wno-error=shorten-64-to-32 -Wno-error=implicit-function-declaration"

@cwli24
Copy link

cwli24 commented Apr 29, 2022

Also failing with similar output on Windows subsystem Debian.
Ruby version 3.1.2p20, and Rails 7.0.2.4.
I also tried version 0.2.3 which gave the same error, but was able to install the 0.2.2 successfully.

@jlm
Copy link

jlm commented May 3, 2022

It looks like this is fixed in debase 0.25.beta2.

gem 'debase', :git => 'https://github.com/ruby-debug/debase.git', :tag => 'v0.2.5.beta2'

@rrguedes
Copy link

rrguedes commented May 6, 2022

It looks like this is fixed in debase 0.25.beta2.

gem 'debase', :git => 'https://github.com/ruby-debug/debase.git', :tag => 'v0.2.5.beta2'

Yes, it was. Thanks @jlm!

@kingdonb
Copy link

kingdonb commented Jun 22, 2022

Is it fixed, or is it fixed for darwin (in the v0.2.5.beta2 release) in a way that breaks installing on Linux?

(I'm unable to install the same version of debase on both Linux and macos, and since:

You cannot specify the same gem twice with different version requirements.
You specified: debase (~> 0.2.5.beta2) and debase (~> 0.2.4)

I'm not sure how to proceed... I need a Gemfile that will build successfully on either MacOS or Linux

Edit: I mean, I personally was able to work through this issue by choosing one or the other platform today, but this seems like an outstanding problem remains still, else the beta release probably would be published as 0.2.5 (?)

@calebeno
Copy link

Can confirm, this issue persists. Using 0.2.5.beta2 and installing on the base 3.1.2 ruby image from docker hub fails.

@Horki
Copy link
Author

Horki commented Mar 20, 2023

fixed: arch linux version

PKG_CONFIG_PATH=/usr/lib/openssl-1.1/pkgconfig rbenv install 2.6.7 # reinstall ruby version, to receive missing header files
gem install debase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants