-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
BUG: NumPy main breaking SciPy main build on Mac ARM64 (bisected on f2py change) #25286
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
BUG: NumPy main breaking SciPy main build on Mac ARM64 (bisected on f2py change) #25286
Comments
I used |
Thanks for the report @tylerjereddy, could you share the exact error? That one shouldn't have affected existing bindings at all.. |
I've pasted it below the fold:
|
Some of these are trivial to fix (bad spacing for the To debug this: spin run $SHELL
cd scipy
rm -rf build/scipy/linalg/_flapackmodule.c && python dev.py build Iteratively commenting things out from the include 'flapack_user.pyf.src'
! include 'flapack_gen.pyf.src'
! include 'flapack_gen_banded.pyf.src'
! include 'flapack_gen_tri.pyf.src'
! include 'flapack_sym_herm.pyf.src'
! include 'flapack_pos_def.pyf.src'
! include 'flapack_pos_def_tri.pyf.src'
include 'flapack_other.pyf.src' And so on. At-least part of this stems from the character handling changes (#19388), the These are discussed slightly in #19388 (comment). Need to figure out why there's a regression. It is rather painful to debug because of the size of the generated bindings (and the complete lack of relevant test coverage here), but am chipping away at it. |
OK, here is the root cause: python module _char_handling_test
interface
subroutine test_char_input(trans, info)
callstatement (*f2py_func)(&trans, &info)
callprotoargument char*, int*
character, intent(in), check(*trans=='N'||*trans=='T'||*trans=='C') :: trans = 'N'
integer intent(out) :: info
end subroutine test_char_input
end interface
end python module _char_handling_test With: subroutine test_char_input(trans, info)
character, intent(in) :: trans
integer, intent(out) :: info
if (trans == 'N') then
info = 1
else if (trans == 'T') then
info = 2
else if (trans == 'C') then
info = 3
else
info = -1
end if
end subroutine test_char_input Which used to work for python -c "import _char_handling_test as cht; print(cht.test_char_input('T'))"
debug-capi:Python C/API function _char_handling_test.test_char_input(trans='N')
debug-capi:character trans='N':input,optional,scalar
debug-capi:trans='T'
debug-capi:Checking `trans=='N'||trans=='T'||trans=='C''
debug-capi:int info=:output,hidden,scalar
debug-capi:info=0
debug-capi:Fortran subroutine `test_char_input(&trans,&info)'
debug-capi:trans='T'
debug-capi:info=2
debug-capi:Building return value.
debug-capi:Python C/API function _char_handling_test.test_char_input: successful.
debug-capi:Freeing memory.
2 However, there was a minor bug in
Which, once fixed, will let |
@HaoZeke sorry if this is duplicated somewhere, feel free to close if so. There's a lot of
f2py
movement I think, I bisected a failure of SciPymain
to build on ARM MacOS (M2 max) to this very recent commit:The text was updated successfully, but these errors were encountered: