drieslab / Giotto

Spatial omics analysis toolbox
https://drieslab.github.io/Giotto_website/
Other
258 stars 98 forks source link

gfortran warning solved on M1 macOS 11.6.2 #441

Closed wyq977 closed 1 year ago

wyq977 commented 1 year ago

_This is a re-post of the https://github.com/RubD/Giotto_site/issues/11 here on Giottosite as suggested by RubD

Hi, I found out that the even with R 4.2.0 and apple silicon Macs, gfortran can still be installed manally following the instruction here. Updates on https://rubd.github.io/Giotto_site/articles/installation_issues.html#errors-on-macos might be needed. I can make a pull requests if needed on gfortran on you can simply refer users here

This is specific to Apple silicon Macs, an experimental build of GNU Fortran compiler is required otherwise errors like these would pop up during installation:

ld: warning: directory not found for option '-L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1'

This is due to no Fortran compiler and it can be solved with an experimental build given that the R is installed at /opt/R/arm64/ via Homebrew

# for R>=4.2.0
curl -O https://mac.r-project.org/tools/gfortran-12.0.1-20220312-is-darwin20-arm64.tar.xz

# unpack
sudo tar fxz gfortran-12.0.1-20220312-is-darwin20-arm64.tar.xz -C /

# /opt/R/arm64/gfortran/SDK has to point to your macOS SDK
sudo gfortran-update-sdk

Ref: https://support.bioconductor.org/p/9138121/

wyq977 commented 1 year ago

@mikeroswell We should continue the issue here as suggested by RubD.

Did you installed the gFortran (Apple silicon) from https://mac.r-project.org/tools/

mikeroswell commented 1 year ago

Got past this step, feel free to disregard, thanks! Fixed #441

RubD commented 1 year ago

Ok, we will close the issue!