Using Ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-darwin15.4.0]
I am trying to install Thrift
but having issues with it
Installing thrift 0.9.3.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/dericw/.rvm/rubies/ruby-2.0.0-p648/bin/ruby -r ./siteconf20160405-76400-1s15eu8.rb extconf.rb --with-cppflags=-D_FORTIFY_SOURCE=0
checking for strlcpy() in string.h... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling binary_protocol_accelerated.c
compiling bytes.c
compiling compact_protocol.c
compact_protocol.c:442:41: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
rb_exc_raise(get_protocol_exception(INT2FIX(-1), rb_str_new2(buf)));
^~~~~~~~~~~
/Users/dericw/.rvm/rubies/ruby-2.0.0-p648/include/ruby-2.0.0/ruby/ruby.h:241:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
~~~~~~~~~~~~~~~~~~~^
compact_protocol.c:451:41: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
rb_exc_raise(get_protocol_exception(INT2FIX(-1), rb_str_new2(buf)));
^~~~~~~~~~~
/Users/dericw/.rvm/rubies/ruby-2.0.0-p648/include/ruby-2.0.0/ruby/ruby.h:241:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
~~~~~~~~~~~~~~~~~~~^
2 errors generated.
make: *** [compact_protocol.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/dericw/.rvm/gems/ruby-2.0.0-p648/gems/thrift-0.9.3.0 for inspection.
Results logged to /Users/dericw/.rvm/gems/ruby-2.0.0-p648/extensions/x86_64-darwin-15/2.0.0/thrift-0.9.3.0/gem_make.out
I tried to using this command
gem install thrift -- --with-cppflags='-D_FORTIFY_SOURCE=0'
and that didn't work so I tried this one,
bundle config build.thrift --with-cppflags='-D_FORTIFY_SOURCE=0'
And after I try to bundle install
it gives the same error.
I am running this on Mac OS X El Capitan 10.11.4. Anyone know how to solve this? Thank you!