Reputation: 6144
I got a new m1 mac and I can't install eventmachine
gem, full log below.
I tried these solutions:
same error.
some info:
$ sw_vers
ProductName: macOS
ProductVersion: 12.2
BuildVersion: 21D49
$ bundle --version
Bundler version 2.1.4
and the error:
$ gem install eventmachine -v '1.2.7'
em.cpp:706:13: error: use of undeclared identifier 'rb_thread_select'; did you mean 'rb_thread_fd_select'?
if ((ret = rb_thread_select(kqfd + 1, &fdreads, NULL, NULL, &tv)) < 1) {
^~~~~~~~~~~~~~~~
rb_thread_fd_select
Full output: https://gist.github.com/goldylucks/8369ea09af4f3f70d707809f4bb700df
any ideas how to solve this?
Upvotes: 10
Views: 3545
Reputation: 3160
I solved this (thanks to this tweet) with the following:
gem install eventmachine -v '1.2.7' -- --with-ldflags="-Wl,-undefined,dynamic_lookup"
Upvotes: 36
Reputation: 6144
what solved it for me was installing ruby like this:
$ arch -x86_64 rbenv install 2.5.5 # or using rvm
Upvotes: 0