Mojave compatibility issues
KernelPanicAUS opened this issue · 9 comments
This gem seems to have some compatibility issues with Mac os x Mojave.
$ sudo gem install rubocop
current directory: /Library/Ruby/Gems/2.3.0/gems/jaro_winkler-1.5.1/ext/jaro_winkler
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20181104-27213-qfkou.rb extconf.rb
creating Makefile
current directory: /Library/Ruby/Gems/2.3.0/gems/jaro_winkler-1.5.1/ext/jaro_winkler
make "DESTDIR=" clean
current directory: /Library/Ruby/Gems/2.3.0/gems/jaro_winkler-1.5.1/ext/jaro_winkler
make "DESTDIR="
make: *** No rule to make target `/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin18/ruby/config.h', needed by `adj_matrix.o'. Stop.
make failed, exit code 2
Any ideas how this can be fixed?
Thanks for reporting, unfortunately, I am not able to reproduce with ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin18]
. Can you give more details about your environment?
It may have something to do with building environment. I wonder if you are able to install any C-extension like nokogiri
? For example gem install -f nokogiri
.
that seems to have blown up as well
"xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin18 -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -g -Os -pipe -DHAVE_GCC_ATOMIC_BUILTINS conftest.c -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib -L. -lruby.2.3.0 -lpthread -ldl -lobjc "
In file included from conftest.c:1:
In file included from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby.h:33:
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h:24:10: fatal error: 'ruby/config.h' file not found
#include "ruby/config.h"
^~~~~~~~~~~~~~~
1 error generated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
I'm using a new Mac and have only just upgraded to Mojave, so its a very clean environment and have not installed these gems at all prior to the upgrade.
I have double checked and I definitely have the xcode command line tools installed...
I'm also having this issue. I have Xcode Command Line Tools installed. Related to rubocop/rubocop#5989.
It happens when I try to install either rubocop
or jaro_winkler
.
It seems like a lot of people are affected by the issue.
Would be nice to see a fix in the near future. Thanks
@rodrigobdz The images you gave does not contain informations, you have to provde the contents ofgem_make.out
file. Since I am not able to reproduce, I need your help, thanks!
I'm also getting this error:
make: *** No rule to make target `/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin18/ruby/config.h', needed by `adj_matrix.o'. Stop.
I don't have a dir named universal-darwin18
there, I have universal-darwin17
. Guessing that's an Apple issue with Mojave?
I've managed to overcome this issue with the following steps:
- Use
chruby
andruby-install
to install a clean version of ruby. - Install the full xcode package and its cli tools.
Since then I've managed to install a whole bunch of gems with native extensions without any issues.
This leads me to suspect that the version of ruby shipped with Mojave is missing a bunch of C headers that make installing any gems with native extensions a massive pain in the rear.
It might be worth adding something to the Readme for Mojave users 🤔
The problem is that Apple can't decide whether to keep that include
directory around…
- 10.11:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include
exists. - 10.12:
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include
does not exist. - 10.13: ^ that directory ^ does exist.
- 10.14: ^ that directory ^ does not exist.
Strange.