xmake-io/xmake-repo

Add support of MKL for Fortran/GFortran

Opened this issue · 0 comments

Is your feature request related to a problem? Please describe.

The current package for MKL only supports explicitly C/C++, with flags for gcc and gxx, and is not available for the gfortran toolchain.

While trying to fix this problem, a new issue was also discovered, regarding some change in policy/distribution by Intel: the MKL files do not seem to be, at least publicly, available at the URL used until now by the MKL package.
This seems to be a relatively recent change:
https://community.intel.com/t5/Intel-Integrated-Performance/Problems-installing-with-conda-HTTP-403-FORBIDDEN/td-p/1611876
It is unclear if this change is definitive.

Describe the solution you'd like

Add support of toolchain gfortran in the MKL package.

Describe alternatives you've considered

No response

Additional context

We were able to have a version supporting gfortran with a few modifications of the package:

  • change of the URL to download MKL and the header files. This seems to work fine but Intel appears to have dropped the support of Intel processors with OSX. An alternative path could not be found. The block has been commented out for now
  • change of the condition:
if package:has_tool("cc", "gcc", "gxx" then

by

if (package:has_tool("cc", "gcc", "gxx") or 
    package:has_tool("fc", "gfortran")) then