Skip to content

Conversation

@wpbonelli
Copy link
Contributor

Possible fix for #56. The issue seems like incomplete oneapi environment activation. Previously we ran the activation script for compiler components only*. Run the root activation script instead.

@jalvesz @minhqdao let me know if pointing your workflows at this PR branch resolves the issue.

*This was carried over from https://github.com/modflowpy/install-intelfortran-action/blob/b874d3a869fb226ca5f02b4fbaffb3af7a8e6813/action.yml#L223. There was a reason we originally opted against the root activation script, but I don't recall what it was.

@minhqdao
Copy link
Contributor

Thanks for quickly tackling this. 🫶

I tried - uses: wpbonelli/setup-fortran@setvars but the problem unfortunately still persists (see job).

Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2024.1.0 Build 20240308
<ERROR> Compilation failed for object " version_f_ex1.exe "
Copyright (C) 1985-2024 Intel Corporation. All rights reserved.

link: unknown option -- d
<ERROR> stopping due to failed compilation
Try 'link --help' for more information.
STOP 1

Strangely, the lib location issue is also back on macOS although your branch seems up-to-date. 🤔

Run fpm test
dyld[4694]: Library not loaded: /usr/local/opt/gcc/lib/gcc/current/libgfortran.5.dylib
  Referenced from: <9C2D5DA8-E509-36A4-AB7E-D8D39205CC1F> /Users/runner/work/_temp/fpm
  Reason: tried: '/usr/local/opt/gcc/lib/gcc/current/libgfortran.5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/gcc/lib/gcc/current/libgfortran.5.dylib' (no such file), '/usr/local/opt/gcc/lib/gcc/current/libgfortran.5.dylib' (no such file), '/usr/local/lib/libgfortran.5.dylib' (no such file), '/usr/lib/libgfortran.5.dylib' (no such file, not in dyld cache)
/Users/runner/work/_temp/2725b7c7-7e41-4cd2-8d5f-a91103ae2508.sh: line 1:  4694 Abort trap: 6           fpm test
Error: Process completed with exit code 134.

@jalvesz
Copy link

jalvesz commented Apr 25, 2024

I also tested and got the same outcome, the problem is still present on windows with ifort and ifx + fails with macOS which I didn't have before, you can see the run here:
https://github.com/jalvesz/FSPARSE/actions/runs/8828058231

@wpbonelli
Copy link
Contributor Author

I think the macos failures may be related to GitHub's migrating macos-latest to macos-14. The brew install location has changed with macos-14.

@jalvesz you might try changing the paths to libgfortran and libquadmath here, I think the new location is /opt/homebrew/opt/gcc/lib/gcc/current/?

These issues seem to occur only with fpm — using this action on a meson project, I have not encountered problems with link options on windows or locating mac libs. I don't use fpm at the moment so I'm not in an ideal position to diagnose. I'll try to dig deeper, but I am spread a bit thin.

@wpbonelli wpbonelli marked this pull request as ready for review February 2, 2025 20:49
@wpbonelli wpbonelli merged commit 2ccead5 into fortran-lang:main Feb 2, 2025
@wpbonelli wpbonelli deleted the setvars branch February 2, 2025 20:50
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 this pull request may close these issues.

3 participants