-
Notifications
You must be signed in to change notification settings - Fork 16
Skip extra linker flags on Windows ARM64 in get_pkg_config() #200
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
Conversation
I don't understand the platform difference. Why doesn't llvm need libfortran and libquadmath? Does the build of OpenBLAS conditionally use libfortran on mingw? And how did this work up to now: what happens on x86_64 if someone uses clang-cl (i.e. llvm) to build SciPy? |
@mattip those flags and runtime libraries are specific to I don't know exactly under which conditions
|
xref the discussion on scipy/scipy#21562 (comment) that motivated this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since OpenBLAS is built with flang-new
, this looks correct to me and I think we should merge it and publish new wheels to progress on SciPy for win_arm64
.
The use of flang-new
seems unlikely to change I think, since there is no gfortran
on WoA and flang-new
is anyway more desirable and we expect it to mature further.
|
Ahh, so the difference is that on all other platforms we use gcc/gfortran (with libgfortran and libquadmath) and for win-arm64 we use flang-new. I am OK to merge this and release new wheels as-is, but I think the condition is misleading. It implies something is different with the runtime platform, when the root cause is the compiler used to build openblas and thus in the wheel itself. Maybe in a future PR we could refactor the logic to set |
I don't think there is any difference between these in practice. We do not support building |
I uploaded the scipy_openblas32-0.3.29.265.1 and scipy_openblas64-0.3.29.265.1 wheels with this fix to PyPI. Thanks @Harishmcw |
@mattip Will you be updating NumPy and should I wait for it to do a 2.3.0 release? |
I will only be available on Sunday. NumPy builds and passes tests without this, do we need it for f2py? |
No, there is no actual Fortran code in NumPy, so this won't matter - only for SciPy it does matter. |
Hi @mattip and @matthew-brett ,
Upon setting up CI environment for building SciPy on WoA using the current scipy_openblas32 wheel, the build fails due to missing include libraries as seen in this log.
The root cause is due to the inclusion of extra linker flags (-lgfortran -lquadmath), which are only required for GNU-based compilers which are not required for WoA as it uses LLVM toolchain.
To fix this, the get_pkg_config() function in the init.py is updated to skip extra include directories when the architecture is Windows ARM64 which ensures clean builds on WoA without affecting x64 builds.
I updated the version in pyproject.toml and made sure it matches
git describe --tags --abbrev=8
in OpenBLAS at theOPENBLAS_COMMIT