OHDSI / Hades

Health Analytics Data-to-Evidence Suite (HADES): A collection of R packages for performing analytics against the Common Data Model.
https://ohdsi.github.io/Hades
Apache License 2.0
23 stars 12 forks source link

Update macos install instructions #27

Closed msuchard closed 12 months ago

msuchard commented 1 year ago
  1. gfortran link is out-dated
  2. R v4.2.3 looks for gfortran 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 include FLIBS, e.g.
FLIBS=-L/opt/R/arm64/gfortran/lib

on my machine.

msuchard commented 1 year ago

i use gfortran from here: https://cran.r-project.org/bin/macosx/tools/

schuemie commented 1 year ago

@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?

schuemie commented 1 year ago

(I tried the gfortran-4.2.3.pkg on the same page but got some invalid architecture error)

msuchard commented 1 year ago

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
schuemie commented 12 months ago

Thanks @msuchard !