Clean up some warnings in the ruby wrapping code #2476

Merged
merged 1 commit into from Jul 19, 2015

Projects

None yet

5 participants

@murgatroid99
Member

This fixes #2457 and grpc/homebrew-grpc#49 (actually the same issue).

@murgatroid99 murgatroid99 Clean up some warnings in the ruby wrapping code
87afb5d
@googlebot googlebot added the cla: yes label Jul 16, 2015
@johnwahba

@murgatroid99 looks like the build is failing.

@murgatroid99
Member

They're passing now, or at least the relevant ones are.

@johnwahba

@murgatroid99, still failing?

@nicolasnoble nicolasnoble merged commit 4368221 into grpc:master Jul 19, 2015

4 of 5 checks passed

Jenkins Build finished.
Details
Visual Studio 2013 build Merged build finished.
Details
cla/google All necessary CLAs are signed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.4%) to 87.343%
Details
@johnwahba

@nicolasnoble can this get merged into 0.10? 0.10 is still broken.

@murgatroid99 murgatroid99 referenced this pull request in grpc/grpc-experiments Jul 23, 2015
Closed

[ruby] Installing grpc gem fails to build native extension #267

@marcinwyszynski
Contributor

This is still failing at HEAD:

marcinw@bruno:~/Downloads/grpc/src/ruby$ gem build grpc.gemspec
WARNING:  bin/math.rb is missing #! line
WARNING:  bin/math_services.rb is missing #! line
WARNING:  prerelease dependency on google-protobuf (~> 3.0.0alpha.1.1) is not recommended
WARNING:  See http://guides.rubygems.org/specification-reference/ for help
  Successfully built RubyGem
  Name: grpc
  Version: 0.10.0
  File: grpc-0.10.0.gem
marcinw@bruno:~/Downloads/grpc/src/ruby$ gem install grpc-0.10.0.gem
Building native extensions.  This could take a while...
ERROR:  Error installing grpc-0.10.0.gem:
        ERROR: Failed to build gem native extension.

    /Users/marcinw/.rvm/rubies/ruby-2.2.0/bin/ruby -r ./siteconf20150723-84018-1gw0ck1.rb extconf.rb
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling rb_byte_buffer.c
compiling rb_call.c
rb_call.c:247:20: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
    array_length = RARRAY_LEN(val);
                 ~ ^~~~~~~~~~~~~~~
/Users/marcinw/.rvm/rubies/ruby-2.2.0/include/ruby-2.2.0/ruby/ruby.h:900:6: note: expanded from macro 'RARRAY_LEN'
     (long)((RBASIC(a)->flags >> RARRAY_EMBED_LEN_SHIFT) & \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rb_call.c:247:20: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
    array_length = RARRAY_LEN(val);
                 ~ ^~~~~~~~~~~~~~~
/Users/marcinw/.rvm/rubies/ruby-2.2.0/include/ruby-2.2.0/ruby/ruby.h:902:25: note: expanded from macro 'RARRAY_LEN'
     RARRAY(a)->as.heap.len)
     ~~~~~~~~~~~~~~~~~~~^~~
2 errors generated.
make: *** [rb_call.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/marcinw/.rvm/gems/ruby-2.2.0/gems/grpc-0.10.0 for inspection.
Results logged to /Users/marcinw/.rvm/gems/ruby-2.2.0/extensions/x86_64-darwin-14/2.2.0/grpc-0.10.0/gem_make.out
@marcinwyszynski
Contributor

Please kindly see #2632 for fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment