Skip to content
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

Error while calling Julia from R: R version: 4.3.1, Julia version is 1.9.2. #205

Open
yevgenryeznik opened this issue Aug 1, 2023 · 1 comment

Comments

@yevgenryeznik
Copy link

When I try to run the command:

JuliaCall::julia_setup()

I get the following error:

Julia version 1.9.2 at location /Applications/Julia-1.9.app/Contents/Resources/julia/bin will be used.
Loading setup script for JuliaCall...
LoadError("/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/JuliaCall/julia/setup.jl", 16, LoadError("/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/JuliaCall/julia/JuliaObject.jl", 75, ErrorException("syntax: Global method definition around /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/JuliaCall/julia/JuliaObject.jl:77 needs to be placed at the top level, or use "eval"."))) Error in .julia$cmd(paste0(Rhomeset, "Base.include(Main,"", system.file("julia/setup.jl", :
Error happens when you try to execute command ENV["R_HOME"] = "/Library/Frameworks/R.framework/Resources";Base.include(Main,"/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/JuliaCall/julia/setup.jl") in Julia.
To have more helpful error messages,
you could considering running the command in Julia directly

sessionInfo()

R version 4.3.1 (2023-06-16)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Ventura 13.4.1

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/Stockholm
tzcode source: internal

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] compiler_4.3.1 tools_4.3.1 rstudioapi_0.15.0 Rcpp_1.0.11 JuliaCall_0.17.5
[6] knitr_1.43 xfun_0.39

@wzhorton
Copy link

wzhorton commented Aug 2, 2023

Your issue is a duplicate of #203. TL:DR; a fix has been identified and will appear on CRAN eventually. To get the change now, either add @eval to the front of line 77 of JuliaObject.jl yourself or install JuliaCall using the devtools package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants