ruby '2.5.0' gem 'rails', '~> 5.1.2' 捆绑版本 1.17.3 MAC OS 版本 MAC OS Big Sur 11.6
已尝试的解决方案 1)gem install thrift -- --with-cppflags="-D_FORTIFY_SOURCE=0 -Wno-shift-negative-value" 2)gem install thrift -v '0.9.3.0' -- --with-cppflags= '-D_FORTIFY_SOURCE=0'
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/ijain/.rvm/gems/ruby-2.5.0/gems/thrift-0.9.3.0/ext
/Users/ijain/.rvm/rubies/ruby-2.5.0/bin/ruby -I /Users/ijain/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0 -r
./siteconf20211001-29299-1tv02zv.rb extconf.rb --with-cflags\=-Wno-implicit-function-declaration
checking for strlcpy() in string.h... yes
creating Makefile
current directory: /Users/ijain/.rvm/gems/ruby-2.5.0/gems/thrift-0.9.3.0/ext
make DESTDIR\= clean
current directory: /Users/ijain/.rvm/gems/ruby-2.5.0/gems/thrift-0.9.3.0/ext
make DESTDIR\=
compiling binary_protocol_accelerated.c
binary_protocol_accelerated.c:404:68: error: '(' and '{' tokens introducing statement expression appear …Run Code Online (Sandbox Code Playgroud)