Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation Fails on Catalina #430

Closed
fny opened this issue Sep 24, 2020 · 10 comments
Closed

Installation Fails on Catalina #430

fny opened this issue Sep 24, 2020 · 10 comments

Comments

@fny
Copy link

fny commented Sep 24, 2020

Currently, thin doesn't install while installing mailcatcher on macOS Catallina. This is related to macournoyer/thin#365.

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

    current directory: /Users/faraz/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/thin-1.5.1/ext/thin_parser
/Users/faraz/.asdf/installs/ruby/2.7.1/bin/ruby -I /Users/faraz/.asdf/installs/ruby/2.7.1/lib/ruby/2.7.0 -r ./siteconf20200924-11494-letgol.rb extconf.rb
checking for main() in -lc... yes
creating Makefile

current directory: /Users/faraz/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/thin-1.5.1/ext/thin_parser
make "DESTDIR=" clean

current directory: /Users/faraz/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.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:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __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/faraz/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/thin-1.5.1 for inspection.
@ccadden
Copy link

ccadden commented Sep 28, 2020

Got mine working by running:

gem install thin -v '1.5.1' -- --with-cflags="-Wno-error=implicit-function-declaration"
gem install mailcatcher

@thomasvanholder
Copy link

thomasvanholder commented Dec 2, 2020

Running this one-liner worked for me.

gem install mailcatcher -- --with-cflags="-Wno-error=implicit-function-declaration"

@Qwertie-
Copy link

Qwertie- commented Jan 28, 2021

It looks like this issue is fixed in version 1.8.0 of thin. The cflags fix works but it would be nice if we could get the thin version updated for mailcatcher.

macournoyer/thin#364

@sj26 sj26 closed this as completed Feb 22, 2021
@mansoor-wal
Copy link

gem install mailcatcher

Got mine working by running:

gem install thin -v '1.5.1' -- --with-cflags="-Wno-error=implicit-function-declaration"
gem install mailcatcher

This worked for me.

@abaldwin88
Copy link

Got mine working by running:

gem install thin -v '1.5.1' -- --with-cflags="-Wno-error=implicit-function-declaration"
gem install mailcatcher

I had to run this on ruby 3.0.1 to get mailcatcher to install

@88patota
Copy link

Got mine working by running:

gem install thin -v '1.5.1' -- --with-cflags="-Wno-error=implicit-function-declaration"
gem install mailcatcher

This worked for me. I'm using MacBook Air m1 chip.

@TCCDevelopment
Copy link

With macOS Monterey, I had to run this to get mine working:

gem install thin -v '1.5.1' -- --with-cflags="-Wno-error=implicit-function-declaration"
gem install mailcatcher -- --with-cppflags=-I/usr/local/opt/openssl/include   

@salsasource
Copy link

Got mine working by running:

gem install thin -v '1.5.1' -- --with-cflags="-Wno-error=implicit-function-declaration"
gem install mailcatcher

This worked for me.

@K4sku
Copy link

K4sku commented Mar 28, 2023

To anyone here looking for answer: Until version 0.9.0 is released You can use gem install mailcatcher --pre
Thin dependency is updated to 1.8.0 In 0.9.0.beta2

@dilip49
Copy link

dilip49 commented Feb 15, 2024

To anyone here looking for answer: Until version 0.9.0 is released You can use gem install mailcatcher --pre Thin dependency is updated to 1.8.0 In 0.9.0.beta2

@K4sku worked for me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests