-
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
libruby.so.2.4
dependency issue with google-protobuf
ruby gem 3.5.1.1
#4210
Comments
Is this the same issue as #4235? If so, it should be fixed with the 3.5.1.2 gem. |
Sounds like it. Let me try it out. |
Hmm... Seems like the same issue persists for
|
BTW, we are using Ruby 2.4. |
We used the ruby building environment from grpc to release the gems. The difference between 3.5.1 and 3.5.1.1 is a newly supported ruby2.5 release. I don't know if there's anything changed for 2.4. Adding grpc folks to take a look: @apolcyn and @nicolasnoble |
The thing from the log of the OP that sticks out the most is:
... the directory is not the platform specific
but is instead trying to load the fallback binary normally expected to be used on source builds. The grpc docker file updates that added ruby 2.5 support do make a change to that "fallback binary" in that it now depends on the |
I did another check. It seems only the x86_64_linux gem contains the protobuf_c.so outside of the platform specific directoryes.
The |
Reading through rake-compiler extensiontask.rb for the root of this.... and this appears to be just the intended behavior of rake-compiler when doing a What I'm still wondering though is why the |
Thanks for the investigation. I'm wondering why this wasn't the case before we add the 2.5 support. Is there anyway to workaround the issue? e.g. force running the cross compile docker even the platform is the same; or static link libruby.so without cross compile? Also, I checked the fallback protobuf_c.so, on the machine I built the gem:
The libruby.so.2.4 is also not found. There must be something wrong with the rake-compiler configuration.. |
Hmm, my installed ruby version was 2.3. But this should not matter as we use the docker environment. Also the gem can be installed and tested successfully in my machine as I'm probably hitting the platform specific extension. |
The version of ruby installed on your machine shouldn't make a difference, since the ruby installation installed with rvm in the docker file is what we're using to compile/link that "fallback" shared object. Is suspect that there is some difference between the installed ruby version in the new vs. old docker file. Still though, the real bug here is the fact that the fallback binary is getting used at all. When a platform-specific gem package is installed that contains pre-built binaries, we should always be using the |
@blowmage Did you see any issues using the ruby2.4 native gem? |
@pherl No, we don't see any issues running the native gem (x86_64-linux) using Ruby 2.4. Here is the latest CI build using that combination: https://circleci.com/gh/GoogleCloudPlatform/google-cloud-ruby/3187#tests/containers/0 |
Does anyone have a tip for how to reproduce this? I am able to load google-protobuf without issues when running in a I am also able to On Debian 9, I installed the fluentd logging agent via
and then did:
... but it still works. I haven't yet tried running the logging agent with protobuf 3.5.1.1 on a debian 8 machine though. @qingling128 do you know if debian 8 is the only distribution that this failure happens on? update I'm also seeing |
Actually, @qingling128, could you try the following: in your folder, change the following: In
And then try to reload the extension. This will give us the actual error message that's being problematic here. |
@apolcyn - Thanks for taking a look! I've tried commenting out the section above. The bundler tool we use automatically re-pull the gem when building the package though. I'll poke around to see if I can disable the auto pull. As for the reproduction, the issues comes when we are building the package. The steps are:
|
@qingling128 thanks for the repro script. Unfortunately it is not producing the error for me though. I have ran exactly those commands above, using a fresh debian 8 GCE machine, and Any ideas? update: FYI I tweaked this line in core_gems.rb to be |
@apolcyn - Oops, the instruction of switching the branch in step 1 should be Updating the line to |
@apolcyn - Turned out that when I specified
It was not required to explicit specify this dependency when we were using Ruby 2.2 though. The PR is here. |
After looking into this, IMO the main problem is on this line, As for why the error happens only in certain situations here: When we updated our docker file to be based off of rake-compiler-dock's Dockerfile, the fallback binary started getting dynamically linked to Possible fixes:
@qingling128 are 1) or 2) possible here? |
|
@qingling128 thanks for comments, I agree that those choices are not ideal.
I created a feature request for the rake-compiler gem. I don't have much of an idea for ETA. |
@apolcyn - Thank you so much! I'll keep an eye on that feature request as well. |
Train 1.4.7 added Google GCP libraries. The google-protobuf gem does not coexist in an omnibus build well because its C-extensions build seemingly for every version of Ruby which are then caught by the omnibus health check for .so files built against non-existent libraries. Example of failure can be found on protocolbuffers/protobuf#4210 Applying this pin WHICH SHOULD TOTALLY BE REMOVED when we have solved for omnibus packaging of google-protobuf. Signed-off-by: Robb Kidd <robb@thekidds.org>
Alpine Linux has its own unique set of problems, and this is most likely unrelated to this issue here. |
I see 3.6.x is released. Does it suffer the same issue? |
It looks like gRPC may have worked around protocolbuffers/protobuf#4210 via grpc/grpc#14634. This is needed to support Ruby 2.5 (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22555).
Closing as obsolete. |
When building a package with
google-protobuf-3.5.1.1
on a Debian 8 machine, we ran into this dependency error.The issue is resolved after we pinned
google-protobuf
to3.5.1
(GoogleCloudPlatform/google-fluentd#63).The text was updated successfully, but these errors were encountered: