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

julia_setup() cannot find libgcc_s.1.dylib from a juliaup installation, within Quarto #207

Closed
DomDF opened this issue Aug 19, 2023 · 6 comments

Comments

@DomDF
Copy link

DomDF commented Aug 19, 2023

Hi all,

I have previously been able to successfully use JuliaCall, so thank you for your work @Non-Contradiction!

However, I am now having an error, that is very similar to the open issue here: #184.
My version of Julia (1.9.2) was also installed using juliaup

A GitHub install of JuliaCall allows me to run the following in R:
JuliaCall::julia_setup()

and the below lines in Julia:
ENV["R_HOME"] = "/Library/Frameworks/R.framework/Resources"
"/Library/Frameworks/R.framework/Resources"

However, when I try and render a Quarto (quarto.org) document with R and Julia code chunks, then I receive the same error messages regarding missing .dylib files that are present in the issue that I listed at the top of this post.

LoadError("/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/JuliaCall/julia/setup.jl", 16, InitError(:Rmath_jll, ErrorException("could not load library...
.../lib/libRmath-julia.dylib\

Library not loaded: /workspace/destdir/x86_64-apple-darwin14/lib/libgcc_s.1.dylib\n Referenced from: /Users/ddifrancesco/.../lib/libRmath-julia.dylib\n

Reason: tried: '/workspace/destdir/x86_64-apple-darwin14/lib/libgcc_s.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/workspace/destdir/x86_64-apple-darwin14/lib/libgcc_s.1.dylib' (no such file), '/workspace/destdir/x86_64-apple-darwin14/lib/libgcc_s.1.dylib' (no such file), '/Library/Frameworks/R.framework/Resources/lib/libgcc_s.1.dylib' (no such file), '/Library/Java/JavaVirtualMachines/jdk-11.0.18+10/Contents/Home/lib/server/libgcc_s.1.dylib' (no such file)")))

@cpfiffer
Copy link

What happens if you try to run Quarto from your command line? E.g.

quarto render

@DomDF
Copy link
Author

DomDF commented Aug 24, 2023

Thank you for the suggestion. Sadly, this does not resolve the issue

@likanzhan
Copy link

I think this is not specific to quarto. Because I encounter a similar error when I try to render a Rnw file with a Julia code block.

@likanzhan
Copy link

In my laptop, the file in /Library/Frameworks/R.framework/Resources/lib/libgcc_s.1.dylib is called libgcc_s.1.1.dylib.
If I rename the file libgcc_s.1.1.dylib to libgcc_s.1.dylib, it is worked as expected.

@DomDF
Copy link
Author

DomDF commented Sep 4, 2023

Hi @likanzhan,

Thanks for the suggestion. I tried this, but that gave me the following error:

dyld[42985]: Library not loaded: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libgcc_s.1.1.dylib
  Referenced from: <1199FC6B-BE2F-3AE9-ABD5-ECA4D24BC45D> /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libgfortran.5.dylib
  Reason: tried: '/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libgcc_s.1.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libgcc_s.1.1.dylib' (no such file), '/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libgcc_s.1.1.dylib' (no such file), '/Library/Frameworks/R.framework/Resources/lib/libgcc_s.1.1.dylib' (no such file), '/Library/Java/JavaVirtualMachines/jdk-11.0.18+10/Contents/Home/lib/server/libgcc_s.1.1.dylib' (no such file)

Unable to locate an installed version of R.

Did you need to made any other changes so that your version of R so that it would not look for libgcc_s.1.1.dylib?

@DomDF
Copy link
Author

DomDF commented Sep 4, 2023

OK, I think have managed to solve this by creating a copy of libgcc_s.1.1.dylib and naming it libgcc_s.1.dylib, so both R and JuliaCall find the files they are looking for.

I hope this can assist in creating a more comprehensive solution (perhaps where JuliaCall accepts the original dylib filename?) but given that I have this workaround, I am happy to close this issue.

image

@DomDF DomDF closed this as completed Sep 4, 2023
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

3 participants