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

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

Closed
zaikunzhang opened this issue May 14, 2024 · 4 comments · Fixed by #96
Closed

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

zaikunzhang opened this issue May 14, 2024 · 4 comments · Fixed by #96

Comments

@zaikunzhang
Copy link

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.

@zaikunzhang
Copy link
Author

It is not the same problem as fortran-lang/stdlib#807 . macos-13 runners have Intel chips, not Arm. Thanks.

@danieljprice
Copy link

Similar issue for me, with macOS and gfortran: https://github.com/danieljprice/phantom/actions/runs/9133304238/job/25117800865?pr=545

@danieljprice
Copy link

Update: I worked around this by simply installing gfortran with "brew install gfortran", there does not seem to be a need for the soft link workarounds anymore...

@wpbonelli
Copy link
Contributor

thanks all for the report, I think the issue is resolved on main and will plan to do a release and update the v1 tag soon

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

Successfully merging a pull request may close this issue.

3 participants