-
Notifications
You must be signed in to change notification settings - Fork 15.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to install google-protobuf gem on JRuby #1594
Comments
@blowmage, is any EAT or temporary solution for this bug fix? I am stuck on this bug for week. |
@genghuiluo I think @xfxyjwf might be better to able to answer than me. |
The 3.0.0 release notes say:
Will this be reflected in the ruby gem as well? |
JRuby is supported when running from source, but I am not 100% the gem is built properly to allow this. Can someone who knows more about JRuby look at our Rakefile and let us know what we need to change about it to support JRuby? https://github.com/google/protobuf/blob/master/ruby/Rakefile |
I have a small amount of experience making gems, but no experience making JRuby binary gems; it's kind of unnecessary in a way -- it is possible to just package the JAR in the normal gem, then use it if you're running inside JRuby. Quite a few gems work this way. All that said, I'm using JRuby, and I'd like to use Protocol Buffers, so I'm eager to see this resolved. So I'm willing to help where I can, but I guess I need to know more about the build process you're using to generate all the binary gems you're distributing. |
+1
|
+1 Same error installing protobuf gem on OSX |
Could the problem here just be that a protobuf with the "java" platform suffix hasn't been uploaded to rubygems? (e.g., google-protobuf--java.gem) When building the package, the I'm not sure exactly how to change the Rakefile to do this, (I think that normally the java extension task for rake does this sort of thing automatically) but my guess is that building only with maven is preventing the proper naming from happening? |
Proposed fix for protocolbuffers#1594
❓ @haberman ❓ |
Please release (Here's a copy of the java gem built from master.) |
I'm not familiar with ruby or jruby. Do we need to do a jruby specific release, or just another normal ruby gem release will fix the issue? 3.1.0 is already out. The next release will likely be 3.2.0 this quarter. |
Yes, just a JRuby 3.1.0 gem. It's possible to release just a 3.1.0 interterm JRuby On the box of whomever has rubygem write credentials: curl -LO https://gist.github.com/steakknife/0773a917ffc52631d8f42e7ad330a6d5/raw/30c43722610c50a88581fe6f105b65e7deed2027/google-protobuf-3.1.0-java.gem
# or build it yourself: cd ruby; rake build && gem build *.gemspec
gem push google-protobuf-3.1.0-java.gem |
I don't know who has the credentials - @haberman perhaps? |
@JasonLunn That won't scale because the git repo doesn't include the jar, bundler can't build it from source without all files present. It would be better for everyone if this were released correctly. |
I went ahead and pushed a JRuby gem as version 3.1.0.0.pre. Frankly I know little about Ruby so I am not sure if the gem is sane or not; if the JRuby users on this thread could test it out and let me know if it works I would really appreciate it. If it looks OK then I'll push it as 3.1.0. |
Works for me, in that I can get the gem from RubyGems and it appears well formed after installation. I can't yet install the |
Thanks, Jason. I think I'll just wait a few more days to see if anyone else has feedback and then push the gem as 3.1.0. I'll keep an eye on the gRPC issue, too (grpc/grpc#6705). |
I have managed to build jruby version of gem using Rakefile after some tweaks.
|
I'm a JRuby team member offering any assistance to get this gem updated and released for JRuby users. Let me know what I can do to help resolve this. JRuby is actively maintained and in use by hundreds of organizations around the world. Feel free to stop by our Matrix channel (#jruby) or IRC (#jruby on Freenode) or Gitter (jruby/jruby) if you have questions or need assistance. |
@headius the latest version of this gem (Or at least the 3.8.x series), have proper versioned support (So work correctly for everything aside from JRuby that is advertised). If you start there and pull down the project and try fixing it up, it would be a good starting place. |
I have changed jobs and so I am no longer in a JRuby-shop full time. Despite that, I'm interested and willing to help solve this again, but I don't think it is unreasonable to ask for more investment from the maintainers. If the community provides a second fix for this issue, there should be a commitment from Google to support JRuby on this gem going forward. Ideally, this would come in the form of:
|
Is anyone aware of any version >=
|
At cucumber we use We've removed JRuby from our accepted build matrix also - https://github.com/cucumber/cucumber-ruby/blob/master/.circleci/config.yml - So we just don't bother with it any more. |
That's really unfortunate. |
Hello all; I wanted to try jruby with protobuf and stumbled upon this issue.
Just for anyone interested - after jumping through hoops I managed to install locally compiled gem, but instantly got the same result just to see that the wrapper was kinda abandoned 🙈 Additionally it seems release for jruby wasn't pushed to rubygems since version 3.5.0pre? that is why recent version will fail while trying to build native c extension, but as said it's not the biggest problem here so if you're here for a quick solution regarding using proto3 with jruby. Tl;dr: there is no quick solution 😅 |
Perhaps someone could try to restore the old JRuby implementation and we can go from there? I would like to help but we're swamped with JRuby release 9.2.10 work right now, and I know nothing about how this gem is structured. |
If I understood the issues I'm watching correctly, cucumber switched to the pure ruby implementation https://github.com/ruby-protobuf/protobuf, so this should no longer be a problem for them. Of course, that doesn't change the status of this issue, but perhaps it can provide a way out to others facing the same issues. |
This should be fixed by #7923, but I'm leaving this open to verify that the packages get updated correctly. |
@haberman if you have time could you pop some thoughts onto the cucumber repo. I'm happy to work / pair on anything you need help with. |
With the release of 3.19.1 last week, https://rubygems.org/gems/google-protobuf/versions/3.19.1-java is available. Does this fully address the originally reported issue? |
@JasonLunn I was able to use install |
Still |
@JasonLunn It sounds like you had made some progress on a JRuby extension for the grpc gem. Anything I can do to help get that finished and into a grpc release? |
gRPC is the next level of abstraction up. I haven't tackled it beyond a short-lived effort a few years ago (see grpc/proposal#13). The work done here was strictly at the protocol buffers level, on top of which gRPC is built. |
So based on comments there, the wrapper you made is probably too old to be appropriate, @rdubya was hoping to have some time early last year to help, and other than that I don't know if any progress has been made. Seems like there's still demand for this. |
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:
Here is the install on linux:
The text was updated successfully, but these errors were encountered: