Skip to content

Unable to install google-protobuf gem on JRuby #1594

@blowmage

Description

@blowmage

The glcoud-ruby project has an issue opened by a user (googleapis/google-cloud-ruby#712) that is unable to install the latest version due to the dependencies on the grpc and google-protobuf gems not installing on jruby. I am not able to get the google-protobuf gem to install using versions 9.1.1.0 or 9.0.0.0.

Here is the install on mac:

$ ruby -v
jruby 9.1.1.0 (2.3.0) 2016-05-19 fe84e89 Java HotSpot(TM) 64-Bit Server VM 25.91-b14 on 1.8.0_91-b14 +jit [darwin-x86_64]

$ gem install --ignore-dependencies google-protobuf -v 3.0.0.alpha.5.0.5.1
Building native extensions.  This could take a while...
ERROR:  Error installing google-protobuf:
    ERROR: Failed to build gem native extension.

    current directory: /Users/blowmage/.gem/repos/jruby-9.1.1.0-grpc/gems/google-protobuf-3.0.0.alpha.5.0.5.1/ext/google/protobuf_c
/Users/blowmage/.rubies/jruby-9.1.1.0/bin/jruby -r ./siteconf20160524-43044-1fuqmwb.rb extconf.rb
NotImplementedError: C extensions are not supported
    <top> at /Users/blowmage/.rubies/jruby-9.1.1.0/lib/ruby/stdlib/mkmf.rb:1
  require at org/jruby/RubyKernel.java:944
   (root) at /Users/blowmage/.rubies/jruby-9.1.1.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
    <top> at extconf.rb:3

extconf failed, exit code 1

Gem files will remain installed in /Users/blowmage/.gem/repos/jruby-9.1.1.0-grpc/gems/google-protobuf-3.0.0.alpha.5.0.5.1 for inspection.
Results logged to /Users/blowmage/.gem/repos/jruby-9.1.1.0-grpc/extensions/universal-java-1.8/2.3.0/google-protobuf-3.0.0.alpha.5.0.5.1/gem_make.out

Here is the install on linux:

$ ./bin/jruby -v
jruby 9.1.1.0 (2.3.0) 2016-05-19 fe84e89 OpenJDK 64-Bit Server VM 24.95-b01 on 1.7.0_95-b00 +jit [linux-x86_64]

$ ./bin/jruby -S gem install --ignore-dependencies google-protobuf -v 3.0.0.alpha.5.0.5.1
Building native extensions.  This could take a while...
ERROR:  Error installing google-protobuf:
    ERROR: Failed to build gem native extension.

    current directory: /home/vagrant/.rvm/gems/ruby-2.3.0/gems/google-protobuf-3.0.0.alpha.5.0.5.1/ext/google/protobuf_c
/home/vagrant/jruby-9.1.1.0/bin/jruby -r ./siteconf20160524-3528-jeg3gw.rb extconf.rb
NotImplementedError: C extensions are not supported
    <top> at /home/vagrant/jruby-9.1.1.0/lib/ruby/stdlib/mkmf.rb:1
  require at org/jruby/RubyKernel.java:944
   (root) at /home/vagrant/jruby-9.1.1.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
    <top> at extconf.rb:3

extconf failed, exit code 1

Gem files will remain installed in /home/vagrant/.rvm/gems/ruby-2.3.0/gems/google-protobuf-3.0.0.alpha.5.0.5.1 for inspection.
Results logged to /home/vagrant/.rvm/gems/ruby-2.3.0/extensions/universal-java-1.7/2.3.0/google-protobuf-3.0.0.alpha.5.0.5.1/gem_make.out

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions