Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

setting LD_LIBRARY_PATH from JuliaCall for RCall.jl #257

Open
@vandenman

Description

@vandenman

Not entirely sure if this issue should go to RCall.jl repo, but here goes.

My problem is that RCall.jl doesn't work out of the box when R is installed in a non-standard location. For example, I tend to compile R manually and switch between different versions. For RCall, this is all fine as long as I do

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/<user>/R/custom_R/R-4.5.0/lib"ENV["R_HOME"]="/home/don/R/custom_R/R-4.5.0"import PkgPkg.build("RCall")

after which I can use RCall from Julia without issues. This workaround by settingLD_LIBRARY_PATH is also documented (e.g.,https://juliainterop.github.io/RCall.jl/stable/installation/#Other-methods)

In R with JuliaCall, there is no (easy) workaround to achieve the same, hence this issue.

Instead to get JuliaCall to get this to work (i.e., to not segfault when callingjulia_setup), I had to changeinstall_dependency.jl

ENV["R_HOME"] = CurrentRhome+ENV["LD_LIBRARY_PATH"] = "/home/<user>/R/custom_R/R-4.5.0/lib"

andrebuildRCall.jl:

ENV["R_HOME"] = CurrentRhome+ENV["LD_LIBRARY_PATH"] = "/home/<user>/R/custom_R/R-4.5.0/lib"...- try-     using RCall- catch e-    Pkg.build("RCall")- end+Pkg.build("RCall")

The main reason for omitting the try and immediately calling build is that when RCall is built with a different R than it is loaded from, it segfaults and takes the calling R session along with it.

My proposal is to add some arguments tojulia_setup to allow a use to setLD_LIBRARY_PATH.

Thoughts? I'd be happy to open a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp