scipy: Failure to build with Python 3.9.0 on macOS
While rebuilding packages with Python 3.9.0 on macOS Homebrew (https://github.com/Homebrew/homebrew-core/pull/62560), we are seeing a failure to build scipy 1.5.2.
Reproducing code example:
/usr/local/opt/python@3.9/bin/python3 setup.py build --fcompiler=gnu95
Error message:
scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon2.c:175:5: error: implicit declaration of function 'ccopy_' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
scipy/sparse/linalg/dsolve/SuperLU/SRC/dmach.c:62:9: error: implicitly declaring library function 'strncmp' with type 'int (const char *, const char *, unsigned long)' [-Werror,-Wimplicit-function-declaration]
scipy/sparse/linalg/dsolve/SuperLU/SRC/ilu_cdrop_row.c:196:3: error: implicit declaration of function 'scopy_' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
scipy/sparse/linalg/dsolve/SuperLU/SRC/ilu_zdrop_row.c:196:3: error: implicit declaration of function 'dcopy_' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
scipy/sparse/linalg/dsolve/SuperLU/SRC/smach.c:62:9: error: implicitly declaring library function 'strncmp' with type 'int (const char *, const char *, unsigned long)' [-Werror,-Wimplicit-function-declaration]
scipy/sparse/linalg/dsolve/SuperLU/SRC/zlacon2.c:175:5: error: implicit declaration of function 'zcopy_' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
scipy/sparse/linalg/dsolve/SuperLU/SRC/slacon2.c:160:16: error: implicit declaration of function 'idamax_' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 17 (11 by maintainers)
This worked for me:
However it’s better to have a proper solution such as an inclusion of proper headers without this requirement of this hack
The driver was Linux ARM64 wheel release and an XCode 12 build issue fix. I agree that we should get a release out for 3.9 but I looked at the state of the main repo CI and the wheels repo CI for 3.9 and decided we weren’t quite where I wanted it to be. I think NumPy is still messing with a few things for 3.9 upstream as well and there was mention of a missing 32-bit NumPy 3.9 wheel that may be the cause for a failure in: https://github.com/MacPython/scipy-wheels/pull/98
Wait, I had assumed that getting Python 3.9 wheels up was the main driver for doing a 1.5.3 release now? I haven’t been able to follow closely, sorry if I’m missing something here.
Requests for 3.9 support are going to continue to come in quickly. Conda-forge already has 3.9 packages up for SciPy 1.5.2 (see https://github.com/conda-forge/scipy-feedstock/pull/138), and that worked without any patches (the need for the one-liner fix in gh-12957 may depend on compiler versions).