deivid-rodriguez / byebug

Debugging in Ruby 2
BSD 2-Clause "Simplified" License
3.34k stars 328 forks source link

[macOS][12.0] ERROR: Error installing byebug 11.1.3 #825

Open fmbraga opened 3 years ago

fmbraga commented 3 years ago

Problem description

gem install byebug -v '11.1.3' --source 'https://rubygems.org/'

Expected behavior

I expected that the gem would install successfully.

Actual behavior

Building native extensions. This could take a while...
ERROR:  Error installing byebug:
    ERROR: Failed to build gem native extension.
The full transcript can be found here: ``` $ gem install byebug -v '11.1.3' --source 'https://rubygems.org/' Building native extensions. This could take a while... ERROR: Error installing byebug: ERROR: Failed to build gem native extension. current directory: /Users/fmbraga/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/byebug-11.1.3/ext/byebug /Users/fmbraga/.asdf/installs/ruby/3.0.1/bin/ruby -I /Users/fmbraga/.asdf/installs/ruby/3.0.1/lib/ruby/3.0.0 -r ./siteconf20210822-78582-qp11ko.rb extconf.rb creating Makefile current directory: /Users/fmbraga/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/byebug-11.1.3/ext/byebug make DESTDIR\= clean current directory: /Users/fmbraga/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/byebug-11.1.3/ext/byebug make DESTDIR\= compiling breakpoint.c In file included from breakpoint.c:1: In file included from ./byebug.h:4: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby.h:38: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/ruby.h:23: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/defines.h:73: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/backward/2/attributes.h:43: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/attr/pure.h:25: /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/assert.h:132:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes RBIMPL_ATTR_NORETURN() ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/attr/noreturn.h:29:33: note: expanded from macro 'RBIMPL_ATTR_NORETURN' # define RBIMPL_ATTR_NORETURN() __declspec(noreturn) ^ In file included from breakpoint.c:1: In file included from ./byebug.h:4: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby.h:38: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/ruby.h:24: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/anyargs.h:77: /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/intern/vm.h:64:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes RBIMPL_ATTR_NORETURN() ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/attr/noreturn.h:29:33: note: expanded from macro 'RBIMPL_ATTR_NORETURN' # define RBIMPL_ATTR_NORETURN() __declspec(noreturn) ^ In file included from breakpoint.c:1: In file included from ./byebug.h:4: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby.h:38: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/ruby.h:25: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic.h:23: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic/char.h:23: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic/int.h:26: /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic/long.h:70:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes RBIMPL_ATTR_NORETURN() ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/attr/noreturn.h:29:33: note: expanded from macro 'RBIMPL_ATTR_NORETURN' # define RBIMPL_ATTR_NORETURN() __declspec(noreturn) ^ In file included from breakpoint.c:1: In file included from ./byebug.h:4: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby.h:38: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/ruby.h:25: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic.h:23: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic/char.h:29: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rstring.h:28: /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rbasic.h:46:14: error: expected parameter declarator RUBY_ALIGNAS(SIZEOF_VALUE) ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/value.h:41:23: note: expanded from macro 'SIZEOF_VALUE' # define SIZEOF_VALUE SIZEOF_LONG ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/x86_64-darwin21/ruby/config.h:64:21: note: expanded from macro 'SIZEOF_LONG' #define SIZEOF_LONG 8 ^ In file included from breakpoint.c:1: In file included from ./byebug.h:4: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby.h:38: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/ruby.h:25: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic.h:23: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic/char.h:29: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rstring.h:28: /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rbasic.h:46:14: error: expected ')' /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/value.h:41:23: note: expanded from macro 'SIZEOF_VALUE' # define SIZEOF_VALUE SIZEOF_LONG ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/x86_64-darwin21/ruby/config.h:64:21: note: expanded from macro 'SIZEOF_LONG' #define SIZEOF_LONG 8 ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rbasic.h:46:1: note: to match this '(' RUBY_ALIGNAS(SIZEOF_VALUE) ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/backward/2/stdalign.h:27:22: note: expanded from macro 'RUBY_ALIGNAS' #define RUBY_ALIGNAS RBIMPL_ALIGNAS ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/stdalign.h:66:44: note: expanded from macro 'RBIMPL_ALIGNAS' # define RBIMPL_ALIGNAS(_) __declspec(align(_)) ^ In file included from breakpoint.c:1: In file included from ./byebug.h:4: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby.h:38: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/ruby.h:25: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic.h:23: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic/char.h:29: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rstring.h:28: /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rbasic.h:47:1: error: expected function body after function declarator RBasic { ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rbasic.h:82:23: error: incomplete definition of type 'struct RBasic' return RBASIC(obj)->klass; ~~~~~~~~~~~^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rbasic.h:82:12: note: forward declaration of 'struct RBasic' return RBASIC(obj)->klass; ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rbasic.h:34:50: note: expanded from macro 'RBASIC' #define RBASIC(obj) RBIMPL_CAST((struct RBasic *)(obj)) ^ In file included from breakpoint.c:1: In file included from ./byebug.h:4: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby.h:38: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/ruby.h:25: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic.h:23: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic/char.h:29: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rstring.h:30: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:35: /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/value_type.h:157:28: error: incomplete definition of type 'struct RBasic' VALUE ret = RBASIC(obj)->flags & RUBY_T_MASK; ~~~~~~~~~~~^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/value_type.h:157:17: note: forward declaration of 'struct RBasic' VALUE ret = RBASIC(obj)->flags & RUBY_T_MASK; ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rbasic.h:34:50: note: expanded from macro 'RBASIC' #define RBASIC(obj) RBIMPL_CAST((struct RBasic *)(obj)) ^ In file included from breakpoint.c:1: In file included from ./byebug.h:4: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby.h:38: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/ruby.h:25: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic.h:23: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic/char.h:29: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rstring.h:30: /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:237:23: error: incomplete definition of type 'struct RBasic' return RBASIC(obj)->flags & flags; ~~~~~~~~~~~^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:237:12: note: forward declaration of 'struct RBasic' return RBASIC(obj)->flags & flags; ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rbasic.h:34:50: note: expanded from macro 'RBASIC' #define RBASIC(obj) RBIMPL_CAST((struct RBasic *)(obj)) ^ In file included from breakpoint.c:1: In file included from ./byebug.h:4: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby.h:38: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/ruby.h:25: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic.h:23: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic/char.h:29: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rstring.h:30: /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:285:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes RBIMPL_ATTR_NOALIAS() ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/attr/noalias.h:53:32: note: expanded from macro 'RBIMPL_ATTR_NOALIAS' # define RBIMPL_ATTR_NOALIAS() __declspec(noalias) ^ In file included from breakpoint.c:1: In file included from ./byebug.h:4: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby.h:38: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/ruby.h:25: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic.h:23: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic/char.h:29: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rstring.h:30: /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:288:30: warning: declaration of 'struct RBasic' will not be visible outside of this function [-Wvisibility] rbimpl_fl_set_raw_raw(struct RBasic *obj, VALUE flags) ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:290:8: error: incomplete definition of type 'struct RBasic' obj->flags |= flags; ~~~^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:288:30: note: forward declaration of 'struct RBasic' rbimpl_fl_set_raw_raw(struct RBasic *obj, VALUE flags) ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:298:27: warning: incompatible pointer types passing 'struct RBasic *' to parameter of type 'struct RBasic *' [-Wincompatible-pointer-types] rbimpl_fl_set_raw_raw(RBASIC(obj), flags); ^~~~~~~~~~~ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rbasic.h:34:30: note: expanded from macro 'RBASIC' #define RBASIC(obj) RBIMPL_CAST((struct RBasic *)(obj)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/cast.h:33:28: note: expanded from macro 'RBIMPL_CAST' # define RBIMPL_CAST(expr) (expr) ^~~~~~ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:288:38: note: passing argument to parameter 'obj' here rbimpl_fl_set_raw_raw(struct RBasic *obj, VALUE flags) ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:310:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes RBIMPL_ATTR_NOALIAS() ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/attr/noalias.h:53:32: note: expanded from macro 'RBIMPL_ATTR_NOALIAS' # define RBIMPL_ATTR_NOALIAS() __declspec(noalias) ^ In file included from breakpoint.c:1: In file included from ./byebug.h:4: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby.h:38: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/ruby.h:25: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic.h:23: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic/char.h:29: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rstring.h:30: /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:313:32: warning: declaration of 'struct RBasic' will not be visible outside of this function [-Wvisibility] rbimpl_fl_unset_raw_raw(struct RBasic *obj, VALUE flags) ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:315:8: error: incomplete definition of type 'struct RBasic' obj->flags &= ~flags; ~~~^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:313:32: note: forward declaration of 'struct RBasic' rbimpl_fl_unset_raw_raw(struct RBasic *obj, VALUE flags) ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:323:29: warning: incompatible pointer types passing 'struct RBasic *' to parameter of type 'struct RBasic *' [-Wincompatible-pointer-types] rbimpl_fl_unset_raw_raw(RBASIC(obj), flags); ^~~~~~~~~~~ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rbasic.h:34:30: note: expanded from macro 'RBASIC' #define RBASIC(obj) RBIMPL_CAST((struct RBasic *)(obj)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/cast.h:33:28: note: expanded from macro 'RBIMPL_CAST' # define RBIMPL_CAST(expr) (expr) ^~~~~~ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:313:40: note: passing argument to parameter 'obj' here rbimpl_fl_unset_raw_raw(struct RBasic *obj, VALUE flags) ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:335:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes RBIMPL_ATTR_NOALIAS() ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/attr/noalias.h:53:32: note: expanded from macro 'RBIMPL_ATTR_NOALIAS' # define RBIMPL_ATTR_NOALIAS() __declspec(noalias) ^ In file included from breakpoint.c:1: In file included from ./byebug.h:4: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby.h:38: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/ruby.h:25: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic.h:23: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic/char.h:29: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rstring.h:30: /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:338:34: warning: declaration of 'struct RBasic' will not be visible outside of this function [-Wvisibility] rbimpl_fl_reverse_raw_raw(struct RBasic *obj, VALUE flags) ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:340:8: error: incomplete definition of type 'struct RBasic' obj->flags ^= flags; ~~~^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:338:34: note: forward declaration of 'struct RBasic' rbimpl_fl_reverse_raw_raw(struct RBasic *obj, VALUE flags) ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:348:31: warning: incompatible pointer types passing 'struct RBasic *' to parameter of type 'struct RBasic *' [-Wincompatible-pointer-types] rbimpl_fl_reverse_raw_raw(RBASIC(obj), flags); ^~~~~~~~~~~ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rbasic.h:34:30: note: expanded from macro 'RBASIC' #define RBASIC(obj) RBIMPL_CAST((struct RBasic *)(obj)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/cast.h:33:28: note: expanded from macro 'RBIMPL_CAST' # define RBIMPL_CAST(expr) (expr) ^~~~~~ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:338:42: note: passing argument to parameter 'obj' here rbimpl_fl_reverse_raw_raw(struct RBasic *obj, VALUE flags) ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:465:43: error: incomplete definition of type 'struct RBasic' if (RBASIC_CLASS(x) && !(RBASIC(x)->flags & RUBY_FL_SINGLETON)) { ~~~~~~~~~^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/fl_type.h:465:34: note: forward declaration of 'struct RBasic' if (RBASIC_CLASS(x) && !(RBASIC(x)->flags & RUBY_FL_SINGLETON)) { ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rbasic.h:34:50: note: expanded from macro 'RBASIC' #define RBASIC(obj) RBIMPL_CAST((struct RBasic *)(obj)) ^ In file included from breakpoint.c:1: In file included from ./byebug.h:4: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby.h:38: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/ruby.h:25: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic.h:23: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/arithmetic/char.h:29: /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rstring.h:74:19: error: field has incomplete type 'struct RBasic' struct RBasic basic; ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rstring.h:74:12: note: forward declaration of 'struct RBasic' struct RBasic basic; ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rstring.h:109:26: error: incomplete definition of type 'struct RBasic' VALUE f = RBASIC(str)->flags; ~~~~~~~~~~~^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rstring.h:74:12: note: forward declaration of 'struct RBasic' struct RBasic basic; ^ In file included from breakpoint.c:1: In file included from ./byebug.h:4: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby.h:38: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/ruby.h:26: In file included from /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core.h:23: /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rarray.h:88:19: error: field has incomplete type 'struct RBasic' struct RBasic basic; ^ /Users/fmbraga/.asdf/installs/ruby/3.0.1/include/ruby-3.0.0/ruby/internal/core/rstring.h:74:12: note: forward declaration of 'struct RBasic' struct RBasic basic; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 6 warnings and 20 errors generated. make: *** [breakpoint.o] Error 1 make failed, exit code 2 Gem files will remain installed in /Users/fmbraga/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/byebug-11.1.3 for inspection. Results logged to /Users/fmbraga/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/extensions/x86_64-darwin-21/3.0.0/byebug-11.1.3/gem_make.out ```

