casperisfine opened a new pull request #2464:
URL: https://github.com/apache/thrift/pull/2464
Since the extconf.rb pass `-Werror`, the gem won't compile.
```
$ ruby --version
ruby 3.1.0dev (2021-10-06T06:42:37Z master d53493715c) [x86_64-darwin20]
$ gem install thrift
Building native extensions. This could take a while...
ERROR: Error installing thrift:
ERROR: Failed to build gem native extension.
current directory: /Users/byroot/.gem/ruby/3.1.0/gems/thrift-0.15.0/ext
/opt/rubies/3.1.0-dev/bin/ruby -I /opt/rubies/3.1.0-dev/lib/ruby/3.1.0 -r
./siteconf20211013-11520-x7l42b.rb extconf.rb
checking for strlcpy() in string.h... yes
creating Makefile
current directory: /Users/byroot/.gem/ruby/3.1.0/gems/thrift-0.15.0/ext
make DESTDIR\= clean
current directory: /Users/byroot/.gem/ruby/3.1.0/gems/thrift-0.15.0/ext
make DESTDIR\=
compiling binary_protocol_accelerated.c
binary_protocol_accelerated.c:85:27: error: implicit conversion loses
integer precision: 'long' to 'int32_t' (aka 'int') [-Werror,-Wshorten-64-to-32]
write_i32_direct(trans, RSTRING_LEN(str));
~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~
/opt/rubies/3.1.0-dev/include/ruby-3.1.0/ruby/internal/core/rstring.h:50:27:
note: expanded from macro 'RSTRING_LEN'
#define RSTRING_LEN RSTRING_LEN
^
binary_protocol_accelerated.c:226:27: error: implicit conversion loses
integer precision: 'long' to 'int32_t' (aka 'int') [-Werror,-Wshorten-64-to-32]
write_i32_direct(trans, RSTRING_LEN(buf));
~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~
/opt/rubies/3.1.0-dev/include/ruby-3.1.0/ruby/internal/core/rstring.h:50:27:
note: expanded from macro 'RSTRING_LEN'
#define RSTRING_LEN RSTRING_LEN
^
binary_protocol_accelerated.c:406:15: error: implicit conversion loses
integer precision: 'long long' to 'int' [-Werror,-Wshorten-64-to-32]
VERSION_1 = rb_num2ll(rb_const_get(thrift_binary_protocol_class,
rb_intern("VERSION_1")));
~
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
binary_protocol_accelerated.c:407:18: error: implicit conversion loses
integer precision: 'long long' to 'int' [-Werror,-Wshorten-64-to-32]
VERSION_MASK = rb_num2ll(rb_const_get(thrift_binary_protocol_class,
rb_intern("VERSION_MASK")));
~
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
binary_protocol_accelerated.c:408:15: error: implicit conversion loses
integer precision: 'long long' to 'int' [-Werror,-Wshorten-64-to-32]
TYPE_MASK = rb_num2ll(rb_const_get(thrift_binary_protocol_class,
rb_intern("TYPE_MASK")));
~
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 errors generated.
make: *** [binary_protocol_accelerated.o] Error 1
```
cc @Jens-G
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]