Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R M1 builds will not compile packages

Tags:

macos

r

apple-m1

I have recently installed the arm64 version of R from the Mac nightly builds page. It's working great! Except - for packages that require compilation. For example, if I try and install xfun which is required for blogdown, I get the following error

ld: warning: ignoring file /usr/local/opt/llvm/lib/libc++.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: in '/usr/local/opt/llvm/lib/libunwind.dylib', building for macOS-arm64 but attempting to link with file built for macOS-x86_64

So..... how to fix this in order to keep things trucking?

For reference, here is my sessionInfo()


> sessionInfo()
R version 4.1.0 alpha (2021-04-26 r80229)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Big Sur 11.2.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRlapack.dylib

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

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

loaded via a namespace (and not attached):
[1] compiler_4.1.0 tools_4.1.0    parallel_4.1.0
like image 492
jebyrnes Avatar asked Sep 06 '25 03:09

jebyrnes


1 Answers

OK. This was due to setting some MAKEVARS from an older R installation.

I feel ashamed.

But, if anyone else is having this problem, look at ~/.R/Makevars

Now to solve gfortran issues.

like image 174
jebyrnes Avatar answered Sep 07 '25 16:09

jebyrnes



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!