RubD / Giotto_site

Website for the Giotto spatial toolbox
MIT License
4 stars 6 forks source link

gfortran warning solved on M1 macOS 11.6.2 #11

Closed wyq977 closed 2 years ago

wyq977 commented 2 years ago

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 2 years ago

@RubD Hi?

drieslab commented 2 years ago

Thanks for the suggestion @wyq977 . If you want you can make a pull request with an update for the installation_issues file using your suggestion.

wyq977 commented 2 years ago

@drieslab Hi, I added the guide on m1 and new apple silicon macs, on rmd only. I didn't build the html, you can review and build it.

Thx

drieslab commented 2 years ago

Perfect, thanks!

mikeroswell commented 1 year ago

I wasn't clear how to update the sdk:

sudo gfortran-update-sdk
sudo: gfortran-update-sdk: command not found
RubD commented 1 year ago

Could you post this on the Giotto issues channel? https://github.com/drieslab/Giotto/issues

This repo is for the old website and will be deleted in the future.

ScienceComputing commented 1 year ago

I was confused about updating the sdk:

sudo gfortran-update-sdk sudo: gfortran-update-sdk: command not found