Open
Description
Thanks for the project.
There is a problem with the mac operating system. It appears that it only works with gfortran version 10.
When running a simple fpm test
on mac using gfortran, I encountered this error:
dyld[2196]: Library not loaded: '/usr/local/opt/gcc@10/lib/gcc/10/libgfortran.5.dylib'
Referenced from: '/Users/runner/work/_temp/fpm'
Reason: tried: '/usr/local/opt/gcc@10/lib/gcc/10/libgfortran.5.dylib' (no such file), '/usr/local/lib/libgfortran.5.dylib' (no such file), '/usr/lib/libgfortran.5.dylib' (no such file)
/Users/runner/work/_temp/378df7c3-1bf9-413a-8a60-858cb91f887e.sh: line 1: 2196 Abort trap: 6 fpm test
Error: Process completed with exit code 134.
To temporarily solve the problem, I used the following steps:
- name: Setup Fortran on Windows
if: contains( matrix.os, 'windows')
uses: awvwgk/setup-fortran@v1
with:
compiler: ${{ matrix.toolchain.compiler }}
version: ${{ matrix.toolchain.version }}
- name: Setup Fortran on MacOS
if: contains( matrix.os, 'macos')
run: |
brew reinstall gcc@12
ln -s /usr/local/lib/gcc/current/libgfortran.5.dylib /usr/local/lib/
ln -s /usr/local/lib/gcc/current/libquadmath.0.dylib /usr/local/lib/
ln -s /usr/local/Cellar/gcc/13.1.0/bin/gfortran /usr/local/bin/gfortran
# ln -s /usr/local/lib/gcc/current/bin/gfortran /usr/local/bin/gfortran
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
wpbonelli commentedon Aug 1, 2023
cf #7, #31 reproducing in ci tests is likely the first step toward solution
gha3mi commentedon Aug 1, 2023
To find locations on a Mac, I used the
find
command:Maybe the above solution can be generalized (I didn't test it):
jalvesz commentedon Jan 15, 2024
Same problem here, the tool chain installs gcc13 but it tries to look for gcc10 so it fails
minhqdao commentedon Jul 28, 2024
Still having the problem:
Tried running both
gcc-13
orintel-classic
and it happened in both instances.wpbonelli commentedon Jul 29, 2024
libgfortran shouldn't be used at all for an intel fortran build, right? seems like confirmation this is an fpm issue?
xref gha3mi/test-setup-fortran#1 where @gha3mi made some progress tracking it down
wpbonelli commentedon Jul 4, 2025
hey @gha3mi @minhqdao was this ever confirmed to be a problem with fpm? not urgent, just pruning the backlog.
gha3mi commentedon Jul 4, 2025
Hey @wpbonelli, I haven’t heard anything about it being confirmed. That was my speculation, but the test worked here: https://github.com/gha3mi/test-setup-fortran#compatibility
I can rerun the test to see if anything has changed since then.
gha3mi commentedon Jul 4, 2025
Check the test of setup-fortran with Meson on macOS (CMake seems to work too):
This works correctly, which confirms that setup-fortran works with Meson (and CMake) on macOS. However, fpm currently fails with the following error:
It appears that fpm is still trying to link against libgfortran.5.dylib from gcc@12. Last year, installing gcc@10 resolved this issue, but now installing gcc@12 does not fix it.