Skip to content

Commit 18f293b

Browse files
committed
BLD: warn on accelerate + non-native
* Fixes scipygh-21829 * As discussed in above ticket, simply issue a warning that links to upstream issue when attempting to build SciPy from source with non-native compiler + accelerate linalg backend. When testing on MacOS ARM locally: `CC=gcc-13 CXX=g++-13 FC=gfortran-13 python dev.py build -j 16 --with-accelerate` now warns: ``` <snip> Program f2py found: YES (/Users/treddy/python_venvs/py_312_scipy_dev/bin/f2py) scipy/meson.build:203: WARNING: accelerate may not be properly detected with non-native Apple compiler due to mesonbuild/meson#13608 Run-time dependency accelerate found: NO (tried pkgconfig and framework) scipy/meson.build:225:9: ERROR: Dependency "accelerate" not found, tried pkgconfig and framework <snip> ``` while building with AppleClang seems to proceed as usual with no warning. [skip cirrus] [skip circle]
1 parent b919b4a commit 18f293b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scipy/meson.build

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ if blas_name == 'accelerate'
199199
if not macOS13_3_or_later
200200
error('macOS Accelerate is only supported on macOS >=13.3')
201201
endif
202+
if cc.get_id() != 'clang'
203+
warning('accelerate may not be properly detected with non-native Apple compiler due to https://github.com/mesonbuild/meson/issues/13608')
204+
endif
202205
_args_blas_lapack += ['-DACCELERATE_NEW_LAPACK']
203206
generate_blas_wrappers = true
204207
accelerate_flag = '-a'

0 commit comments

Comments
 (0)