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

gfortran installation not found #262

Open
t-kalinowski opened this issue Dec 15, 2024 · 0 comments
Open

gfortran installation not found #262

t-kalinowski opened this issue Dec 15, 2024 · 0 comments

Comments

@t-kalinowski
Copy link
Member

Setting up a new Mac, I ran

rig sysreqs add gfortran

producing output:

[INFO] Running `sudo` for installing gfortran. This might need your password.
Password:
[INFO] Downloading https://github.com/R-macos/gcc-darwin-arm64/releases/download/R-4.2.0-release/gfortran-12.0.1-20220312-is-darwin20-arm64.tar.xz -> /tmp/rig/gfortran-12.0.1-20220312-is-darwin20-arm64.tar.xz
[INFO] Unpacking gfortran
[INFO] Updating gfortran link to your Apple SDK
[INFO] > Updating gfortran SDK path to /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk

Then, attempting to install a package with fortran code:

==> R CMD INSTALL --preclean --no-multiarch --with-keep.source quickr.test.pkg

* installing to library/Users/tomasz/Library/R/arm64/4.4/library* installing *source* packagequickr.test.pkg...
** using staged installation
** libs
clang -arch arm64 -I"/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/include" -DNDEBUG   -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -march=native -mtune=native -c quick_add_ab_bridge.c -o quick_add_ab_bridge.o
/opt/gfortran/bin/gfortran -arch arm64  -fPIC  -Wall -g -O2  -march=native -mtune=native -c  quick_add_ab_fsub.f90 -o quick_add_ab_fsub.o
using C compiler:Apple clang version 16.0.0 (clang-1600.0.26.6)’
sh: /opt/gfortran/bin/gfortran: No such file or directory
using SDK:MacOSX15.2.sdkmake: /opt/gfortran/bin/gfortran: No such file or directory
make: *** [quick_add_ab_fsub.o] Error 1
ERROR: compilation failed for packagequickr.test.pkg* removing/Users/tomasz/Library/R/arm64/4.4/library/quickr.test.pkgExited with status 1.

It seems that the gfortran that rig installs is not automatically found by the R that rig installes.

The solution was relatively simple: install the gfortran package linked to from https://mac.r-project.org/tools (link)

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

1 participant