brianmario / yajl-ruby

A streaming JSON parsing and encoding library for Ruby (C bindings to yajl)
http://rdoc.info/projects/brianmario/yajl-ruby
MIT License
1.48k stars 169 forks source link

Failed to compile on MacOs (darwin20) #193

Closed bougyman closed 1 year ago

bougyman commented 4 years ago

Trying to install yajl-ruby on current macos, getting an issue where darwin19 is being detected instead of darwin20:

% gem i yajl-ruby
Building native extensions. This could take a while...
ERROR:  Error installing yajl-ruby:
        ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.6.0/gems/yajl-ruby-1.4.1/ext/yajl
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20200925-98163-1tjamyb.rb extconf.rb
creating Makefile

current directory: /Library/Ruby/Gems/2.6.0/gems/yajl-ruby-1.4.1/ext/yajl
make "DESTDIR=" clean

current directory: /Library/Ruby/Gems/2.6.0/gems/yajl-ruby-1.4.1/ext/yajl
make "DESTDIR="
make: *** No rule to make target `/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby/config.h', needed by `yajl.o'.  Stop.

make failed, exit code 2

Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/yajl-ruby-1.4.1 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/yajl-ruby-1.4.1/gem_make.out

I do not have the universal-darwin19 directory, mine is universal-darwin20. When I make the change in the Makefile directly it does compile (with a warning) when I run make in the ext directory manually. Is there a flag I can use to force the correct behavior?

Catalina Version: 10.15.6 xcode-select version 2373