Steps to reproduce the problem

Steps:

  1. gem install byebug -v '11.1.3' --source 'https://rubygems.org/'
fmbraga commented 3 years ago

I worked around this problem by downloading byebug, patching it, and installing a local-compiled gem.

This patch allows CFLAGS into makefile.

--- a/ext/byebug/extconf.rb
+++ b/ext/byebug/extconf.rb
@@ -5,6 +5,7 @@ require "mkmf"
 makefile_config = RbConfig::MAKEFILE_CONFIG

 makefile_config["CC"] = ENV["CC"] if ENV["CC"]
+makefile_config["CFLAGS"] = ENV["CFLAGS"] if ENV["CFLAGS"]

 makefile_config["CFLAGS"] << " -gdwarf-2 -g3 -O0" if ENV["debug"]

It was pretty straightforward from there on:

$ export CFLAGS="-fdeclspec"
$ bundle exec rake build --trace
** Invoke build (first_time)
** Execute build
byebug 11.1.3 built to pkg/byebug-11.1.3.gem.
$ gem install pkg/byebug-11.1.3.gem
Building native extensions. This could take a while...
Successfully installed byebug-11.1.3
Parsing documentation for byebug-11.1.3
Installing ri documentation for byebug-11.1.3
Done installing documentation for byebug after 17 seconds
1 gem installed
garrettgregor commented 1 year ago

