<p dir="auto">My issue is about building wheels from source using the default compilers on Mac OS.</p>
<h4 dir="auto">Reproducing code example:</h4>

<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ pip3.9 --version
pip 20.2.4 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.32.2)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
$ pip3.9 install -U &quot;scipy==1.5.3&quot;"><pre class="notranslate">$ pip3.9 --version
pip 20.2.4 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.32.2)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
$ pip3.9 install -U <span class="pl-s"><span class="pl-pds">"</span>scipy==1.5.3<span class="pl-pds">"</span></span></pre></div>
<h4 dir="auto">Error message:</h4>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    clang: scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon2.c
    clang: scipy/sparse/linalg/dsolve/SuperLU/SRC/csp_blas3.c
    scipy/sparse/linalg/dsolve/SuperLU/SRC/cgsitrf.c:251:11: warning: unused variable 'one' [-Wunused-variable]
        float one = 1.0;
              ^
    clang: scipy/sparse/linalg/dsolve/SuperLU/SRC/dgssv.c
    scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon2.c:175:5: error: implicit declaration of function 'ccopy_' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        ccopy_(n, x, &amp;c__1, v, &amp;c__1);
        ^
    scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon2.c:181:1: warning: unused label 'L90' [-Wunused-label]
    L90:
    ^~~~
    1 warning and 1 error generated.
    2 warnings generated.

   ...  # unrelated source files, asynchronous compilation

    error: Command &quot;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/xg/1clp6x614c722qd1qvmwc72h0000gn/T/pip-build-env-b7rlgn9p/overlay/lib/python3.9/site-packages/numpy/core/include -c scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon2.c -o build/temp.macosx-10.15-x86_64-3.9/scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon2.o -MMD -MF build/temp.macosx-10.15-x86_64-3.9/scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon2.o.d&quot; failed with exit status 1
    ----------------------------------------
    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
  ----------------------------------------"><pre class="notranslate"><code class="notranslate">    clang: scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon2.c
    clang: scipy/sparse/linalg/dsolve/SuperLU/SRC/csp_blas3.c
    scipy/sparse/linalg/dsolve/SuperLU/SRC/cgsitrf.c:251:11: warning: unused variable 'one' [-Wunused-variable]
        float one = 1.0;
              ^
    clang: scipy/sparse/linalg/dsolve/SuperLU/SRC/dgssv.c
    scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon2.c:175:5: error: implicit declaration of function 'ccopy_' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        ccopy_(n, x, &amp;c__1, v, &amp;c__1);
        ^
    scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon2.c:181:1: warning: unused label 'L90' [-Wunused-label]
    L90:
    ^~~~
    1 warning and 1 error generated.
    2 warnings generated.

   ...  # unrelated source files, asynchronous compilation

    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/xg/1clp6x614c722qd1qvmwc72h0000gn/T/pip-build-env-b7rlgn9p/overlay/lib/python3.9/site-packages/numpy/core/include -c scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon2.c -o build/temp.macosx-10.15-x86_64-3.9/scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon2.o -MMD -MF build/temp.macosx-10.15-x86_64-3.9/scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon2.o.d" failed with exit status 1
    ----------------------------------------
    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
  ----------------------------------------
</code></pre></div>
<h4 dir="auto">Scipy/Numpy/Python version information:</h4>
<p dir="auto">Python 3.9.0<br>
numpy version 1.19.3<br>
scipy version 1.5.3</p>

<h4 dir="auto">Additional notes</h4>
<p dir="auto">Error does not occur when using the GNU compilers from Homebrew</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ gcc-10 --version
gcc-10 (Homebrew GCC 10.2.0) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ CC=gcc-10 CXX=g++-10 pip3.9 install -U scipy
# normal success messages"><pre class="notranslate">$ gcc-10 --version
gcc-10 (Homebrew GCC 10.2.0) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software<span class="pl-k">;</span> see the <span class="pl-c1">source</span> <span class="pl-k">for</span> copying conditions.  There is NO
warranty<span class="pl-k">;</span> not even <span class="pl-k">for</span> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ CC=gcc-10 CXX=g++-10 pip3.9 install -U scipy
<span class="pl-c"><span class="pl-c">#</span> normal success messages</span></pre></div>
<p dir="auto">Xcode 12 for OS X was just released, and I can't build scipy with it. The command <code class="notranslate">pip3 install . -v --user</code> fails, ending with</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  error: Command &quot;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&quot; 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"><pre class="notranslate"><code class="notranslate">  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
</code></pre></div>
<p dir="auto">This may be the same issue as <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="671564581" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/12656" data-hovercard-type="issue" data-hovercard-url="/scipy/scipy/issues/12656/hovercard" href="https://github.com/scipy/scipy/issues/12656">#12656</a> — 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.</p>
<p dir="auto">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.</p>