ruby-debug / debase

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error installing debase

luc4leone opened this issue · comments

Hello,

I am on a macOS High Sierra version 10.13 with ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17].

I'd like to debug Ruby scripts in the vscode editor. To do that I am trying to install debase, but I get this error:

[~]$ sudo gem install debase
Password:
Building native extensions.  This could take a while...
ERROR:  Error installing debase:
	ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.3.0/gems/debase-0.2.3/ext
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20190705-27932-1xboxu.rb extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
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=/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/$(RUBY_BASE_NAME)
	--with-ruby-dir
	--without-ruby-dir
	--with-ruby-include
	--without-ruby-include=${ruby-dir}/include
	--with-ruby-lib
	--without-ruby-lib=${ruby-dir}/lib

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

  /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/debase-0.2.3/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/debase-0.2.3 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/debase-0.2.3/gem_make.out

mkmf.log

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

"xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin17 -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_ATOMIC_BUILTINS -iwithsysroot /usr/local/libressl/include conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib -L.             -L /BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/libressl/lib -L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/lib   -arch x86_64 -arch i386   -lruby.2.3.0  -lpthread -ldl -lobjc "
ld: warning: directory not found for option '-L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/libressl/lib'
ld: warning: directory not found for option '-L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/lib'
ld: warning: directory not found for option '-L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/libressl/lib'
ld: warning: directory not found for option '-L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/lib'
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

"xcrun clang -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin17 -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_ATOMIC_BUILTINS -iwithsysroot /usr/local/libressl/include  -arch x86_64 -arch i386  -c conftest.c"
conftest.c:3:10: fatal error: 'vm_core.h' file not found
#include <vm_core.h>
         ^~~~~~~~~~~
1 error generated.
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <vm_core.h>
/* end */

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

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

"xcrun clang -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin17 -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0 -I. -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby-2.3.3-p222  -g -Os -pipe -DHAVE_GCC_ATOMIC_BUILTINS -iwithsysroot /usr/local/libressl/include  -arch x86_64 -arch i386  -c conftest.c"
conftest.c:3:10: fatal error: 'vm_core.h' file not found
#include <vm_core.h>
         ^~~~~~~~~~~
1 error generated.
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <vm_core.h>
/* end */

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

have_header: checking for vm_core.h... -------------------- yes

"xcrun clang -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin17 -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0 -I. -I/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.3-p222  -g -Os -pipe -DHAVE_GCC_ATOMIC_BUILTINS -iwithsysroot /usr/local/libressl/include  -arch x86_64 -arch i386  -c conftest.c"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <vm_core.h>
/* end */

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

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

"xcrun clang -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin17 -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0 -I. -I/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.3-p222  -g -Os -pipe -DHAVE_GCC_ATOMIC_BUILTINS -iwithsysroot /usr/local/libressl/include  -arch x86_64 -arch i386  -c conftest.c"
In file included from conftest.c:3:
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.3-p222/iseq.h:26:12: error: invalid application of 'sizeof' to an incomplete type 'struct rb_call_info_kw_arg'
    return sizeof(struct rb_call_info_kw_arg) + sizeof(VALUE) * (keyword_len - 1);
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.3-p222/iseq.h:26:26: note: forward declaration of 'struct rb_call_info_kw_arg'
    return sizeof(struct rb_call_info_kw_arg) + sizeof(VALUE) * (keyword_len - 1);
                         ^
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.3-p222/iseq.h:55:15: error: incomplete definition of type 'struct rb_iseq_struct'
    int cnt = ISEQ_FLIP_CNT(iseq);
              ^~~~~~~~~~~~~~~~~~~
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.3-p222/iseq.h:50:49: note: expanded from macro 'ISEQ_FLIP_CNT'
#define ISEQ_FLIP_CNT(iseq) FIX2INT(RARRAY_AREF(ISEQ_MARK_ARY(iseq), ISEQ_MARK_ARY_FLIP_CNT))
                            ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.3-p222/iseq.h:45:45: note: expanded from macro 'ISEQ_MARK_ARY'
