sj26 / mailcatcher

Catches mail and serves it through a dream.

Home Page:http://mailcatcher.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mailcatcher install fails on ruby 3.1.0

dewyze opened this issue · comments

I was able to successfully install mailcatcher with ruby 3.0.1 using the gem install thin -v 1.5.1 -- --with-cflags="-Wno-error=implicit-function-declaration" command. However, that does not work on ruby 3.1.0.

→ gem install mailcatcher
Building native extensions. This could take a while...
ERROR:  Error installing mailcatcher:
	ERROR: Failed to build gem native extension.

    current directory: /Users/john/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/thin-1.5.1/ext/thin_parser
/Users/john/.asdf/installs/ruby/3.1.0/bin/ruby -I /Users/john/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0 -r ./siteconf20220115-4394-hbu353.rb extconf.rb
checking for main() in -lc... yes
creating Makefile

current directory: /Users/john/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/thin-1.5.1/ext/thin_parser
make DESTDIR\= clean

current directory: /Users/john/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/thin-1.5.1/ext/thin_parser
make DESTDIR\=
compiling parser.c
parser.rl:112:17: warning: comparison of integers of different signs: 'long' and 'unsigned long' [-Wsign-compare]
  assert(pe - p == len - off && "pointers aren't same distance");
         ~~~~~~ ^  ~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/assert.h:99:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __ASSERT_FILE_NAME, __LINE__, #e) : (void)0)
                        ^
