ruby-debug / debase

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

Error installing debase #76

Closed luc4leone closed 3 years ago

luc4leone commented 5 years ago

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 😊

luc4leone commented 5 years ago

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.

ViugiNick commented 5 years ago

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

luc4leone commented 5 years ago

@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?

ViugiNick commented 5 years ago

https://github.com/denofevil/debase/pull/85

luc4leone commented 5 years ago

Thanks

Shiun commented 4 years ago

Thank you, this unblocked me.

dimsky commented 4 years ago

same error

ViugiNick commented 4 years ago

@dimsky The latest debase version should work fine now

Ramonfan commented 4 years ago

Thanks

How did it end up?

luc4leone commented 4 years ago

How did it end up?

I surrendered.

nikoloss commented 4 years ago

Lol...

jvarness commented 4 years ago

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.

carlosdanna commented 4 years ago

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.

alcamla commented 4 years ago

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

yishuiliunian commented 3 years ago

same to me

pjocer commented 3 years ago

Thanks

How did it end up?

How did it end up?

nikoloss commented 3 years ago

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

hurricup commented 3 years ago

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

shqear93 commented 1 year ago

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]
hurricup commented 1 year ago

@shqear93 this debugger is for MRI ruby, not truffleruby

AhlamHani commented 1 year ago

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)

hurricup commented 1 year ago

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