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

Support Mac M1 #391

Open
vbisbest opened this issue Jan 5, 2023 · 3 comments
Open

Support Mac M1 #391

vbisbest opened this issue Jan 5, 2023 · 3 comments

Comments

@vbisbest
Copy link

vbisbest commented Jan 5, 2023

Please add support for Mac M1. Bundle currently fails when running on M1.

@dentarg
Copy link

dentarg commented Jan 5, 2023

@vbisbest Please to debug your issue further and at least include logs when reporting an issue.

Installing thin on Apple Silicon works for me:

arm64 $ uname -srm
Darwin 21.6.0 arm64

arm64 $ gem install --verbose thin
HEAD https://index.rubygems.org/
200 OK
GET https://index.rubygems.org/info/thin
200 OK
GET https://index.rubygems.org/quick/Marshal.4.8/thin-1.8.1.gemspec.rz
200 OK
GET https://index.rubygems.org/info/daemons
200 OK
GET https://index.rubygems.org/info/eventmachine
200 OK
GET https://index.rubygems.org/info/rack
200 OK
GET https://index.rubygems.org/quick/Marshal.4.8/daemons-1.4.1.gemspec.rz
200 OK
Downloading gem thin-1.8.1.gem
Downloading gem daemons-1.4.1.gem
GET https://index.rubygems.org/gems/thin-1.8.1.gem
Fetching thin-1.8.1.gem
200 OK
GET https://index.rubygems.org/gems/daemons-1.4.1.gem
Fetching daemons-1.4.1.gem
200 OK
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/LICENSE
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/README.md
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/Releases
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/call/call.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/call/call_monitor.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/daemonize/daemonize.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/ctrl_crash.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/ctrl_custom_logfiles.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/ctrl_exec.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/ctrl_exit.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/ctrl_hanging.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/ctrl_keep_pid_files.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/ctrl_monitor.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/ctrl_monitor_multiple.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/ctrl_monitor_nocrash.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/ctrl_multiple.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/ctrl_normal.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/ctrl_ontop.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/ctrl_optionparser.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/ctrl_proc.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/ctrl_proc_multiple.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/ctrl_proc_rand.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/ctrl_proc_simple.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/ctrl_slowstop.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/myserver.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/myserver_crashing.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/myserver_exiting.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/myserver_hanging.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/examples/run/myserver_slowstop.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/lib/daemons.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/lib/daemons/application.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/lib/daemons/application_group.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/lib/daemons/change_privilege.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/lib/daemons/cmdline.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/lib/daemons/controller.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/lib/daemons/daemonize.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/lib/daemons/etc_extension.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/lib/daemons/exceptions.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/lib/daemons/monitor.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/lib/daemons/pid.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/lib/daemons/pidfile.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/lib/daemons/pidmem.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/lib/daemons/reporter.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/lib/daemons/syslogio.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/daemons-1.4.1/lib/daemons/version.rb
Successfully installed daemons-1.4.1
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/CHANGELOG
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/README.md
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/Rakefile
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/bin/thin
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/example/adapter.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/example/async_app.ru
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/example/async_chat.ru
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/example/async_tailer.ru
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/example/config.ru
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/example/monit_sockets
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/example/monit_unixsock
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/example/myapp.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/example/ramaze.ru
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/example/thin.god
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/example/thin_solaris_smf.erb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/example/thin_solaris_smf.readme.txt
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/example/vlad.rake
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/ext/thin_parser/common.rl
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/ext/thin_parser/ext_help.h
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/ext/thin_parser/extconf.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/ext/thin_parser/parser.c
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/ext/thin_parser/parser.h
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/ext/thin_parser/parser.rl
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/ext/thin_parser/thin.c
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/rack/adapter/loader.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/rack/adapter/rails.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/rack/handler/thin.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/thin.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/thin/backends/base.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/thin/backends/swiftiply_client.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/thin/backends/tcp_server.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/thin/backends/unix_server.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/thin/command.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/thin/connection.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/thin/controllers/cluster.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/thin/controllers/controller.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/thin/controllers/service.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/thin/controllers/service.sh.erb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/thin/daemonizing.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/thin/headers.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/thin/logging.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/thin/request.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/thin/response.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/thin/runner.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/thin/server.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/thin/stats.html.erb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/thin/stats.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/thin/statuses.rb
/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/lib/thin/version.rb
Building native extensions. This could take a while...
current directory: /Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/ext/thin_parser
["/Users/dentarg/.arm64_rubies/3.1.2/bin/ruby", "-I", "/Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/site_ruby/3.1.0", "extconf.rb"]
checking for main() in -lc... yes
creating Makefile
current directory: /Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/ext/thin_parser
["make", "DESTDIR=", "sitearchdir=./.gem.20230105-55073-ztmb9t", "sitelibdir=./.gem.20230105-55073-ztmb9t", "clean"]

