scipy: BUG: Build failure with Xcode 12
Xcode 12 for OS X was just released, and I can’t build scipy with it. The command pip3 install . -v --user
fails, ending with
error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DUSE_VENDOR_BLAS=1 -Iscipy/sparse/linalg/dsolve/SuperLU/SRC -I/private/var/folders/cp/n8wtqs490tq5psknff1hv9qr0000gn/T/pip-build-env-k4q2ai5g/overlay/lib/python3.8/site-packages/numpy/core/include -c scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon2.c -o build/temp.macosx-10.15-x86_64-3.8/scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon2.o -MMD -MF build/temp.macosx-10.15-x86_64-3.8/scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon2.o.d" failed with exit status 1
Building wheel for scipy (PEP 517): finished with status 'error'
ERROR: Failed building wheel for scipy
Failed to build scipy
ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly
This may be the same issue as https://github.com/scipy/scipy/issues/12656 — at least the error at the end is the same — but that issue was closed while only providing the suggestion to use a different compiler.
I am using Xcode 12, plus homebrew’s Python 3.8, pip3, and gfortran. Unfortunately, I am really trying to figure out how to get this to build in Sage (sagemath.org), and using a gcc toolchain instead of clang would be, at the least, very inconvenient.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 20 (16 by maintainers)
Links to this issue
- Mailman 3 ANN: SciPy 1.5.4 - NumPy-Discussion - python.org
- Mailman 3 ANN: SciPy 1.5.4 - Python-announce-list - python.org
- Mailman 3 ANN: SciPy 1.5.3 - Python-announce-list - python.org
- Mailman 3 ANN: SciPy 1.5.4 - Python-announce-list - python.org
- Mailman 3 [SciPy-Dev] ANN: SciPy 1.5.4 - SciPy-Dev - python.org
- Mailman 3 ANN: SciPy 1.5.4 - SciPy-Dev - python.org
- Mailman 3 ANN: SciPy 1.5.3 - NumPy-Discussion - python.org
- Mailman 3 ANN: SciPy 1.5.3 - SciPy-Dev - python.org
- Mailman 3 ANN: SciPy 1.5.3 - SciPy-Dev - python.org
Commits related to this issue
- BLD: replace the #include of libqull_r.h with with this of qhull_ra.h in qhull_misc.c This is needed for a sucessful build on macOS using Xcode 12 (Apple's clang 12). Without it, it errors out with ... — committed to dimpase/scipy by dimpase 4 years ago
- BLD: replace the #include of libqull_r.h with with this of qhull_ra.h in qhull_misc.c This is needed for a sucessful build on macOS using Xcode 12 (Apple's clang 12). Without it, it errors out with ... — committed to tylerjereddy/scipy by dimpase 4 years ago
- MAINT: PR 12957 revisions * apply the recommended patch for XCode 12 SciPy build issues; confirm that it works locally * see: https://github.com/scipy/scipy/issues/12860#issuecomment-711096661 — committed to rlucas7/scipy by tylerjereddy 4 years ago
- MAINT: PR 12957 revisions * apply the recommended patch for XCode 12 SciPy build issues; confirm that it works locally * see: https://github.com/scipy/scipy/issues/12860#issuecomment-711096661 — committed to andyfaff/scipy by tylerjereddy 4 years ago
- MAINT: PR 12957 revisions * apply the recommended patch for XCode 12 SciPy build issues; confirm that it works locally * see: https://github.com/scipy/scipy/issues/12860#issuecomment-711096661 * re... — committed to rlucas7/scipy by tylerjereddy 4 years ago
- MAINT: PR 12957 revisions * apply the recommended patch for XCode 12 SciPy build issues; confirm that it works locally * see: https://github.com/scipy/scipy/issues/12860#issuecomment-711096661 * re... — committed to rlucas7/scipy by tylerjereddy 4 years ago
- MAINT: PR 12957 revisions * apply the recommended patch for XCode 12 SciPy build issues; confirm that it works locally * see: https://github.com/scipy/scipy/issues/12860#issuecomment-711096661 * re... — committed to rlucas7/scipy by tylerjereddy 4 years ago
Should be fixed on
master
and upcoming1.5.4
release.The TODOs here seem to be:
Determine what patch is needed for
master
branch. I was, for some reason, under the impression this was fixed formaster
but not the1.5.x
maintenance branch. gh-12937 suggests thatmaster
has issues as well unless the CI there is using yet another version of XCode or something? (the CI failed there even before my patching attempt). Conversely, when I’ve tried local builds ofmaster
with XCode 12 they seem to work just fine.We seem pretty close on a patch that will fix the issue for
1.5.x
based on the feedback from i.e., @adamjstewart above in gh-12957. What I might do there is turn on the same MacOS Python 3.9 CI that is failing in gh-12937 and if that passes we can maybe move forward with 1.5.x in that regard at least. (We may be able to remove the qhull shims though, since a simpler one should have been backported). This patch actually does show the fail before/fix after applying when I test locally with XCode 12.I don’t know - I am a very, very occasional contributor to scipy.
we have a patch here: https://git.sagemath.org/sage.git/tree/build/pkgs/scipy/patches/extern_decls.patch?id=711fe05025795e44b84233e065d240859ccae5bd
The latter is from on https://trac.sagemath.org/ticket/30604