Skip to content

setup-fortran stops working for [macOS, gcc-13]? #95

Closed
@zaikunzhang

Description

@zaikunzhang

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions