Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing on M1 mac required GNU fortran compiler (install solution) [ld: warning: directory not found for option '-L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1' ] #10

Closed
FerrenaAlexander opened this issue Mar 3, 2023 · 1 comment

Comments

@FerrenaAlexander
Copy link

Hi, just wanted to report an install issue and the fix for it, that I experienced while installing lastest version on M1 (arm64) mac.

The error:

ld: warning: directory not found for option '-L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1' 
ld: library not found for -lemutls_w clang: error: linker command failed with exit code 1 (use -v to see invocation) 
make: *** [RISC.so] Error 1

The fix, install GNU Fortran compiler:
See https://mac.r-project.org/tools/
Or, see drieslab/Giotto#441

# 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 /

#add to path
export PATH=$PATH:/opt/R/arm64/gfortran/bin

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

Then I restarted R and the install worked. Hope this helps if people run into this issue.

@cmiciano
Copy link

cmiciano commented Mar 7, 2024

thank you for posting this, much appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants