deivid-rodriguez / byebug

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

[macOS][11.4] ERROR: Error installing byebug 11.1.3 #822

Open conradwt opened 3 years ago

conradwt 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: ```text ➜ 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/conradwt/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/byebug-11.1.3/ext/byebug /Users/conradwt/.rbenv/versions/3.0.2/bin/ruby -I /Users/conradwt/.rbenv/versions/3.0.2/lib/ruby/3.0.0 -r ./siteconf20210716-35520-iywxhf.rb extconf.rb creating Makefile current directory: /Users/conradwt/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/byebug-11.1.3/ext/byebug make DESTDIR\= clean current directory: /Users/conradwt/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/byebug-11.1.3/ext/byebug make DESTDIR\= compiling breakpoint.c 2021-07-16 12:55:41.813 xcodebuild[35657:204478] [MT] DVTPlugInManager: Required plug-in compatibility UUID 42E1F17B-27B3-4DE8-92A8-DC76BA4F5921 for DVTCoreGlyphs.framework (com.apple.dt.DVTCoreGlyphs) not present 2021-07-16 12:55:41.814 xcodebuild[35657:204478] [MT] DVTPlugInManager: Required plug-in compatibility UUID 42E1F17B-27B3-4DE8-92A8-DC76BA4F5921 for GraphQL.ideplugin (com.apollographql.xcode.graphql) not present In file included from breakpoint.c:1: In file included from ./byebug.h:4: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby.h:38: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/ruby.h:23: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/defines.h:73: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/backward/2/attributes.h:43: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/attr/pure.h:25: /Users/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby.h:38: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/ruby.h:24: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/anyargs.h:77: /Users/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby.h:38: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/ruby.h:25: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic.h:23: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic/char.h:23: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic/int.h:26: /Users/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby.h:38: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/ruby.h:25: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic.h:23: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic/char.h:29: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/core/rstring.h:28: /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/core/rbasic.h:46:14: error: expected parameter declarator RUBY_ALIGNAS(SIZEOF_VALUE) ^ /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/value.h:41:23: note: expanded from macro 'SIZEOF_VALUE' # define SIZEOF_VALUE SIZEOF_LONG ^ /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/x86_64-darwin20/ruby/config.h:62: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/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby.h:38: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/ruby.h:25: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic.h:23: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic/char.h:29: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/core/rstring.h:28: /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/core/rbasic.h:46:14: error: expected ')' /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/value.h:41:23: note: expanded from macro 'SIZEOF_VALUE' # define SIZEOF_VALUE SIZEOF_LONG ^ /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/x86_64-darwin20/ruby/config.h:62:21: note: expanded from macro 'SIZEOF_LONG' #define SIZEOF_LONG 8 ^ /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/core/rbasic.h:46:1: note: to match this '(' RUBY_ALIGNAS(SIZEOF_VALUE) ^ /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/backward/2/stdalign.h:27:22: note: expanded from macro 'RUBY_ALIGNAS' #define RUBY_ALIGNAS RBIMPL_ALIGNAS ^ /Users/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby.h:38: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/ruby.h:25: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic.h:23: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic/char.h:29: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/core/rstring.h:28: /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/core/rbasic.h:47:1: error: expected function body after function declarator RBasic { ^ /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/core/rbasic.h:82:23: error: incomplete definition of type 'struct RBasic' return RBASIC(obj)->klass; ~~~~~~~~~~~^ /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/core/rbasic.h:82:12: note: forward declaration of 'struct RBasic' return RBASIC(obj)->klass; ^ /Users/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby.h:38: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/ruby.h:25: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic.h:23: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic/char.h:29: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/core/rstring.h:30: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/fl_type.h:35: /Users/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby.h:38: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/ruby.h:25: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic.h:23: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic/char.h:29: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/core/rstring.h:30: /Users/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/fl_type.h:237:12: note: forward declaration of 'struct RBasic' return RBASIC(obj)->flags & flags; ^ /Users/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby.h:38: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/ruby.h:25: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic.h:23: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic/char.h:29: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/core/rstring.h:30: /Users/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby.h:38: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/ruby.h:25: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic.h:23: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic/char.h:29: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/core/rstring.h:30: /Users/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/fl_type.h:290:8: error: incomplete definition of type 'struct RBasic' obj->flags |= flags; ~~~^ /Users/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/cast.h:33:28: note: expanded from macro 'RBIMPL_CAST' # define RBIMPL_CAST(expr) (expr) ^~~~~~ /Users/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby.h:38: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/ruby.h:25: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic.h:23: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic/char.h:29: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/core/rstring.h:30: /Users/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/fl_type.h:315:8: error: incomplete definition of type 'struct RBasic' obj->flags &= ~flags; ~~~^ /Users/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/cast.h:33:28: note: expanded from macro 'RBIMPL_CAST' # define RBIMPL_CAST(expr) (expr) ^~~~~~ /Users/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby.h:38: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/ruby.h:25: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic.h:23: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic/char.h:29: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/core/rstring.h:30: /Users/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/fl_type.h:340:8: error: incomplete definition of type 'struct RBasic' obj->flags ^= flags; ~~~^ /Users/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/cast.h:33:28: note: expanded from macro 'RBIMPL_CAST' # define RBIMPL_CAST(expr) (expr) ^~~~~~ /Users/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby.h:38: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/ruby.h:25: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic.h:23: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/arithmetic/char.h:29: /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/core/rstring.h:74:19: error: field has incomplete type 'struct RBasic' struct RBasic basic; ^ /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/core/rstring.h:74:12: note: forward declaration of 'struct RBasic' struct RBasic basic; ^ /Users/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby.h:38: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/ruby.h:26: In file included from /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/core.h:23: /Users/conradwt/.rbenv/versions/3.0.2/include/ruby-3.0.0/ruby/internal/core/rarray.h:88:19: error: field has incomplete type 'struct RBasic' struct RBasic basic; ^ /Users/conradwt/.rbenv/versions/3.0.2/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/conradwt/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/byebug-11.1.3 for inspection. Results logged to /Users/conradwt/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/extensions/x86_64-darwin-20/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/'

jmromer commented 3 years ago

I worked around this by using an up-to-date C compiler:

% echo $CC $CXX

% gcc --version
# Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
# Apple clang version 12.0.5 (clang-1205.0.22.11)
# Target: x86_64-apple-darwin20.6.0
# Thread model: posix
# InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

% export CC=gcc-11 CXX=g++-11

% g++-11 --version
# g++-11 (Homebrew GCC 11.2.0) 11.2.0
# Copyright (C) 2021 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions.  There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% gem install byebug
# Building native extensions. This could take a while...
# Generating ctags for byebug-11.1.3
# 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 10 seconds
# 1 gem installed
juanibiapina commented 2 years ago

For me it fails with ruby 3.0 but works with ruby 3.1 in nix (without exporting any variables or changing anything).

maxirmx commented 1 year ago

https://github.com/deivid-rodriguez/byebug/issues/825#issuecomment-1566261996