gfortran 6.3.0 to compile package
Update: 30/7/2021
The latest gfortran is package in gcc for Mac brew:
First install homebrew, using in terminal:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then install llvm
brew install --with-clang llvm
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then install llvm
brew install --with-clang llvm
https://gcc.gnu.org/wiki/GFortranBinaries#MacOS
It is currently the version 6.3.0 for Sierra. However some packages still want use the 6.1.0 version for installation. Here is a solution to update gfortran.
First, remove all previous old fortran installation, for example the 4.8.2:
Here is the code from http://thecoatlessprofessor.com/programming/rcpp-rcpparmadillo-and-os-x-mavericks-lgfortran-and-lquadmath-error/
# Download installer into working directory
curl -O http://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2
# Remove _files_ associated with the binary
for file in $(tar tfz gfortran-4.8.2-darwin13.tar.bz2); do
sudo rm -f /$file;
done
# Remove empty _folders_ associated with the binary
for file in $(tar tfz gfortran-4.8.2-darwin13.tar.bz2); do
sudo rmdir -p /$file;
done
# Delete the installer
rm -rf gfortran-4.8.2-darwin13.tar.bz2
Now download 6.3.0 version here:
https://gcc.gnu.org/wiki/GFortranBinaries#MacOS
And install it normally using .pkg
Then make a symbolic link to let think the installer from your package that the 6.1.0 version is present:
cd /usr/local/gfortran/lib/gcc/
sudo mkdir x86_64-apple-darwin15
cd x86_64-apple-darwin15
sudo ln -s ../x86_64-apple-darwin16/6.3.0 6.1.0
cd $HOME
ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0'
(tested with install.packages("VGAM"))
I keep this information also; it can be very useful:
To see the structure of a directory:
from http://thecoatlessprofessor.com/programming/rcpp-rcpparmadillo-and-os-x-mavericks-lgfortran-and-lquadmath-error/
I keep this information also; it can be very useful:
To see the structure of a directory:
from http://thecoatlessprofessor.com/programming/rcpp-rcpparmadillo-and-os-x-mavericks-lgfortran-and-lquadmath-error/
## Assumes homebrew is installed
# brew install tree
curl -O ~/Downloads/gfortran-4.8.2-darwin13.tar.bz2 http://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2
tar fvxz gfortran-4.8.2-darwin13.tar.bz2
tree usr
Commentaires
Enregistrer un commentaire