Comments (4)
Hi,
I had a similar issue recently.
It is likely due to the fact that one of the programs (R or Julia) is not built for the right architecture.
If you are using an M1 Max MacBook Pro, your architecture should be ARM (aarch64 or arm64).
You can check the architecture used by Julia by displaying the value of the Sys.ARCH constant (you should get :aarch64).
You can check the architecture used by R with the R.version
command.
Then, you should reinstall any program (R or Julia) that is currently not built for the right architecture, by making sure you download the right installation files.
from rcall.jl.
I think @jeanpauphilet is exactly right.
from rcall.jl.
I still obtain same error as above on M3 MacBook and Julia LTS 1.6.7
.
(@v1.6) pkg> st
Status `~/.julia/environments/v1.6/Project.toml`
...
[6f49c342] RCall v0.14.1
It works with Julia 1.8.5 and 1.10.2.
But the error is:
(@v1.6) pkg> build
Building Conda ─→ `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/51cab8e982c5b598eea9c8ceaced4b58d9dd37c9/build.log`
Building IJulia → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/47ac8cc196b81001a711f4b2c12c97372338f00c/build.log`
Building RCall ─→ `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/846b2aab2d312fda5e7b099fc217c661e8fae27e/build.log`
ERROR: Error building `RCall`:
ERROR: could not load library "/Library/Frameworks/R.framework/Resources/lib/libR.dylib"
dlopen(/Library/Frameworks/R.framework/Resources/lib/libR.dylib, 0x0001): tried: '/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (no such file), '/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libR.dylib' (no such file), '/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
ERROR: LoadError: Try adding /Library/Frameworks/R.framework/Resources/lib to the "LD_LIBRARY_PATH" environmental variable and restarting Julia.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] validate_libR(libR::String)
@ Main ~/.julia/packages/RCall/dDAVd/deps/setup.jl:26
[3] top-level scope
@ ~/.julia/packages/RCall/dDAVd/deps/build.jl:20
[4] include(fname::String)
@ Base.MainInclude ./client.jl:444
[5] top-level scope
@ none:5
in expression starting at /Users/luboshanus/.julia/packages/RCall/dDAVd/deps/build.jl:11
caused by: could not load library "/Library/Frameworks/R.framework/Resources/lib/libR.dylib"
dlopen(/Library/Frameworks/R.framework/Resources/lib/libR.dylib, 0x0001): tried: '/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (no such file), '/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libR.dylib' (no such file), '/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
Stacktrace:
[1] dlopen(s::String, flags::UInt32; throw_error::Bool)
@ Base.Libc.Libdl ./libdl.jl:114
[2] dlopen (repeats 2 times)
@ ./libdl.jl:114 [inlined]
[3] validate_libR(libR::String)
@ Main ~/.julia/packages/RCall/dDAVd/deps/setup.jl:16
[4] top-level scope
@ ~/.julia/packages/RCall/dDAVd/deps/build.jl:20
[5] include(fname::String)
@ Base.MainInclude ./client.jl:444
[6] top-level scope
@ none:5
from rcall.jl.
@luboshanus Julia 1.6 has poor support for Apple silicon -- I suspect you're actually running an x86-64 binary via Rosetta, which would be binary incompatible with linking to a native R build.
from rcall.jl.
Related Issues (20)
- why building RCall.jl failed during the registration of an package HOT 2
- RCall.jl failed to build with Conda (23.3.1) HOT 3
- "is.na() applied to non-(list or vector) of type 'language'" when passing a Julia's boolean variable to R's smooth.spline HOT 2
- Find the number of arguments for an RFunction? HOT 1
- loading RCall in atreplinit fails because of RPrompt HOT 1
- Error: attempt to apply non-function HOT 5
- [BUG] ArgumentError: malformed expression in formula HOT 3
- If julia functions which was brought to R throws an error, no real error is thrown, but an error object is returned #216 HOT 3
- Feature Request: Add possibility to build RCall without having R_HOME set HOT 3
- ERROR: UndefVarError: `val` not defined
- Segmentation fault on closing julia HOT 7
- equal `==` is not working on `reval` HOT 2
- Feature Request: Make RCall depend dynamically on `R_HOME` HOT 9
- Feature Request: show/display methods for R plots like ggplot2 HOT 3
- Could we add a point in the docs about setting up CI ? HOT 6
- ERROR: REvalError: Loading required package: mvtnorm HOT 1
- Difficulty installing RCall on a low version of julia HOT 6
- Incorrect julia compat HOT 3
- Add support for TimeZones
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rcall.jl.