-
Notifications
You must be signed in to change notification settings - Fork 59
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
conflict libcurl.so in Julia 1.8 #475
Comments
What exactly doesn't occur in Julia v1.7 or 1.5? I don't see how you could not get the same error without preloading. |
@giordano That is quite my confusion. Since I ran the same workflow in the GitHub actions with different Julia versions. It turns out that only Julia 1.8 failed. So I thought there should be something different in Julia 1.8. |
I asked what exactly doesn't occur, I don't think your answered the question 🙂 |
Sorry for the confusion. I mean no error when loading RCurl package in Julia julia> @rlibrary("RCurl") |
I have run into this same issue, and did a bit of digging today (though I'm well out of my depth on this, so apologies in advance for any obvious mistakes). Here's a quick Dockerfile way to recreate the problem. You can also verify that this problem didn't occur on 1.7 and earlier by changing
Can then recreate the import failure by:
Running R by itself (not from within Julia) has no issues with I think the problem is RCurl is trying to link to the version of libcurl Julia has (ie
WorkaroundExplicitly setting |
What actually changed is that Julia 1.8.4 switched to using RUNPATH instead of RPATH (which was used in Julia 1.8.3 and earlier) for specifying local library paths:
(since From https://amir.rachum.com/shared-libraries/:
|
@simonbyrne Thanks for pointing out the search order difference between In Julia 1.7.0, with BTW, I just retest it in Julia 1.8.1, calling
in all cases, RCall.jl is based on the same system R |
Hmm, so maybe the problem is caused by something else. |
I'm closing this as stale. If it's still a problem on Julia 1.10, then please open another issue. |
I am using the latest v0.13.14
RCall.jl
with R 4.2.1 and Julia 1.8.4 on Ubuntu 20.04.It works well but I found a problem related to libcurl.so.
I installed
RCurl
package in R, it works well, and theldd
status is as follows, which depends on/lib/x86_64-linux-gnu/libcurl.so.4
However, when I call it in Julia 1.8, it throws
If I understand correctly, it wants to use
/opt/hostedtoolcache/julia/1.8.4/x64/bin/../lib/julia/libcurl.so
instead of/lib/x86_64-linux-gnu/libcurl.so.4
.I have checked
ldd
inside the Julia session and the R-in-Julia session, both still show/lib/x86_64-linux-gnu/libcurl.so.4
I found a workaround, set
LD_PRELOAD=/lib/x86_64-linux-gnu/libcurl.so.4
before launching Julia. But a drawback later I found is that it would bring new problems when I useHTTP
package, which also depends on libcurl.so, so if I pre-load the system version, it would break down the HTTP package which relied on Julia's libcurl.soBut the above issue does not occur in Julia 1.7 and even Julia 1.5.
After checking the NEWs of Julia 1.8, https://docs.julialang.org/en/v1/NEWS/
I guess it might be related to
but I am not sure. I tried to understand from the
rpath
viewpoint, but failed to get the logic why loadingRCurl
R package would be conflicted with Julia's libcurl.so.Or maybe it is unrelated to the
rpath
part, but if so, why older Julia 1.7 works? Which change in Julia 1.8 caused the difference?Hope anyone can help explain it. Many thanks!
The text was updated successfully, but these errors were encountered: