Error when gfortran is used for package installation from source

 MacOSX 15.3

gcc installed using MacBrew

I get this error:

ld: warning: search path '/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0' not found

ld: warning: search path '/opt/gfortran/lib' not found

ld: library 'gfortran' not found

I solve it by creating a ~/.R/Makevars file like this:

FC      = /opt/homebrew/opt/gfortran/bin/gfortran

F77     = /opt/homebrew/opt/gfortran/bin/gfortran

FLIBS   = -L/opt/homebrew/opt/gfortran/lib


Now I can compile package with gfortran

If it does not find the libintl.h header, for example when install robustbase package, use:

brew install gettext
cd /opt/R/arm64/include/
sudo ln -s /opt/homebrew/include/libintl.h libintl.h

Commentaires

Posts les plus consultés de ce blog

Standard error from Hessian Matrix... what can be done when problem occurs

Multivariable analysis and correlation of iconography

Install treemix in ubuntu 20.04