current directory: /Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/ext/thin_parser
["make", "DESTDIR=", "sitearchdir=./.gem.20230105-55073-ztmb9t", "sitelibdir=./.gem.20230105-55073-ztmb9t"]
compiling parser.c
parser.c:31:18: warning: unused variable 'http_parser_en_main' [-Wunused-const-variable]
static const int http_parser_en_main = 1;
                 ^
1 warning generated.
compiling thin.c
linking shared-object thin_parser.bundle
ld: warning: -undefined dynamic_lookup may not work with chained fixups
current directory: /Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/ext/thin_parser
["make", "DESTDIR=", "sitearchdir=./.gem.20230105-55073-ztmb9t", "sitelibdir=./.gem.20230105-55073-ztmb9t", "install"]
/usr/bin/install -c -m 0755 thin_parser.bundle ./.gem.20230105-55073-ztmb9t
current directory: /Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/ext/thin_parser
/Users/dentarg/.arm64_rubies/3.1.2/bin/ruby -I /Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/site_ruby/3.1.0 extconf.rb
current directory: /Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/ext/thin_parser
make DESTDIR\= sitearchdir\=./.gem.20230105-55073-ztmb9t sitelibdir\=./.gem.20230105-55073-ztmb9t clean
current directory: /Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/ext/thin_parser
make DESTDIR\= sitearchdir\=./.gem.20230105-55073-ztmb9t sitelibdir\=./.gem.20230105-55073-ztmb9t
current directory: /Users/dentarg/.arm64_rubies/3.1.2/lib/ruby/gems/3.1.0/gems/thin-1.8.1/ext/thin_parser
make DESTDIR\= sitearchdir\=./.gem.20230105-55073-ztmb9t sitelibdir\=./.gem.20230105-55073-ztmb9t install
/Users/dentarg/.arm64_rubies/3.1.2/bin/thin
Successfully installed thin-1.8.1
2 gems installed
arm64 $ gem list thin

*** LOCAL GEMS ***

thin (1.8.1)

@the-codetrane
Copy link

the-codetrane commented Mar 4, 2024

thin 1.8.* seems to install for me too on an M3.

thin 1.6 however does not:

Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Installing thin 1.6.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/thin-1.6.2/ext/thin_parser
/Users/michaelmcain/.asdf/installs/ruby/3.3.0/bin/ruby extconf.rb
checking for main() in -lc... yes
creating Makefile

current directory: /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/thin-1.6.2/ext/thin_parser
make DESTDIR\= sitearchdir\=./.gem.20240304-11192-lahg8b sitelibdir\=./.gem.20240304-11192-lahg8b clean

current directory: /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/thin-1.6.2/ext/thin_parser
make DESTDIR\= sitearchdir\=./.gem.20240304-11192-lahg8b sitelibdir\=./.gem.20240304-11192-lahg8b
compiling parser.c
parser.c:31:18: warning: unused variable 'http_parser_en_main' [-Wunused-const-variable]
static const int http_parser_en_main = 1;
                 ^