#define ISEQ_MARK_ARY(iseq)           (iseq)->body->mark_ary
                                            ^
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h:1058:48: note: expanded from macro 'RARRAY_AREF'
#define RARRAY_AREF(a, i)    (RARRAY_CONST_PTR(a)[i])
                                               ^
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h:1046:48: note: expanded from macro 'RARRAY_CONST_PTR'
#define RARRAY_CONST_PTR(a) rb_array_const_ptr(a)
                                               ^
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h:707:32: note: expanded from macro 'FIX2INT'
#define FIX2INT(x)  RB_FIX2INT(x)
                    ~~~~~~~~~~~^~
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h:683:48: note: expanded from macro 'RB_FIX2INT'
#define RB_FIX2INT(x) ((int)rb_fix2int((VALUE)(x)))
                                               ^
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.3-p222/iseq.h:19:16: note: forward declaration of 'struct rb_iseq_struct'
typedef struct rb_iseq_struct rb_iseq_t;
               ^
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.3-p222/iseq.h:56:17: error: incomplete definition of type 'struct rb_iseq_struct'
    RARRAY_ASET(ISEQ_MARK_ARY(iseq), ISEQ_MARK_ARY_FLIP_CNT, INT2FIX(cnt+1));
    ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.3-p222/iseq.h:45:45: note: expanded from macro 'ISEQ_MARK_ARY'
#define ISEQ_MARK_ARY(iseq)           (iseq)->body->mark_ary
                                            ^
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h:1060:25: note: expanded from macro 'RARRAY_ASET'
    const VALUE _ary = (a); \
                        ^
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.3-p222/iseq.h:19:16: note: forward declaration of 'struct rb_iseq_struct'
typedef struct rb_iseq_struct rb_iseq_t;
               ^
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.3-p222/iseq.h:63:29: error: incomplete definition of type 'struct rb_iseq_struct'
    VALUE str = RARRAY_AREF(ISEQ_MARK_ARY(iseq), ISEQ_MARK_ARY_ORIGINAL_ISEQ);
                ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.3-p222/iseq.h:45:45: note: expanded from macro 'ISEQ_MARK_ARY'
#define ISEQ_MARK_ARY(iseq)           (iseq)->body->mark_ary
                                            ^
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h:1058:48: note: expanded from macro 'RARRAY_AREF'
#define RARRAY_AREF(a, i)    (RARRAY_CONST_PTR(a)[i])
                              ~~~~~~~~~~~~~~~~~^~
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h:1046:48: note: expanded from macro 'RARRAY_CONST_PTR'
#define RARRAY_CONST_PTR(a) rb_array_const_ptr(a)
                                               ^
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.3-p222/iseq.h:19:16: note: forward declaration of 'struct rb_iseq_struct'
typedef struct rb_iseq_struct rb_iseq_t;
               ^
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.3-p222/iseq.h:72:17: error: incomplete definition of type 'struct rb_iseq_struct'
    RARRAY_ASET(ISEQ_MARK_ARY(iseq), ISEQ_MARK_ARY_ORIGINAL_ISEQ, str);
    ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.3-p222/iseq.h:45:45: note: expanded from macro 'ISEQ_MARK_ARY'
#define ISEQ_MARK_ARY(iseq)           (iseq)->body->mark_ary
                                            ^
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h:1060:25: note: expanded from macro 'RARRAY_ASET'
    const VALUE _ary = (a); \
                        ^
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.3-p222/iseq.h:19:16: note: forward declaration of 'struct rb_iseq_struct'
typedef struct rb_iseq_struct rb_iseq_t;
               ^
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.3-p222/iseq.h:81:25: warning: implicit declaration of function 'rb_imemo_new' is invalid in C99 [-Wimplicit-function-declaration]
    return (rb_iseq_t *)rb_imemo_new(imemo_iseq, 0, 0, 0, 0);
                        ^
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.3-p222/iseq.h:81:38: error: use of undeclared identifier 'imemo_iseq'
    return (rb_iseq_t *)rb_imemo_new(imemo_iseq, 0, 0, 0, 0);
                                     ^
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.3-p222/iseq.h:94:45: error: unknown type name 'NODE'
VALUE rb_iseq_compile_node(rb_iseq_t *iseq, NODE *node);
                                            ^
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.3-p222/iseq.h:213:11: error: unknown type name 'rb_compile_option_t'
    const rb_compile_option_t *option;
          ^
1 warning and 8 errors generated.
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <iseq.h>
/* end */

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


Any suggestion on how to fix the problem? I checked issues #57 and #65 but could not fix the problem.

Same problem when trying to install gem ruby-debug-ide.

Thanks 😊

I updated rubygems

