BLD: Update to macos-11 for x86_64 wheels.#22534
Conversation
The tests were already updated, but the wheels remained at macos-10.15. This updates the wheel builds as well and should avoid the warning that 10.15 will be removed in December 2022.
|
@mattip @h-vetinari Ping. Note that the openblas libraries are still labeled 10.9. |
|
There are Fortran problems. I assume something like is needed here. @mattip ? |
|
It seems something like that might be needed for the gfortran compiler. |
|
See https://github.com/scipy/scipy/blob/1d80a2f254380d2b45733258ca42eb6b55c8755b/.github/workflows/wheels.yml#L82-L87 for more details on |
|
Thanks Ralf. Makes me curious as to why macos-11 works on azure. In any case, I think we should put some effort into getting this working. Do you think macos-12 would be a better target? That seems to be what SciPy is using for the arm64 builds. |
macOS 11 has a bug that leads to a kernel panic when used with some functionality in |
|
Over at #22525 I am trying to get OpenBLAS 0.3.21 working. In PR MacPython/openblas-libs#89 I built the openblas libraries and updated the macOS image to mac-11 without updating the gfortran toolchain on macOS. |
|
Here are my notes from fiddling around today when trying to build
This is because OpenBLAS on anaconda is built against From discussions elsewhere it seems that there's a desire (at least in scipy) to update to at least Perhaps we need to:
Note: this only applies to the x86_64 builds, the arm64 gfortran compilers are much more modern. @mattip, what gfortran compiler did you get to work on macos-11, that uses |
In #22525 I did not update the macos image at all. |
These steps make sense to me. Would you like to submit a PR to MacPython/openblas-libs? |
|
+1 to bumping to at least gfortran 8. Regarding minimum macOS version: 10.15 is a bit too aggressive; the problem is that users on <=10.14 will then get builds from source, rather than an older wheel. 10.14 is about 4 years old, and I expect it's still around enough to be a problem in practice. I also had a quick browse around, currently Matplotlib uses 10.12 and PyArrow 10.14, those are the newest versions I found. I'd expect that 10.12 or 10.13 would be okay, 10.14 borderline, and 10.15 too new. |
Normally yes, but it's not quite clear to me where to even start. |
|
Ok, let me try.
I think this should replace the one in https://github.com/MacPython/gfortran-install/tree/master/archives, and the README updated appropriately |
|
Will gfortran 8.2 for Mojave (macOS 10.14) actually install on macos 11? |
|
There are now macos-10.11 builds of openblas 0.3.21 with the gfortran8 gfortran compiler on https://anaconda.org/multibuild-wheels-staging/openblas-libs/files. If we could easily update to 0.3.21, we could change the openblas suffix to 10_11 instead of 10_9. Unfortunately then using 0.3.21 will hit the windows build problems from #22525. That compiler was built for macos 10.14, and there are ld warnings
Will that cause problems when targeting 10.11? |
|
@mattip Why 10.11? |
If we are not going with 10.14, then 10.11 seemed like a good minimum version. |
|
I think it would be a good time to retry the "repackage-gfortran-from-conda-forge" idea. Our gfortran is compatible all the way back to 10.9. At the time it wasn't clear where to do the repackaging: MacPython/gfortran-install#7 CC @isuruf |
The installer package I linked to above is installable on the GH Actions macos-11 image (already tried that).
From what the warning says I would've thought so, perhaps the minimum macOS version we can target with that compiler becomes 10.14. I tried to search for the warning but get no clear guidance on whether binaries built with that would work on <10.14. There may be compilers for gfortran-8 that were built for older macOS, but I can't find any immediately. This page has a gfortran-6 package for 10.11 and up. |
|
I can repackage one from conda-forge for you until we figure out MacPython/gfortran-install#7 Which gfortran do you need? 9.5.0 or 10.4.0 or 11.3.0? They'll be compatible with macos 10.9 and later |
I can't speak for the exact gfortran version we need from a scipy POV (@rgommers will know) but the gfortran needs:
scipy then needs an OpenBLAS build with the above (either v0.3.18 or v0.3.21). (Sorry if the above is stating the obvious). |
|
I note that |
The file inside the DMG has a funny name, but is macOS installer PKG. Once the installer has run it places a |
This will not solve the openblas problems, but perhaps the f2py failures will go away.
c3f2d63 to
8aa8bb6
Compare
It doesn't have the |
|
Sorry, the installer is within that folder, |
|
I'm going to look into the solution posted by @isuruf this morning for scipy. |
|
There are a few intertwined factors here. We need to update to a newer version of
The good solution is probably to:
|
|
@charris, you can fix that by changing https://github.com/numpy/numpy/blob/main/tools/openblas_support.py#L80 to |
|
Mac is working. This is all testing what needs changing right now. All we need is to
|
| typ = 'tar.gz' | ||
| elif plat == 'macosx-x86_64': | ||
| suffix = 'macosx_10_9_x86_64-gf_1becaaa.tar.gz' | ||
| suffix = 'macosx_10_11_x86_64-gf_dd3e148.tar.gz' |
There was a problem hiding this comment.
I think this OpenBLAS change means that you have to set MACOSX_DEPLOYMENT_TARGET=10.11. One needs to be making numpy-1.24.0.dev0-cp39-cp39-macosx_10_11_x86_64.whl instead of numpy-1.24.0.dev0-cp39-cp39-macosx_10_9_x86_64.whl.
Using https://github.com/MacPython/gfortran-install/pull/11/files may still allow macosx_10_9_x86_64-gf_1becaaa.tar.gz to be used, but that would require experimentation.
|
Closing in favor of #22525. |
| buildplat: | ||
| - [ubuntu-20.04, manylinux_x86_64] | ||
| - [macos-10.15, macosx_*] | ||
| - [macos-11, macosx_*] |
There was a problem hiding this comment.
This still needs to be done in #22525. Should I add it there?
There was a problem hiding this comment.
Heh, too late. I'll just make a PR for that.
The tests were already updated, but the wheels remained at macos-10.15. This updates the wheel builds as well and should avoid the warning that 10.15 will be removed in December 2022.