1 warning generated.
compiling thin.c
thin.c:242:3: error: call to undeclared function 'thin_http_parser_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  thin_http_parser_init(hp);
  ^
thin.c:242:3: note: did you mean 'http_parser_init'?
./parser.h:41:5: note: 'http_parser_init' declared here
int http_parser_init(http_parser *parser);
    ^
thin.c:260:3: error: call to undeclared function 'thin_http_parser_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  thin_http_parser_init(http);
  ^
thin.c:277:3: error: call to undeclared function 'thin_http_parser_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  thin_http_parser_init(http);
  ^
thin.c:294:3: error: call to undeclared function 'thin_http_parser_finish'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  thin_http_parser_finish(http);
  ^
thin.c:294:3: note: did you mean 'Thin_HttpParser_finish'?
thin.c:290:7: note: 'Thin_HttpParser_finish' declared here
VALUE Thin_HttpParser_finish(VALUE self)
      ^
thin.c:296:10: error: call to undeclared function 'thin_http_parser_is_finished'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  return thin_http_parser_is_finished(http) ? Qtrue : Qfalse;
         ^
thin.c:334:5: error: call to undeclared function 'thin_http_parser_execute'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    thin_http_parser_execute(http, dptr, dlen, from);
    ^
thin.c:334:5: note: did you mean 'Thin_HttpParser_execute'?
thin.c:317:7: note: 'Thin_HttpParser_execute' declared here
VALUE Thin_HttpParser_execute(VALUE self, VALUE req_hash, VALUE data, VALUE start)
      ^
thin.c:338:8: error: call to undeclared function 'thin_http_parser_has_error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    if(thin_http_parser_has_error(http)) {
       ^
thin.c:338:8: 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);
    ^
thin.c:359:10: error: call to undeclared function 'thin_http_parser_has_error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  return thin_http_parser_has_error(http) ? Qtrue : Qfalse;
         ^
thin.c:374:10: error: call to undeclared function 'thin_http_parser_is_finished'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  return thin_http_parser_is_finished(http) ? Qtrue : Qfalse;
         ^