parser.rl:142:7: error: implicit declaration of function 'thin_http_parser_has_error' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  if (thin_http_parser_has_error(parser) ) {
      ^
parser.rl:142:7: note: did you mean 'http_parser_has_error'?
./parser.h:44:5: note: 'http_parser_has_error' declared here
int http_parser_has_error(http_parser *parser);
    ^
parser.rl:144:14: error: implicit declaration of function 'thin_http_parser_is_finished' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  } else if (thin_http_parser_is_finished(parser) ) {
             ^
1 warning and 2 errors generated.
make: *** [parser.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/john/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/thin-1.5.1 for inspection.
Results logged to /Users/john/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/extensions/arm64-darwin-21/3.1.0/thin-1.5.1/gem_make.out

According to this issue this problem is fixed in thin 1.8.0 (currently on 1.8.1). I am able to install thing 1.8.1 just fine with no c-flags. (It fails with the c-flag command).

I think this is a mailcatcher issue at this point, but I'm not totally sure.

I'm happy to try anything you suggest or give anymore data. I saw several issues, but they were all talking about ruby 3.0.1, so I thought I would make one for 3.1.0.

Thanks for the great gem!

Logs from "gem install mailcatcher -- --with-cflags="-Wno-error=implicit-function-declaration" command
In file included from conftest.c:1:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/ruby.h:25:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/defines.h:73:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/backward/2/attributes.h:42:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/attr/pure.h:25:
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.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/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.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 conftest.c:1:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/ruby.h:26:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/anyargs.h:77:
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/intern/vm.h:383:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.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 conftest.c:1:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/ruby.h:27:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic.h:23:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic/char.h:23:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic/int.h:26:
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.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/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.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 conftest.c:1:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/ruby.h:27:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic.h:23:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/core/rstring.h:28:
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/core/rbasic.h:63:14: error: expected parameter declarator
RUBY_ALIGNAS(SIZEOF_VALUE)
             ^
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/value.h:106:23: note: expanded from macro 'SIZEOF_VALUE'
# define SIZEOF_VALUE SIZEOF_LONG
                      ^
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/arm64-darwin21/ruby/config.h:62:21: note: expanded from macro 'SIZEOF_LONG'
#define SIZEOF_LONG 8
                    ^
In file included from conftest.c:1:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/ruby.h:27:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic.h:23:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/core/rstring.h:28:
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/core/rbasic.h:63:14: error: expected ')'
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/value.h:106:23: note: expanded from macro 'SIZEOF_VALUE'
# define SIZEOF_VALUE SIZEOF_LONG
                      ^
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/arm64-darwin21/ruby/config.h:62:21: note: expanded from macro 'SIZEOF_LONG'
#define SIZEOF_LONG 8
                    ^
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/core/rbasic.h:63:1: note: to match this '('
RUBY_ALIGNAS(SIZEOF_VALUE)
^
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/backward/2/stdalign.h:27:22: note: expanded from macro 'RUBY_ALIGNAS'
#define RUBY_ALIGNAS RBIMPL_ALIGNAS /**< @copydoc RBIMPL_ALIGNAS */
                     ^
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/stdalign.h:66:44: note: expanded from macro 'RBIMPL_ALIGNAS'
# define RBIMPL_ALIGNAS(_) __declspec(align(_))
                                           ^
In file included from conftest.c:1:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/ruby.h:27:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic.h:23:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/core/rstring.h:28:
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/core/rbasic.h:64:1: error: expected function body after function declarator
RBasic {
^
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/core/rbasic.h:155:23: error: incomplete definition of type 'struct RBasic'
    return RBASIC(obj)->klass;
           ~~~~~~~~~~~^
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/core/rbasic.h:155:12: note: forward declaration of 'struct RBasic'
    return RBASIC(obj)->klass;
           ^
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/core/rbasic.h:40:57: note: expanded from macro 'RBASIC'
#define RBASIC(obj)                 RBIMPL_CAST((struct RBasic *)(obj))
                                                        ^
In file included from conftest.c:1:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/ruby.h:27:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic.h:23:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/core/rstring.h:30:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/fl_type.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/value_type.h:33:
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/error.h:86:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.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 conftest.c:1:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/ruby.h:27:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic.h:23:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/core/rstring.h:30:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/fl_type.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/value_type.h:33:
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/error.h:103:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.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 conftest.c:1:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/ruby.h:27:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic.h:23:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/core/rstring.h:30:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/fl_type.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/value_type.h:33:
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/error.h:118:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.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 conftest.c:1:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/ruby.h:27:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic.h:23:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/core/rstring.h:30:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/fl_type.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/value_type.h:33:
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/error.h:139:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.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 conftest.c:1:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/ruby.h:27:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic.h:23:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/core/rstring.h:30:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/fl_type.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/value_type.h:33:
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/error.h:151:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.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 conftest.c:1:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/ruby.h:27:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic.h:23:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/core/rstring.h:30:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/fl_type.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/value_type.h:33:
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/error.h:176:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.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 conftest.c:1:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/ruby.h:27:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic.h:23:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/core/rstring.h:30:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/fl_type.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/value_type.h:33:
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/error.h:187:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.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 conftest.c:1:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/ruby.h:27:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic.h:23:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/core/rstring.h:30:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/fl_type.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/value_type.h:33:
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/error.h:204:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.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 conftest.c:1:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/ruby.h:27:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic.h:23:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/core/rstring.h:30:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/fl_type.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/value_type.h:33:
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/error.h:216:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.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 conftest.c:1:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/ruby.h:27:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic.h:23:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/core/rstring.h:30:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/fl_type.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/value_type.h:33:
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/error.h:236:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.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 conftest.c:1:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/ruby.h:27:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic.h:23:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/core/rstring.h:30:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/fl_type.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/value_type.h:33:
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/error.h:248:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.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 conftest.c:1:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/ruby.h:27:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic.h:23:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/core/rstring.h:30:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/fl_type.h:38:
In file included from /Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/value_type.h:33:
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/error.h:287:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/john/.asdf/installs/ruby/3.1.0/include/ruby-3.1.0/ruby/internal/attr/noreturn.h:29:33: note: expanded from macro 'RBIMPL_ATTR_NORETURN'
# define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
                                ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5:   return !!argv[argc];
6: }
/* end */

Just a data point -- I get the same error

warning: comparison of integers of different signs: 'long' and 'unsigned long' [-Wsign-compare]
  assert(pe - p == len - off && "pointers aren't same distance");

when attempting to install mailcatcher with ruby 3.0.2
However, gem install mailcatcher -- --with-cflags="-Wno-error=implicit-function-declaration" does successfully complete and mailcatcher works.

I created a pull request (#496) for this issue. @sj26 maybe you'll have a bit of time to have a look. thank you!

Any updates or workarounds on this? Thanks for all the work so far -- just curious if anyone has gotten it to work!

commented

Same issue here. Any updates?

Same issue here, with same fix, but on ruby 2.7.5

Please try the latest prerelease:

gem install mailcatcher --pre