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

fix(oneapi): use root environment activation script #92

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

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

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.

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.

None yet

3 participants