You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GCC 11 has reached EOL 6 months ago, so it seems like a good plan to upgrade to a newer version. I would be willing to help, if someone can clarify what the expectations are (I am a Homebrew and GCC maintainer).
We are working towards eliminating the use of the modified gfortran. So far we have refactored to use the native gfortran supplied with the github runner images, see #211. Unfortunately the move to the macos-15 image seems to have broken the build, see #219 and #223 to try to fix it. If you have any ideas why the build there is failing, we are all ears.
I'm not sure that's suitable for your needs, but I may be misunderstanding the goal of this repo. Homebrew ships software built on every macOS major version, targeting this same macOS version. These versions are not suitable to deploy to earlier macOS versions. For example, on my laptop runnning macOS 26:
means that this shared library can only run on 26 and later (that's the minos field). So that makes it unsuitable (I think) to distribute in wheels, which should run on a large variety of macOS versions.
The version provided for example in conda-forge is built specially for that purpose. See:
Now we have minos 11.0 which is the earliest macOS version that supports Apple Silicon, meaning essentially all macOS versions are supported. On x86_64, I think the conda-forge build targets 10.12.
The goal here is to build OpenBLAS to run on macos-10.9 and up for x86_64 and macos-11 and up for arm64, so it can be used by NumPy and SciPy for their wheels.
I guess we should explore using miniforge compilers
It seems conda-forge compilers are not the path forward right now, as discussed here. We are planning on dropping macos-x86_64 next year across the Scientific Python ecosystem. So for now in #225 I used the gfortran from the macos-15 image for arm64 and continued with gfortran-11.3 for x86_64.
We are statically linking to libgfortran for the macos builds.
When I look at the arm64 libscipy_openblas64_.dylib, I see this for LC_BUILD_VERSION section.
They come from a wheel that is scipy-1.16.3-cp313-cp313-macosx_14_0_arm64.whl. So I'm more and more confused about what is being shipped, and where it comes from.
We set MACOSX_DEPLOYMENT_TARGET=11.0 on arm64. Are you saying that cannot work?
That is robust for all the code that is built in the PR, but it won't affect the minos version of what is vendored into the wheel.
There shouldn't be a problem here though. The minos 14.0 is coming from the Accelerate wheels, the corresponding wheel name is macosx_14_0 so they should only support macOS >=14.
@fxcoudert we are shipping two sets of wheels per architecture for both NumPy and SciPy:
x86-64, with vendored OpenBLAS: macOS >=10.13
x86-64, linked against Accelerate NEWLAPACK, macos >=14
arm64, with vendored OpenBLAS: macOS >=11 (numpy) or >=12 (scipy)
arm64, linked against Accelerate NEWLAPACK, macos >=14
Accelerate NEWLAPACK was only introduced in macOS 13.3, and Python wheels currently do not support targeting minor macOS versions, hence >=14.0 was the only option there.
I hope that clarifies it. Regarding libgfortran:
The numpy wheels linked against Accelerate don't need it, no Fortran involved
All the other numpy wheels contain the libgfortran that is re-vendored from whatever is used by scipy-openblas64
Activity
mattip commentedon Oct 26, 2025
We are working towards eliminating the use of the modified gfortran. So far we have refactored to use the native gfortran supplied with the github runner images, see #211. Unfortunately the move to the macos-15 image seems to have broken the build, see #219 and #223 to try to fix it. If you have any ideas why the build there is failing, we are all ears.
mattip commentedon Oct 26, 2025
Is there a way to tell macOS to use a different compiler? I am not sure what we were using on the macos-13 builds before #211 ...
fxcoudert commentedon Oct 26, 2025
“the native gfortran supplied with the github runner images” is gfortran/GCC provided by Homebrew. Several versions are available, see for example https://github.com/actions/runner-images/blob/main/images/macos/macos-15-arm64-Readme.md
I'm not sure that's suitable for your needs, but I may be misunderstanding the goal of this repo. Homebrew ships software built on every macOS major version, targeting this same macOS version. These versions are not suitable to deploy to earlier macOS versions. For example, on my laptop runnning macOS 26:
means that this shared library can only run on 26 and later (that's the
minosfield). So that makes it unsuitable (I think) to distribute in wheels, which should run on a large variety of macOS versions.The version provided for example in conda-forge is built specially for that purpose. See:
Now we have
minos 11.0which is the earliest macOS version that supports Apple Silicon, meaning essentially all macOS versions are supported. On x86_64, I think the conda-forge build targets 10.12.It takes a different approach to building GCC to achieve that, see in what is done in conda-forge/gfortran_impl_osx-64-feedstock#94 for example.
I don't know the policy and relationships of the different python projects, but I feel you have two options at this stage:
mattip commentedon Oct 26, 2025
The goal here is to build OpenBLAS to run on macos-10.9 and up for x86_64 and macos-11 and up for arm64, so it can be used by NumPy and SciPy for their wheels.
I guess we should explore using miniforge compilers
mattip commentedon Oct 29, 2025
It seems conda-forge compilers are not the path forward right now, as discussed here. We are planning on dropping macos-x86_64 next year across the Scientific Python ecosystem. So for now in #225 I used the gfortran from the macos-15 image for arm64 and continued with gfortran-11.3 for x86_64.
We are statically linking to libgfortran for the macos builds.
When I look at the arm64
libscipy_openblas64_.dylib, I see this forLC_BUILD_VERSIONsection.When I look at the x86_64
libscipy_openblas64_.dylibI see this forLC_VERSION_MIN_MACOSX(on the build from #225)Will the sdk version be a problem on pre-15 macos?
rgommers commentedon Oct 29, 2025
I don't think so,
minos 11.0should be enough.fxcoudert commentedon Oct 29, 2025
That has the wrong minos version.
Can you explain/confirm that? I see shared dylibs in a freshly installed scipy from pypi:
Actually, weirdly enough, the libgfortran and libquadmath have 14.0 as minos value:
They come from a wheel that is
scipy-1.16.3-cp313-cp313-macosx_14_0_arm64.whl. So I'm more and more confused about what is being shipped, and where it comes from.mattip commentedon Oct 30, 2025
We set
MACOSX_DEPLOYMENT_TARGET=11.0on arm64. Are you saying that cannot work?This repo produces the scipy_openblas64 and scipy_openblas32 wheels, the links are to the latest versions on PyPI. SciPy also installs a gfortran compiler in its wheel build since it still has fortran code in the code base. They (apparently) do not statically link.
rgommers commentedon Oct 30, 2025
That is robust for all the code that is built in the PR, but it won't affect the
minosversion of what is vendored into the wheel.There shouldn't be a problem here though. The
minos 14.0is coming from the Accelerate wheels, the corresponding wheel name ismacosx_14_0so they should only support macOS >=14.@fxcoudert we are shipping two sets of wheels per architecture for both NumPy and SciPy:
Accelerate NEWLAPACK was only introduced in macOS 13.3, and Python wheels currently do not support targeting minor macOS versions, hence >=14.0 was the only option there.
I hope that clarifies it. Regarding
libgfortran:numpywheels linked against Accelerate don't need it, no Fortran involvednumpywheels contain thelibgfortranthat is re-vendored from whatever is used byscipy-openblas64scipywheels uselibgfortranas determined by the complicated dance done in https://github.com/scipy/scipy/blob/b73bb351dd0cc9d6699c72837caf043d0a73df01/tools/wheels/cibw_before_build_macos.sh