-
Notifications
You must be signed in to change notification settings - Fork 141
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
Add missing librt on linux via NATS_EXTRA_LIB var #63
Conversation
Btw, here's the same jruby job pointed at my cnats branch: https://travis-ci.org/abrandoned/protobuf-nats/jobs/219008594 |
Thanks for your contribution! @abrandoned actually added If the real issue was that Let me experiment a bit and get back to you. PS: At any rate, not sure it is doing anything to add it to |
Oh yeah, I totally forgot about |
Yes, but let me think more about it. I think that what @abrandoned did was actually making such that libnats would not use clock_gettime at all. I think that your fix would be better. Let me experiment and I will get back to you. |
@film42 So I have verified that even if we add "rt" to nats target, the examples still need to be linked with "rt". Without adding "rt" in nats, you can see from Travis that the build of the library works fine. So I wonder if adding "rt" to your build (without changing anything to libnats) would not be enough. That being said, it seems that it would not cause a problem adding it to libnats? And if so, maybe we could remove the CMake flag that we added to disable use of
Thanks again! |
@kozlovic I found that I can set my own cmake global vars with master branch, so I might not need this PR after all:
So this might be good enough for me since it seems to be specific to loading in the JVM. @abrandoned are working on the same thing, so we might not end up using EDIT: I'm running travis with cmake global vars to make sure this is correct. |
@kozlovic I ran travis with |
Thank you for your contribution! |
I was working on loading cnats via the ffi gem with jruby and noticed that I was having issues loading libnats because...
This loads just fine under MRI.
I noticed we set the
NATS_EXTRA_LIB
var in the mainCMakeLists.txt
and that we use it for tests, but we we're not using it insrc/CMakeLists.txt
. Adding it back fixes the problem.Here's a failing job in travis: https://travis-ci.org/abrandoned/protobuf-nats/jobs/218995507#L761