Closed msuchard closed 12 months ago
i use gfortran
from here: https://cran.r-project.org/bin/macosx/tools/
@msuchard : could you help me understand how you got this working? I installed thegfortran-12.2-universal.pkg
mentioned at the top of https://cran.r-project.org/bin/macosx/tools/ and used sudo ln -s /opt/gfortran /usr/local/gfortran
to redirect R to the right location, but it comlains:
ld: warning: search path '/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0' not found
which indeed does not exist, but /usr/local/gfortran/lib/gcc/x86_64-apple-darwin20/12.2.0
does.
Any idea which gfortran install package I should install for Sonoma on an M3?
(I tried the gfortran-4.2.3.pkg
on the same page but got some invalid architecture error)
arm64 compilers and whatnot get installed into /opt/
. please do not link to /usr/local/
(a good OS will ignore these links as user-errors). just update your ~/.R/Makevars
file.
mine reads:
F77 = /opt/gfortran/bin/gfortran
FC = /opt/gfortran/bin/gfortran
FLIBS=-L /opt/gfortran/lib
Thanks @msuchard !
gfortran
link is out-datedgfortran
in a different place than the R v4.3 gfortran installer puts it (at least on arm64 machines), so need to edit.R/Makevars
to includeFLIBS
, e.g.on my machine.