I have two versions of R on my Macbook, R 4.4 and R 3.6. The fortran compiler from [https://mac.r-project.org/tools/] is installed. R 4.4 works fine and can use the gfortran to install several packages.
However, I have a difficult time to make the gfortan work for R 3.6. One problem I ran into is: after setting FLIBS = -L/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0 in the R Makeconf file, when installing the glmnet package that uses gfortran in R 3.6, I received the following error:
ld: warning: ignoring file ‘/private/var/folders/wc/8k8lg3dd7mvcvj5zfch921300000gp/T/Rtmp9AzvoR/R.INSTALL363b114fb21a/glmnet/src/wls.o’: found architecture ‘arm64’, required architecture ‘x86_64’
Has anyone successfully installed an old version of R such as R 3.6 with gfortan on Mac with arm64 architecture?
Thank you very much!
I have also tried to create the Makeovars file inside the .R folder and set the FC, F77, and FLIBS variables, but it didn’t work.