$ sudo gem install rubygems-update`
Done installing documentation for rubygems-update after 40 seconds

Then I installed debase-ruby_core_source

$ sudo gem install debase-ruby_core_source
Successfully installed debase-ruby_core_source-0.10.5

Then tried to install debase but got back the same error.

@luc4leone Could you try to install these packages: https://stackoverflow.com/a/14217431

@ViugiNick thanks! When I run

apt-get install libcurl4-openssl-dev libgcrypt11-dev libgnutls-dev libidn11-dev libldap2-dev librtmp-dev libtasn1-3-dev m4
-bash: apt-get: command not found

Then I tried

$ brew install libcurl4-openssl-dev
Error: No available formula with the name "libcurl4-openssl-dev

doing something wrong?

Thanks

commented

Thank you, this unblocked me.

same error

@dimsky The latest debase version should work fine now

Thanks

How did it end up?

How did it end up?

I surrendered.

Lol...

I had an issue with this on macOS up until I went and installed the ruby version I was using but using rvm instead of whatever was installed at the time.

rvm installs ruby binaries and source apparently, which debase has to have in order to compile native extensions.

I don't know if this may help because it kind of happened by accident but the way I managed to make it work is by relocating the place of where the gems are from /Library/Ruby/ to somewhere else in my case I used rbenv default path. Also something worth mentioning while using rbenv is to have a version already installed.

I know is not much but I felt like sharing after struggling with this for 2 hours. Cheers.

This is an active issue. I have not been able to install debase on Mac OS Catalina 10.15.7 using Ruby 2.5.6

same to me

commented

Thanks

How did it end up?

How did it end up?

Don't use rvm. use pure ruby though brew. it fixes this issue for me (MacOS HS 10.15)

Still having this issue:

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

    current directory: /Users/shqear/.rvm/gems/truffleruby-head/gems/debase-0.2.5.beta2/ext
/Users/shqear/.rvm/rubies/truffleruby-head/bin/ruby -I /Users/shqear/.rvm/rubies/truffleruby-head/lib/ruby/site_ruby/3.1.2.4 extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
**************************************************************************
No source for ruby-3.1.2-p0 (revision 2f21e36a1731d779889c4d4935a3bc26308d159e) provided with
debase-ruby_core_source gem. Falling back to ruby-3.1.0-p0.
**************************************************************************
checking for vm_core.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/shqear/.rvm/rubies/truffleruby-head/bin/ruby
        --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

Contents of mkmf.log:
have_header: checking for vm_core.h... -------------------- no

LD_LIBRARY_PATH=. "/Users/shqear/.rvm/rubies/truffleruby-head/lib/sulong/native/bin/graalvm-native-clang -o conftest -I/Users/shqear/.rvm/rubies/truffleruby-head/lib/cext/include -I/Users/shqear/.rvm/rubies/truffleruby-head/lib/cext/include/ruby/backward -I/Users/shqear/.rvm/rubies/truffleruby-head/lib/cext/include -I. -I/Users/shqear/.rvm/src/truffleruby-head  -D_DARWIN_C_SOURCE -DTRUFFLERUBY_ABI_VERSION=3.1.2.4  -I/usr/local/opt/openssl@1.1/include   -Werror=implicit-function-declaration -Wno-int-conversion -Wno-int-to-pointer-cast -Wno-incompatible-pointer-types -Wno-format-invalid-specifier -Wno-format-extra-args -ferror-limit=500 -Werror=implicit-function-declaration conftest.c  -L.  -L/usr/local/opt/openssl@1.1/lib     -lgraalvm-llvm    -L/Users/shqear/.rvm/rubies/truffleruby-head/lib/cext -rpath /Users/shqear/.rvm/rubies/truffleruby-head/lib/cext -ltruffleruby -rpath /Users/shqear/.rvm/rubies/truffleruby-head/lib/sulong/native/lib"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return !!argv[argc];
6: }
/* end */

LD_LIBRARY_PATH=. "/Users/shqear/.rvm/rubies/truffleruby-head/lib/sulong/native/bin/graalvm-native-clang -I/Users/shqear/.rvm/rubies/truffleruby-head/lib/cext/include -I/Users/shqear/.rvm/rubies/truffleruby-head/lib/cext/include/ruby/backward -I/Users/shqear/.rvm/rubies/truffleruby-head/lib/cext/include -I. -I/Users/shqear/.rvm/src/truffleruby-head  -D_DARWIN_C_SOURCE -DTRUFFLERUBY_ABI_VERSION=3.1.2.4  -I/usr/local/opt/openssl@1.1/include   -Werror=implicit-function-declaration -Wno-int-conversion -Wno-int-to-pointer-cast -Wno-incompatible-pointer-types -Wno-format-invalid-specifier -Wno-format-extra-args -ferror-limit=500 -Werror=implicit-function-declaration   -c conftest.c"
conftest.c:3:10: fatal error: 'vm_core.h' file not found
#include <vm_core.h>
         ^~~~~~~~~~~
1 error generated.
Process failed: #<Process::Status: pid 27065 exit 1>
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <vm_core.h>
/* end */

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

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

LD_LIBRARY_PATH=. "/Users/shqear/.rvm/rubies/truffleruby-head/lib/sulong/native/bin/graalvm-native-clang -I/Users/shqear/.rvm/rubies/truffleruby-head/lib/cext/include -I/Users/shqear/.rvm/rubies/truffleruby-head/lib/cext/include/ruby/backward -I/Users/shqear/.rvm/rubies/truffleruby-head/lib/cext/include -I. -I/Users/shqear/.rvm/rubies/truffleruby-head/lib/cext/include/ruby-3.1.2-p0   -Werror=implicit-function-declaration -Wno-int-conversion -Wno-int-to-pointer-cast -Wno-incompatible-pointer-types -Wno-format-invalid-specifier -Wno-format-extra-args -ferror-limit=500 -Werror=implicit-function-declaration   -c conftest.c"
In file included from conftest.c:1:
In file included from /Users/shqear/.rvm/rubies/truffleruby-head/lib/cext/include/ruby.h:38:
In file included from /Users/shqear/.rvm/rubies/truffleruby-head/lib/cext/include/ruby/ruby.h:15:
In file included from /Users/shqear/.rvm/rubies/truffleruby-head/lib/cext/include/ruby/internal/config.h:157:
/Users/shqear/.rvm/rubies/truffleruby-head/lib/cext/include/truffleruby/truffleruby-pre.h:52:2: error: "TRUFFLERUBY_ABI_VERSION must be defined when compiling native extensions. Does the extension override CPPFLAGS or DEFS?"
#error "TRUFFLERUBY_ABI_VERSION must be defined when compiling native extensions. Does the extension override CPPFLAGS or DEFS?"
 ^
conftest.c:3:10: fatal error: 'vm_core.h' file not found
#include <vm_core.h>
         ^~~~~~~~~~~
2 errors generated.
Process failed: #<Process::Status: pid 27067 exit 1>
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <vm_core.h>
/* end */

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

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

LD_LIBRARY_PATH=. "/Users/shqear/.rvm/rubies/truffleruby-head/lib/sulong/native/bin/graalvm-native-clang -I/Users/shqear/.rvm/rubies/truffleruby-head/lib/cext/include -I/Users/shqear/.rvm/rubies/truffleruby-head/lib/cext/include/ruby/backward -I/Users/shqear/.rvm/rubies/truffleruby-head/lib/cext/include -I. -I/Users/shqear/.rvm/gems/truffleruby-head/gems/debase-ruby_core_source-0.10.18/lib/debase/ruby_core_source/ruby-3.1.0-p0   -Werror=implicit-function-declaration -Wno-int-conversion -Wno-int-to-pointer-cast -Wno-incompatible-pointer-types -Wno-format-invalid-specifier -Wno-format-extra-args -ferror-limit=500 -Werror=implicit-function-declaration   -c conftest.c"
In file included from conftest.c:1:
In file included from /Users/shqear/.rvm/rubies/truffleruby-head/lib/cext/include/ruby.h:38:
In file included from /Users/shqear/.rvm/rubies/truffleruby-head/lib/cext/include/ruby/ruby.h:15:
In file included from /Users/shqear/.rvm/rubies/truffleruby-head/lib/cext/include/ruby/internal/config.h:157:
/Users/shqear/.rvm/rubies/truffleruby-head/lib/cext/include/truffleruby/truffleruby-pre.h:52:2: error: "TRUFFLERUBY_ABI_VERSION must be defined when compiling native extensions. Does the extension override CPPFLAGS or DEFS?"
#error "TRUFFLERUBY_ABI_VERSION must be defined when compiling native extensions. Does the extension override CPPFLAGS or DEFS?"
 ^
In file included from conftest.c:3:
In file included from /Users/shqear/.rvm/gems/truffleruby-head/gems/debase-ruby_core_source-0.10.18/lib/debase/ruby_core_source/ruby-3.1.0-p0/vm_core.h:71:
/Users/shqear/.rvm/gems/truffleruby-head/gems/debase-ruby_core_source-0.10.18/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/array.h:106:1: error: static declaration of 'RARRAY_AREF' follows non-static declaration
RARRAY_AREF(VALUE ary, long i)
^
/Users/shqear/.rvm/rubies/truffleruby-head/lib/cext/include/ruby/internal/core/rarray.h:263:7: note: previous declaration is here
VALUE RARRAY_AREF(VALUE array, long index);
      ^
2 errors generated.
Process failed: #<Process::Status: pid 27069 exit 1>
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <vm_core.h>
/* end */

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


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

  /Users/shqear/.rvm/gems/truffleruby-head/extensions/x86_64-darwin/3.1.2.4/debase-0.2.5.beta2/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/shqear/.rvm/gems/truffleruby-head/gems/debase-0.2.5.beta2 for inspection.
Results logged to /Users/shqear/.rvm/gems/truffleruby-head/extensions/x86_64-darwin/3.1.2.4/debase-0.2.5.beta2/gem_make.out

Notes:

OS: MacOS Montery 12.6.1 (21G217)
truffleruby 23.0.0-dev-2f21e36a, like ruby 3.1.2, GraalVM CE Native [x86_64-darwin]

@shqear93 this debugger is for MRI ruby, not truffleruby

same issue for me, cannot install debase gem on trufflerruby, any suggestions or solutions to run this on trufflerruby? (it's required for rubymine debugger)

@AhlamHani RubyMine won't be able to debug truffleruby. See: https://youtrack.jetbrains.com/issue/RUBY-23526/Support-debugger-for-Truffleruby and related issues.