Maybe this is a stupid question, but how does one "patch" the byebug file? I've tried a lot of things so far, (a new user account and test environment, updated ruby gems manually, tried to update byebug manually, amongst other steps listed below

I ran gem install bundler in the /ruby-exercises folder, for which it seemed to be successful (error log attached) Bundle_install_output_230224.txt :

garrettgregor@One-Pro-to-Rule-them-All ruby_exercises % gem install bundler
Successfully installed bundler-2.4.7
Parsing documentation for bundler-2.4.7
  1. After that I ran bundle install as per the directions and the following output happened (attached because it’s too long to paste)
  2. I’ve tried to install gem install byebug by itself and it seems that some others with M1 architecture might have similar issues I don’t know what’s happening, but fwiw, I had no issues with the computer setup initially and here’s what -v produces for ruby, bundle, etc.: Ruby ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [arm64-darwin22] Bundle Bundler version 2.4.7 Gem 3.1.4 Gem list
    
    *** LOCAL GEMS ***

benchmark (default: 0.1.0) bigdecimal (default: 2.0.0) bundler (2.4.7, default: 2.1.4) cgi (default: 0.1.0) csv (default: 3.1.2) date (default: 3.0.0) dbm (default: 1.1.0) delegate (default: 0.1.0) did_you_mean (default: 1.4.0) diff-lcs (1.5.0) etc (default: 1.1.0) fcntl (default: 1.0.0) fiddle (default: 1.0.0) fileutils (default: 1.4.1) forwardable (default: 1.3.1) getoptlong (default: 0.1.0) io-console (default: 0.5.6) ipaddr (default: 1.2.2) irb (default: 1.2.6) json (default: 2.3.0) logger (default: 1.4.2) matrix (default: 0.2.0) minitest (5.13.0) mutex_m (default: 0.1.0) net-pop (default: 0.1.0) net-smtp (default: 0.1.0) net-telnet (0.2.0) observer (default: 0.1.0) open3 (default: 0.1.0) openssl (default: 2.1.2) ostruct (default: 0.2.0) power_assert (1.1.7) prime (default: 0.1.1) pstore (default: 0.1.0) psych (default: 3.1.0) racc (default: 1.4.16) rake (13.0.1) rdoc (default: 6.2.1) readline (default: 0.0.2) readline-ext (default: 0.1.0) reline (default: 0.1.5) rexml (default: 3.2.3) rspec (3.12.0) rspec-core (3.12.1) rspec-expectations (3.12.2) rspec-mocks (3.12.3) rspec-support (3.12.0) rss (default: 0.2.8) sdbm (default: 1.0.0) singleton (default: 0.1.0) stringio (default: 0.1.0) strscan (default: 1.0.3) test-unit (3.3.4) timeout (default: 0.1.0) tracer (default: 0.1.0) uri (default: 0.10.0) webrick (default: 1.6.0) xmlrpc (0.3.0) yaml (default: 0.1.0) zlib (default: 1.1.0)

brew

Homebrew 3.6.20 Homebrew/homebrew-core (git revision 26525bc26ba; last commit 2023-01-31) Homebrew/homebrew-cask (git revision c61202fc5d; last commit 2023-02-01)


byebug
`zsh: command not found: byebug`
maxirmx commented 1 year ago