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)

Commits related to this issue

Most upvoted comments

Should be fixed on master and upcoming 1.5.4 release.

The TODOs here seem to be:

  1. Determine what patch is needed for master branch. I was, for some reason, under the impression this was fixed for master but not the 1.5.x maintenance branch. gh-12937 suggests that master 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 of master with XCode 12 they seem to work just fine.

  2. 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.

What other changes are required? Will 1.5.3 be released soon?

I don’t know - I am a very, very occasional contributor to scipy.

If not, a patch for 1.5.2 would be really helpful.

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