ruby-debug / debase

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

debase failing to install on Mac #97

Open ghost opened 2 years ago

ghost commented 2 years ago

My environment:

MacOS Monterey Version 12.3.1
Ruby 3.1.0

I did:

xcode-select --install

Then I installed ruby-debug-ide:

gem install ruby-debug-id

Install went fine.

Then I tried to install debase:

gem install debase

And I got a bunch of errors. Here's the output of my mkmf.log:

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

DYLD_FALLBACK_LIBRARY_PATH=.:/Users/mac/.asdf/installs/ruby/3.1.0/lib "clang -o conftest -I/Users/mac/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/x86_64-darwin21 -I/Users/mac/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/backward -I/Users/mac/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0 -I. -I/Users/mac/.asdf/installs/ruby/3.1.0/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -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 conftest.c  -L. -L/Users/mac/.asdf/installs/ruby/3.1.0/lib -L. -L/Users/mac/.asdf/installs/ruby/3.1.0/lib  -fstack-protector-strong -L/usr/local/lib     -lruby.3.1   "
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return !!argv[argc];
6: }
/* end */

DYLD_FALLBACK_LIBRARY_PATH=.:/Users/mac/.asdf/installs/ruby/3.1.0/lib "clang -I/Users/mac/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/x86_64-darwin21 -I/Users/mac/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/backward -I/Users/mac/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0 -I. -I/Users/mac/.asdf/installs/ruby/3.1.0/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -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"
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

DYLD_FALLBACK_LIBRARY_PATH=.:/Users/mac/.asdf/installs/ruby/3.1.0/lib "clang -I/Users/mac/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/x86_64-darwin21 -I/Users/mac/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/backward -I/Users/mac/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0 -I. -I/Users/mac/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby-3.1.0-p0 -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"
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

DYLD_FALLBACK_LIBRARY_PATH=.:/Users/mac/.asdf/installs/ruby/3.1.0/lib "clang -I/Users/mac/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/x86_64-darwin21 -I/Users/mac/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/backward -I/Users/mac/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0 -I. -I/Users/mac/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/debase-ruby_core_source-0.10.15/lib/debase/ruby_core_source/ruby-3.1.0-p0 -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"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <vm_core.h>
/* end */

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

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

DYLD_FALLBACK_LIBRARY_PATH=.:/Users/mac/.asdf/installs/ruby/3.1.0/lib "clang -I/Users/mac/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/x86_64-darwin21 -I/Users/mac/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/backward -I/Users/mac/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0 -I. -I/Users/mac/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/debase-ruby_core_source-0.10.15/lib/debase/ruby_core_source/ruby-3.1.0-p0 -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 /Users/mac/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/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 /Users/mac/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/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 /Users/mac/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/debase-ruby_core_source-0.10.15/lib/debase/ruby_core_source/ruby-3.1.0-p0/method.h:15:
/Users/mac/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/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);
    ^
/Users/mac/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/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 */

--------------------
wanyinwai commented 1 year ago

I am on MacOS Monterey Version 12.6, ruby 2.6.6p146

Facing the same issue when trying to install debase.

I then open xcode (dint open after updating macOS to Montery) and let it update, then run sudo xcodebuild -license.

After that error becomes ERROR: While executing gem ... (Errno::EACCES) Permission denied @ rb_sysopen -

I then install the gem with sudo, sudo gem install debase -v 0.2.4.1 and that works for me.

Hope this helps.