setup-fortran
stops working for [macOS, gcc-13]
recently in my workflows, complaining that “Error: No such keg: /usr/local/Cellar/gcc@13”
See
opened 01:25AM - 14 May 24 UTC
See
https://github.com/s-prima/prima/actions/runs/9052615000/job/24870501045…
Error log:
```
Run fortran-lang/setup-fortran@main
with:
compiler: gcc
version: 13
env:
ROOT_DIR: /Users/runner/work/prima/prima
TEST_DIR: /tmp/gittest_1715609463_386[2](https://github.com/s-prima/prima/actions/runs/9052615000/job/24870501045#step:7:2)75360
SEDI: sed -i ""
GFORTRAN_VERSION: 1[3](https://github.com/s-prima/prima/actions/runs/9052615000/job/24870501045#step:7:3)
Run action_path=$(echo '//Users/runner/work/_actions/fortran-lang/setup-fortran/main' | sed -e 's/\\/\//g' -e 's/://')
action_path=$(echo '//Users/runner/work/_actions/fortran-lang/setup-fortran/main' | sed -e 's/\\/\//g' -e 's/://')
source "$action_path/setup-fortran.sh"
compiler=${COMPILER:-gcc}
platform=$(uname -s | tr '[:upper:]' '[:lower:]')
if [[ "$RUNNER_OS" == "macOS" ]] && [[ "$compiler" == "intel" ]]; then
echo "Compiler 'intel' not supported on macOS, falling back to 'intel-classic'"
compiler="intel-classic"
fi
case $compiler in
gcc)
version=${VERSION:-13}
install_gcc $platform
;;
intel-classic)
version=${VERSION:-2023.2.0}
install_intel $platform true
;;
intel)
version=${VERSION:-202[4](https://github.com/s-prima/prima/actions/runs/9052615000/job/24870501045#step:7:4).1}
install_intel $platform false
;;
nvidia-hpc)
version=${VERSION:-23.11}
install_nvidiahpc $platform
;;
lfortran)
version=${VERSION:-0.33.0}
install_lfortran $platform
;;
*)
exit 1
;;
esac
echo "FC=${FC}" >> $GITHUB_ENV
echo "CC=${CC}" >> $GITHUB_ENV
echo "CXX=${CXX}" >> $GITHUB_ENV
shell: /bin/bash --noprofile --norc -e -o pipefail {0}
env:
ROOT_DIR: /Users/runner/work/prima/prima
TEST_DIR: /tmp/gittest_171[5](https://github.com/s-prima/prima/actions/runs/9052615000/job/24870501045#step:7:5)609463_38[6](https://github.com/s-prima/prima/actions/runs/9052615000/job/24870501045#step:7:6)275360
SEDI: sed -i ""
GFORTRAN_VERSION: 13
COMPILER: gcc
VERSION: 13
+ compiler=gcc
++ uname -s
++ tr '[:upper:]' '[:lower:]'
+ platform=darwin
+ [[ macOS == \m\a\c\O\S ]]
+ [[ gcc == \i\n\t\e\l ]]
+ case $compiler in
+ version=13
+ install_gcc darwin
+ local platform=darwin
+ case $platform in
+ install_gcc_brew
++ brew list --versions gcc
++ cut '-d ' -f2
+ current=13.2.0
++ echo [13](https://github.com/s-prima/prima/actions/runs/9052615000/job/24870501045#step:7:14).2.0
++ cut -d. -f1
+ current_major=13
GCC 13 already installed
+ '[' 13 == 13 ']'
+ echo 'GCC 13 already installed'
+ brew unlink gcc
Unlinking /usr/local/Cellar/gcc/13.2.0... 34 symlinks removed.
+ brew unlink gcc@13
Error: No such keg: /usr/local/Cellar/gcc@13
Error: Process completed with exit code 1.
```
Thank you for taking a look.
Has anyone else encountered the same?
Yes, this happened on stdlib as well and the only fix at the moment seems to be downgrading to macos 12 as @FedericoPerini did here macos-latest -> macos-12 by perazz · Pull Request #807 · fortran-lang/stdlib · GitHub
Hi @hkvzjal , I don’t think the problem I encountered is the same. GitHub macos-13
runners are with Intel CPU’s, not Arm. It would be nice if the setup-fortran
team @awvwgk could take a look. Thank you.