9 errors generated.
make: *** [thin.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/thin-1.6.2 for inspection.
Results logged to /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/extensions/arm64-darwin-23/3.3.0/thin-1.6.2/gem_make.out

  /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/rubygems/ext/builder.rb:125:in `run'
  /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/rubygems/ext/builder.rb:51:in `block in make'
  /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/rubygems/ext/builder.rb:43:in `each'
  /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/rubygems/ext/builder.rb:43:in `make'
  /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/rubygems/ext/ext_conf_builder.rb:42:in `build'
  /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/rubygems/ext/builder.rb:193:in `build_extension'
  /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/rubygems/ext/builder.rb:227:in `block in build_extensions'
  /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/rubygems/ext/builder.rb:224:in `each'
  /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/rubygems/ext/builder.rb:224:in `build_extensions'
  /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/rubygems/installer.rb:852:in `build_extensions'
  /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.5.6/lib/bundler/rubygems_gem_installer.rb:76:in `build_extensions'
  /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.5.6/lib/bundler/rubygems_gem_installer.rb:28:in `install'
  /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.5.6/lib/bundler/source/rubygems.rb:205:in `install'
  /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.5.6/lib/bundler/installer/gem_installer.rb:54:in `install'
  /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.5.6/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
  /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.5.6/lib/bundler/installer/parallel_installer.rb:132:in `do_install'
  /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.5.6/lib/bundler/installer/parallel_installer.rb:123:in `block in worker_pool'
  /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.5.6/lib/bundler/worker.rb:62:in `apply_func'
  /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.5.6/lib/bundler/worker.rb:57:in `block in process_queue'
  <internal:kernel>:187:in `loop'
  /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.5.6/lib/bundler/worker.rb:54:in `process_queue'
  /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.5.6/lib/bundler/worker.rb:90:in `block (2 levels) in create_threads'

An error occurred while installing thin (1.6.2), and Bundler cannot continue.

In Gemfile:
  mailcatcher was resolved to 0.2.4, which depends on
    skinny was resolved to 0.2.4, which depends on
      thin
  ~/Code ❯ gem install thin                                                                                                                                        6s  3.3.0  20.11.0  09:19:45 AM
Building native extensions. This could take a while...
Successfully installed thin-1.8.2
Parsing documentation for thin-1.8.2
Done installing documentation for thin after 0 seconds
1 gem installed
  ~/Code ❯ gem install thin -v 1.6.2                                                                                                                                    3.3.0  20.11.0  09:19:55 AM
Building native extensions. This could take a while...
ERROR:  Error installing thin:
	ERROR: Failed to build gem native extension.

    current directory: /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/thin-1.6.2/ext/thin_parser
/Users/michaelmcain/.asdf/installs/ruby/3.3.0/bin/ruby extconf.rb
checking for main() in -lc... yes
creating Makefile

current directory: /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/thin-1.6.2/ext/thin_parser
make DESTDIR\= sitearchdir\=./.gem.20240304-12163-2f5nl1 sitelibdir\=./.gem.20240304-12163-2f5nl1 clean

current directory: /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/thin-1.6.2/ext/thin_parser
make DESTDIR\= sitearchdir\=./.gem.20240304-12163-2f5nl1 sitelibdir\=./.gem.20240304-12163-2f5nl1
compiling parser.c
parser.c:31:18: warning: unused variable 'http_parser_en_main' [-Wunused-const-variable]
static const int http_parser_en_main = 1;
                 ^
1 warning generated.
compiling thin.c
thin.c:242:3: error: call to undeclared function 'thin_http_parser_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  thin_http_parser_init(hp);
  ^
thin.c:242:3: note: did you mean 'http_parser_init'?
./parser.h:41:5: note: 'http_parser_init' declared here
int http_parser_init(http_parser *parser);
    ^
thin.c:260:3: error: call to undeclared function 'thin_http_parser_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  thin_http_parser_init(http);
  ^
thin.c:277:3: error: call to undeclared function 'thin_http_parser_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  thin_http_parser_init(http);
  ^
thin.c:294:3: error: call to undeclared function 'thin_http_parser_finish'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  thin_http_parser_finish(http);
  ^
thin.c:294:3: note: did you mean 'Thin_HttpParser_finish'?
thin.c:290:7: note: 'Thin_HttpParser_finish' declared here
VALUE Thin_HttpParser_finish(VALUE self)
      ^
thin.c:296:10: error: call to undeclared function 'thin_http_parser_is_finished'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  return thin_http_parser_is_finished(http) ? Qtrue : Qfalse;
         ^
thin.c:334:5: error: call to undeclared function 'thin_http_parser_execute'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    thin_http_parser_execute(http, dptr, dlen, from);
    ^
thin.c:334:5: note: did you mean 'Thin_HttpParser_execute'?
thin.c:317:7: note: 'Thin_HttpParser_execute' declared here
VALUE Thin_HttpParser_execute(VALUE self, VALUE req_hash, VALUE data, VALUE start)
      ^
thin.c:338:8: error: call to undeclared function 'thin_http_parser_has_error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    if(thin_http_parser_has_error(http)) {
       ^
thin.c:338:8: 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);
    ^
thin.c:359:10: error: call to undeclared function 'thin_http_parser_has_error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  return thin_http_parser_has_error(http) ? Qtrue : Qfalse;
         ^
thin.c:374:10: error: call to undeclared function 'thin_http_parser_is_finished'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  return thin_http_parser_is_finished(http) ? Qtrue : Qfalse;
         ^
9 errors generated.
make: *** [thin.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/thin-1.6.2 for inspection.
Results logged to /Users/michaelmcain/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/extensions/arm64-darwin-23/3.3.0/thin-1.6.2/gem_make.out

@ngudbhav
Copy link

ngudbhav commented Apr 30, 2024

I was able to install on Mac M1 by following the steps in this issue #365

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

4 participants